no xchan here if using zot protocol

This commit is contained in:
redmatrix 2016-03-17 12:15:28 -07:00
parent a83cdbeb39
commit f82afca84d
3 changed files with 5 additions and 3 deletions

View File

@ -23,7 +23,8 @@ function rsa_verify($data,$sig,$key,$alg = 'sha256') {
$verify = @openssl_verify($data,$sig,$key,$alg); $verify = @openssl_verify($data,$sig,$key,$alg);
if(! $verify) { if(! $verify) {
logger('openssl_verify: ' . openssl_error_string(),LOGGER_NORMAL,LOG_ERR); while($msg = openssl_error_string())
logger('openssl_verify: ' . $msg,LOGGER_NORMAL,LOG_ERR);
logger('openssl_verify: key: ' . $key, LOGGER_DEBUG, LOG_ERR); logger('openssl_verify: key: ' . $key, LOGGER_DEBUG, LOG_ERR);
// provide a backtrace so that we can debug key issues // provide a backtrace so that we can debug key issues
if(version_compare(PHP_VERSION, '5.4.0') >= 0) { if(version_compare(PHP_VERSION, '5.4.0') >= 0) {
@ -256,6 +257,7 @@ function pkcs1_encode($Modulus,$PublicExponent) {
} }
// http://stackoverflow.com/questions/27568570/how-to-convert-raw-modulus-exponent-to-rsa-public-key-pem-format
function metopem($m,$e) { function metopem($m,$e) {
$der = pkcs8_encode($m,$e); $der = pkcs8_encode($m,$e);
$key = DerToPem($der,false); $key = DerToPem($der,false);

View File

@ -175,7 +175,7 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false)
return $result; return $result;
} }
$allowed = (($r[0]['xchan_network'] === 'zot' || $r[0]['xchan_network'] === 'rss') ? 1 : 0); $allowed = (($is_red || $r[0]['xchan_network'] === 'rss') ? 1 : 0);
$x = array('channel_id' => $uid, 'follow_address' => $url, 'xchan' => $r[0], 'allowed' => $allowed, 'singleton' => 0); $x = array('channel_id' => $uid, 'follow_address' => $url, 'xchan' => $r[0], 'allowed' => $allowed, 'singleton' => 0);

View File

@ -1 +1 @@
2016-03-16.1337H 2016-03-17.1338H