aboutsummaryrefslogtreecommitdiffstats
path: root/include/salmon.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-07-11 16:54:18 -0700
committerfriendica <info@friendica.com>2012-07-11 16:54:18 -0700
commit3f414aec63257f7e9e6aa19671502794f9c1d524 (patch)
treea4be655071e84b81b3674c3bb9acddfe5306d89a /include/salmon.php
parent71afdf3d9c8cce686f0b996f4ab08e480edfc5d0 (diff)
downloadvolse-hubzilla-3f414aec63257f7e9e6aa19671502794f9c1d524.tar.gz
volse-hubzilla-3f414aec63257f7e9e6aa19671502794f9c1d524.tar.bz2
volse-hubzilla-3f414aec63257f7e9e6aa19671502794f9c1d524.zip
get rid of special "short salmon key" for statusnet
Diffstat (limited to 'include/salmon.php')
-rw-r--r--include/salmon.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/salmon.php b/include/salmon.php
index 3d525f51a..ae885dcab 100644
--- a/include/salmon.php
+++ b/include/salmon.php
@@ -74,7 +74,7 @@ function slapper($owner,$url,$slap) {
return;
- if(! $owner['sprvkey']) {
+ if(! $owner['prvkey']) {
logger(sprintf("slapper: user '%s' (%d) does not have a salmon private key. Send failed.",
$owner['username'],$owner['uid']));
return;
@@ -103,17 +103,17 @@ EOT;
$data_type = 'application/atom+xml';
$encoding = 'base64url';
$algorithm = 'RSA-SHA256';
- $keyhash = base64url_encode(hash('sha256',salmon_key($owner['spubkey'])),true);
+ $keyhash = base64url_encode(hash('sha256',salmon_key($owner['pubkey'])),true);
// precomputed base64url encoding of data_type, encoding, algorithm concatenated with periods
$precomputed = '.YXBwbGljYXRpb24vYXRvbSt4bWw=.YmFzZTY0dXJs.UlNBLVNIQTI1Ng==';
- $signature = base64url_encode(rsa_sign(str_replace('=','',$data . $precomputed),$owner['sprvkey']));
+ $signature = base64url_encode(rsa_sign(str_replace('=','',$data . $precomputed),$owner['prvkey']));
- $signature2 = base64url_encode(rsa_sign($data . $precomputed,$owner['sprvkey']));
+ $signature2 = base64url_encode(rsa_sign($data . $precomputed,$owner['prvkey']));
- $signature3 = base64url_encode(rsa_sign($data,$owner['sprvkey']));
+ $signature3 = base64url_encode(rsa_sign($data,$owner['prvkey']));
$salmon_tpl = get_markup_template('magicsig.tpl');