From ed56b6e67b27900e2ff413a7781c9095aa8251a0 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Sat, 21 May 2016 18:02:14 -0700 Subject: first cut at zot-finger request signatures --- include/zot.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/zot.php') diff --git a/include/zot.php b/include/zot.php index 54a3fe640..f5fb87e12 100644 --- a/include/zot.php +++ b/include/zot.php @@ -3672,6 +3672,8 @@ function zotinfo($arr) { $zsig = ((x($arr,'target_sig')) ? $arr['target_sig'] : ''); $zkey = ((x($arr,'key')) ? $arr['key'] : ''); $mindate = ((x($arr,'mindate')) ? $arr['mindate'] : ''); + $token = ((x($arr,'token')) ? $arr['token'] : ''); + $feed = ((x($arr,'feed')) ? intval($arr['feed']) : 0); if($ztarget) { @@ -3816,6 +3818,10 @@ function zotinfo($arr) { // Communication details + if($token) + $ret['signed_token'] = base64url_encode(rsa_sign($token,$e['channel_prvkey'])); + + $ret['guid'] = $e['xchan_guid']; $ret['guid_sig'] = $e['xchan_guid_sig']; $ret['key'] = $e['xchan_pubkey']; -- cgit v1.2.3