aboutsummaryrefslogtreecommitdiffstats
path: root/include/zot.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2016-11-20 21:18:38 -0800
committerzotlabs <mike@macgirvin.com>2016-11-20 21:18:38 -0800
commitf926915e5622cc0e1d67feb609f9b70ea9eead1f (patch)
treef4443885dc02330c22bb0a15782d85254cf17c64 /include/zot.php
parentdda2ea8fed7e69d5382aa506d5b8324776e095aa (diff)
downloadvolse-hubzilla-f926915e5622cc0e1d67feb609f9b70ea9eead1f.tar.gz
volse-hubzilla-f926915e5622cc0e1d67feb609f9b70ea9eead1f.tar.bz2
volse-hubzilla-f926915e5622cc0e1d67feb609f9b70ea9eead1f.zip
zot: specify crypto method
Diffstat (limited to 'include/zot.php')
-rw-r--r--include/zot.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/include/zot.php b/include/zot.php
index 5c9fb4e82..792d4b688 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -147,7 +147,7 @@ function zot_build_packet($channel, $type = 'notify', $recipients = null, $remot
// Hush-hush ultra top-secret mode
if ($remote_key) {
- $data = crypto_encapsulate(json_encode($data),$remote_key);
+ $data = crypto_encapsulate(json_encode($data),$remote_key, CRYPTO_ALGORITHM);
}
return json_encode($data);
@@ -399,7 +399,8 @@ function zot_refresh($them, $channel = null, $force = false) {
'data' => $j['permissions']['data'],
'key' => $j['permissions']['key'],
'iv' => $j['permissions']['iv']),
- $channel['channel_prvkey']);
+ $channel['channel_prvkey'],
+ CRYPTO_ALGORITHM );
if($permissions)
$permissions = json_decode($permissions,true);
logger('decrypted permissions: ' . print_r($permissions,true), LOGGER_DATA, LOG_DEBUG);
@@ -1091,7 +1092,7 @@ function zot_fetch($arr) {
'secret_sig' => base64url_encode(rsa_sign($arr['secret'],get_config('system','prvkey')))
);
- $datatosend = json_encode(crypto_encapsulate(json_encode($data),$ret_hub['hubloc_sitekey']));
+ $datatosend = json_encode(crypto_encapsulate(json_encode($data),$ret_hub['hubloc_sitekey'], CRYPTO_ALGORITHM));
$fetch = zot_zot($url,$datatosend);
@@ -3913,7 +3914,7 @@ function zotinfo($arr) {
$permissions['connected'] = true;
}
- $ret['permissions'] = (($ztarget && $zkey) ? crypto_encapsulate(json_encode($permissions),$zkey) : $permissions);
+ $ret['permissions'] = (($ztarget && $zkey) ? crypto_encapsulate(json_encode($permissions),$zkey, CRYPTO_ALGORITHM) : $permissions);
if($permissions['view_profile'])
$ret['profile'] = $profile;
@@ -4317,7 +4318,7 @@ function zot_reply_pickup($data) {
}
}
- $encrypted = crypto_encapsulate(json_encode($ret),$sitekey);
+ $encrypted = crypto_encapsulate(json_encode($ret),$sitekey, CRYPTO_ALGORITHM);
json_return_and_die($encrypted);
/* pickup: end */