aboutsummaryrefslogtreecommitdiffstats
path: root/mod/zfinger.php
diff options
context:
space:
mode:
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']
);