aboutsummaryrefslogtreecommitdiffstats
path: root/mod/zfinger.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-09-09 21:17:06 -0700
committerfriendica <info@friendica.com>2012-09-09 21:17:06 -0700
commit3ebb4a3dc7a369e7a716ab93d02b44b20522080f (patch)
tree5b8daecf7a29c6fe2f0c8572204d9e2bd1713a50 /mod/zfinger.php
parenta08666be142c484134c2f10cf0c460c8a3c07682 (diff)
downloadvolse-hubzilla-3ebb4a3dc7a369e7a716ab93d02b44b20522080f.tar.gz
volse-hubzilla-3ebb4a3dc7a369e7a716ab93d02b44b20522080f.tar.bz2
volse-hubzilla-3ebb4a3dc7a369e7a716ab93d02b44b20522080f.zip
updates
Diffstat (limited to 'mod/zfinger.php')
-rw-r--r--mod/zfinger.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/mod/zfinger.php b/mod/zfinger.php
index 550d613b5..66dcb16f6 100644
--- a/mod/zfinger.php
+++ b/mod/zfinger.php
@@ -3,6 +3,7 @@
function zfinger_init(&$a) {
require_once('include/zot.php');
+ require_once('include/crypto.php');
$ret = array('success' => false);
@@ -49,7 +50,7 @@ function zfinger_init(&$a) {
// Communication details
$ret['guid'] = $e['entity_global_id'];
- $ret['guid_sig'] = base64url_encode($e['entity_global_id'],$e['entity_prvkey']);
+ $ret['guid_sig'] = base64url_encode(rsa_sign($e['entity_global_id'],$e['entity_prvkey']));
$ret['key'] = $e['entity_pubkey'];
$ret['name'] = $e['entity_name'];
$ret['address'] = $e['entity_address'];
@@ -66,7 +67,8 @@ function zfinger_init(&$a) {
$ret['hubs'][] = array(
'primary' => (($hub['hubloc_flags'] & HUBLOC_FLAGS_PRIMARY) ? true : false),
'url' => $hub['hubloc_url'],
- 'url_sig' => base64url_encode($hub['hubloc_url'],$e['entity_prvkey']),
+ /// hmmm we probably shouldn't sign somebody else's hub. FIXME
+ 'url_sig' => base64url_encode(rsa_sign($hub['hubloc_url'],$e['entity_prvkey'])),
'callback' => $hub['hubloc_callback'],
'sitekey' => $hub['hubloc_sitekey']
);