diff options
author | Mike Macgirvin <mike@macgirvin.com> | 2010-10-11 23:22:38 -0700 |
---|---|---|
committer | Mike Macgirvin <mike@macgirvin.com> | 2010-10-11 23:22:38 -0700 |
commit | b9d768972e94dfa5e1511779726091214dece5cf (patch) | |
tree | 6d0f25ec30afa8801506818e427d434e96fe36f5 /mod/register.php | |
parent | 6b67d00fce5daaa26afa738beb06a91a4b10ccac (diff) | |
download | volse-hubzilla-b9d768972e94dfa5e1511779726091214dece5cf.tar.gz volse-hubzilla-b9d768972e94dfa5e1511779726091214dece5cf.tar.bz2 volse-hubzilla-b9d768972e94dfa5e1511779726091214dece5cf.zip |
added 's' keys - salmon keys, small keys, stupid keys, whatever...
Diffstat (limited to 'mod/register.php')
-rw-r--r-- | mod/register.php | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/mod/register.php b/mod/register.php index d65c154a8..a2cae9961 100644 --- a/mod/register.php +++ b/mod/register.php @@ -109,15 +109,31 @@ function register_post(&$a) { $pkey = openssl_pkey_get_details($res); $pubkey = $pkey["key"]; + $sres=openssl_pkey_new(array( + 'encrypt_key' => false )); + + // Get private key + + $sprvkey = ''; + + openssl_pkey_export($sres, $sprvkey); + + // Get public key + + $spkey = openssl_pkey_get_details($sres); + $spubkey = $spkey["key"]; + $r = q("INSERT INTO `user` ( `username`, `password`, `email`, `nickname`, - `pubkey`, `prvkey`, `verified`, `blocked` ) - VALUES ( '%s', '%s', '%s', '%s', '%s', '%s', %d, %d )", + `pubkey`, `prvkey`, `spubkey`, `sprvkey`, `verified`, `blocked` ) + VALUES ( '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d )", dbesc($username), dbesc($new_password_encoded), dbesc($email), dbesc($nickname), dbesc($pubkey), dbesc($prvkey), + dbesc($spubkey), + dbesc($sprvkey), intval($verified), intval($blocked) ); |