convert our native pkcs#8 to pkcs#1 for diaspora-public-key xrd field

This commit is contained in:
Friendika 2011-07-30 01:03:24 -07:00
parent 01703f3be6
commit 60caffcd77
2 changed files with 6 additions and 1 deletions

View File

@ -121,6 +121,10 @@ function rsatopem($key) {
return(metopem($m,$e));
}
function pemtorsa($key) {
pemtome($key,$m,$e);
return(metorsa($m,$e));
}
function pemtome($key,&$m,&$e) {
require_once('include/salmon.php');

View File

@ -1,6 +1,7 @@
<?php
require_once('salmon.php');
require_once('certfns.php');
function xrd_content(&$a) {
@ -34,7 +35,7 @@ function xrd_content(&$a) {
$dspr = replace_macros($tpl,array(
'$baseurl' => $a->get_baseurl(),
'$dspr_guid' => $r[0]['guid'],
'$dspr_key' => base64_encode($r[0]['pubkey'])
'$dspr_key' => base64_encode(pemtorsa($r[0]['pubkey']))
));
}
else