X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fhostxrd.php;h=fe61a874c36ad952f034fd57fb183634a3073036;hb=906addf865ccab2c98d5035fc6c1b10d43004dfe;hp=c7861d26d0d19264a6276c824beef7fea28ee9f2;hpb=bdf42473a0341f291cd256323d122aa80bb0cb0b;p=friendica.git diff --git a/mod/hostxrd.php b/mod/hostxrd.php index c7861d26d0..fe61a874c3 100644 --- a/mod/hostxrd.php +++ b/mod/hostxrd.php @@ -1,10 +1,38 @@ 'sha1', + 'private_key_bits' => 4096, + 'encrypt_key' => false )); + + + $prvkey = ''; + + openssl_pkey_export($res, $prvkey); + + // Get public key + + $pkey = openssl_pkey_get_details($res); + $pubkey = $pkey["key"]; + + set_config('system','site_prvkey', $prvkey); + set_config('system','site_pubkey', $pubkey); + } + $tpl = file_get_contents('view/xrd_host.tpl'); - echo str_replace(array('$zroot','$domain'),array(z_root(),z_path()),$tpl); + echo str_replace(array( + '$zhost','$zroot','$domain','$zot_post','$bigkey'),array($a->get_hostname(),z_root(),z_path(),z_root() . '/post', salmon_key(get_config('system','site_pubkey'))),$tpl); session_write_close(); exit();