]> git.mxchange.org Git - friendica.git/commitdiff
login_hook
authorFriendika <info@friendika.com>
Thu, 1 Sep 2011 13:29:29 +0000 (06:29 -0700)
committerFriendika <info@friendika.com>
Thu, 1 Sep 2011 13:29:29 +0000 (06:29 -0700)
boot.php
include/crypto.php
include/items.php

index 574ac86c013799483427d3f5ae5014725d2a0487..3578f3f3334fbfcce0ad3b69fceccd52d6d8c800 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -674,6 +674,8 @@ function login($register = false) {
                '$lostlink'      => $lostlink 
        ));
 
+       call_hooks('login_hook',$o);
+
        return $o;
 }}
 
index 88e05b9eb0e34a75a2a2eff9beadfe866cf8c364..0feb45c2474b58edbb0f27e066d7c382eaf2e992 100644 (file)
@@ -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();
index 1603dec601c0c10cd6521a40e0405b6034dbd35d..6ded6f87c4cf8f0b01e0797e50e9e445d3a8a827 100644 (file)
@@ -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;
                }
        }