note 87880 added to function.openssl-csr-new

From: Date: Sun, 28 Dec 2008 17:52:10 +0000
Subject: note 87880 added to function.openssl-csr-new
Groups: php.notes 
Request: Send a blank email to php-notes+get-148621@lists.php.net to get a copy of this message
*hint* openssl_csr_new() automatically generates private key / public key pair: <?php $configargs = array( 'config' => '/etc/ssl/openssl.cnf', 'digest_alg' => 'md5', 'x509_extensions' => 'v3_ca', 'req_extensions' => 'v3_req', 'private_key_bits' => 666, 'private_key_type' => OPENSSL_KEYTYPE_RSA, 'encrypt_key' => false, ); $dn = array( "countryName" => "DE", "stateOrProvinceName" => "wubbla wubbla", "localityName" => "wubbla", "organizationName" => "Internet Widgits Pty Ltd", "organizationalUnitName" => "Organizational Unit Name", "commonName" => "example.com", "emailAddress" => "Email Address" ); $privkey = null; // <--- !! $csr = openssl_csr_new($dn, $privkey, $configargs); var_dump(openssl_pkey_get_details($privkey)); /* array(3) { ["bits"]=> int(666) ["key"]=> string(207) "-----BEGIN PUBLIC KEY----- MG8wDQYJKoZIhvcN (...) gMBAAE= -----END PUBLIC KEY----- " ["type"]=> int(0) } */ ?> ---- Server IP: 217.13.201.10 Probable Submitter: 87.158.6.75 ---- Manual Page -- http://www.php.net/manual/en/function.openssl-csr-new.php Edit -- https://master.php.net/note/edit/87880 Del: integrated -- https://master.php.net/note/delete/87880/integrated Del: useless -- https://master.php.net/note/delete/87880/useless Del: bad code -- https://master.php.net/note/delete/87880/bad+code Del: spam -- https://master.php.net/note/delete/87880/spam Del: non-english -- https://master.php.net/note/delete/87880/non-english Del: in docs -- https://master.php.net/note/delete/87880/in+docs Del: other reasons-- https://master.php.net/note/delete/87880 Reject -- https://master.php.net/note/reject/87880 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#148621) next »