diff options
author | friendica <info@friendica.com> | 2012-09-09 21:17:06 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-09-09 21:17:06 -0700 |
commit | 3ebb4a3dc7a369e7a716ab93d02b44b20522080f (patch) | |
tree | 5b8daecf7a29c6fe2f0c8572204d9e2bd1713a50 /mod/zfinger.php | |
parent | a08666be142c484134c2f10cf0c460c8a3c07682 (diff) | |
download | volse-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.php | 6 |
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'] ); |