From 3ebb4a3dc7a369e7a716ab93d02b44b20522080f Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 9 Sep 2012 21:17:06 -0700 Subject: updates --- mod/zfinger.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'mod/zfinger.php') 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'] ); -- cgit v1.2.3