note 104439 modified in function.openssl-pkey-get-public by danbrown
| From: | danbrown@php.net | Date: | Wed, 15 Jun 2011 16:49:05 +0000 |
| Subject: | note 104439 modified in function.openssl-pkey-get-public by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-180555@lists.php.net to get a copy of this message | ||
found the cert/public key for 2048 bits is this format:
-----BEGIN PUBLIC KEY-----
X509 signature + PEM sig + modulus + 'ID' + exponent
-----END PUBLIC KEY-----
so the variables are:
-----BEGIN PUBLIC KEY-----
'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A' . 'MIIBCgKCAQEA' . $modulus . 'ID'
. $exponent
-----END PUBLIC KEY-----
<?php wordwrap($cert, 64, "\r\n", true); ?>
--was--
found the cert/public key for 2048 bits is this format:
-----BEGIN PUBLIC KEY-----
X509 signature + PEM sig + modulus + 'ID' + exponent
-----END PUBLIC KEY-----
so the variables are:
-----BEGIN PUBLIC KEY-----
'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A' . 'MIIBCgKCAQEA' . $modulus . 'ID'
. $exponent
-----END PUBLIC KEY-----
wordwrap($cert, 64, "\r\n", true);
http://php.net/manual/en/function.openssl-pkey-get-public.php