aboutsummaryrefslogtreecommitdiffstats
path: root/mod/register.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-01-02 14:12:22 -0800
committerFriendika <info@friendika.com>2011-01-02 14:12:22 -0800
commit4f796c68d2db16813b0115f8b7f983326b9a072d (patch)
tree31cecddb8374365b332b2fd152df3d14da7f3419 /mod/register.php
parentbe3cfe8b65031103b195854e0770ed6b3f57d9a1 (diff)
downloadvolse-hubzilla-4f796c68d2db16813b0115f8b7f983326b9a072d.tar.gz
volse-hubzilla-4f796c68d2db16813b0115f8b7f983326b9a072d.tar.bz2
volse-hubzilla-4f796c68d2db16813b0115f8b7f983326b9a072d.zip
declare key size/algorithm to ensure key gets generated
Diffstat (limited to 'mod/register.php')
-rw-r--r--mod/register.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/mod/register.php b/mod/register.php
index bd169fbbb..68c7297c9 100644
--- a/mod/register.php
+++ b/mod/register.php
@@ -123,7 +123,20 @@ function register_post(&$a) {
$pkey = openssl_pkey_get_details($res);
$pubkey = $pkey["key"];
+ /**
+ *
+ * Create another keypair for signing/verifying
+ * salmon protocol messages. We have to use a slightly
+ * less robust key because this won't be using openssl
+ * but the phpseclib. Since it is PHP interpreted code
+ * it is not nearly as efficient, and the larger keys
+ * will take several minutes each to process.
+ *
+ */
+
$sres=openssl_pkey_new(array(
+ 'digest_alg' => 'sha1',
+ 'private_key_bits' => 512,
'encrypt_key' => false ));
// Get private key