From afaf9ec74fe0662de76deabd11d630f871802579 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 20 May 2012 18:30:02 -0700 Subject: rev update --- mod/dfrn_confirm.php | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'mod/dfrn_confirm.php') diff --git a/mod/dfrn_confirm.php b/mod/dfrn_confirm.php index 227d72cbf..093993bbc 100644 --- a/mod/dfrn_confirm.php +++ b/mod/dfrn_confirm.php @@ -144,19 +144,12 @@ function dfrn_confirm_post(&$a,$handsfree = null) { * worried about key leakage than anybody cracking it. * */ + require_once('include/crypto.php'); - $res = openssl_pkey_new(array( - 'digest_alg' => 'sha1', - 'private_key_bits' => 4096, - 'encrypt_key' => false ) - ); - - $private_key = ''; - - openssl_pkey_export($res, $private_key); + $res = new_keypair(1024); - $pubkey = openssl_pkey_get_details($res); - $public_key = $pubkey["key"]; + $private_key = $res['prvkey']; + $public_key = $res['pubkey']; // Save the private key. Send them the public key. -- cgit v1.2.3