login_hook
This commit is contained in:
parent
0cfc8570d2
commit
1621630b06
3 changed files with 13 additions and 6 deletions
2
boot.php
2
boot.php
|
@ -674,6 +674,8 @@ function login($register = false) {
|
|||
'$lostlink' => $lostlink
|
||||
));
|
||||
|
||||
call_hooks('login_hook',$o);
|
||||
|
||||
return $o;
|
||||
}}
|
||||
|
||||
|
|
|
@ -262,24 +262,27 @@ function aes_unencapsulate($data,$prvkey) {
|
|||
}
|
||||
|
||||
|
||||
function zot_encapsulate($data,$sender,$pubkey) {
|
||||
// This has been superceded.
|
||||
|
||||
function zot_encapsulate($data,$envelope,$pubkey) {
|
||||
$res = aes_encapsulate($data,$pubkey);
|
||||
openssl_public_encrypt($sender,$s,$pubkey);
|
||||
$s1 = base64url_encode($s,true);
|
||||
|
||||
return <<< EOT
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<zot:env xmlns:zot='http://purl.org/zot/1.0'>
|
||||
<zot:msg xmlns:zot='http://purl.org/zot/1.0'>
|
||||
<zot:key>{$res['key']}</zot:key>
|
||||
<zot:iv>{$res['iv']}</zot:iv>
|
||||
<zot:sender>$s1</zot:sender>
|
||||
<zot:env>$s1</zot:env>
|
||||
<zot:sig key_id="$keyid">$sig</zot:sig>
|
||||
<zot:alg>AES-256-CBC</zot:alg>
|
||||
<zot:data type='application/magic-envelope+xml'>{$res['data']}</zot:data>
|
||||
</zot:env>
|
||||
</zot:msg>
|
||||
EOT;
|
||||
|
||||
}
|
||||
|
||||
// so has this
|
||||
|
||||
function zot_unencapsulate($data,$prvkey) {
|
||||
$ret = array();
|
||||
$c = array();
|
||||
|
|
|
@ -20,6 +20,8 @@ function get_feed_for(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0)
|
|||
for($x = 2; $x < $a->argc; $x++) {
|
||||
if($a->argv[$x] == 'converse')
|
||||
$converse = true;
|
||||
if($a->argv[$x] == 'starred')
|
||||
$starred = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue