aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-03-17 12:15:28 -0700
committerredmatrix <git@macgirvin.com>2016-03-17 12:15:28 -0700
commitf82afca84d19ba87cd911ec28638fb45a7f7e6f0 (patch)
tree9bd43ec950f6a66be323542b083475a5a171bf17 /include
parenta83cdbeb39a915f77d24b316ce63197e0f5ca2d3 (diff)
downloadvolse-hubzilla-f82afca84d19ba87cd911ec28638fb45a7f7e6f0.tar.gz
volse-hubzilla-f82afca84d19ba87cd911ec28638fb45a7f7e6f0.tar.bz2
volse-hubzilla-f82afca84d19ba87cd911ec28638fb45a7f7e6f0.zip
no xchan here if using zot protocol
Diffstat (limited to 'include')
-rw-r--r--include/crypto.php4
-rw-r--r--include/follow.php2
2 files changed, 4 insertions, 2 deletions
diff --git a/include/crypto.php b/include/crypto.php
index 94a6b4a58..3cddc7581 100644
--- a/include/crypto.php
+++ b/include/crypto.php
@@ -23,7 +23,8 @@ function rsa_verify($data,$sig,$key,$alg = 'sha256') {
$verify = @openssl_verify($data,$sig,$key,$alg);
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);
// provide a backtrace so that we can debug key issues
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) {
$der = pkcs8_encode($m,$e);
$key = DerToPem($der,false);
diff --git a/include/follow.php b/include/follow.php
index a428bd2a3..e71b0c713 100644
--- a/include/follow.php
+++ b/include/follow.php
@@ -175,7 +175,7 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false)
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);