Bug #71050 [NEW]: SubjectAltName (SAN) is Not included in openssl_csr_sign of a new CSR

From: Date: Mon, 07 Dec 2015 12:37:09 +0000
Subject: Bug #71050 [NEW]: SubjectAltName (SAN) is Not included in openssl_csr_sign of a new CSR
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-197660@lists.php.net to get a copy of this message
From: jimmmaaay at hotmail dot com Operating system: Windows & CentOS 6.7 PHP version: 7.0.0 Package: OpenSSL related Bug Type: Bug Bug description:SubjectAltName (SAN) is Not included in openssl_csr_sign of a new CSR Description: ------------ When creating a new CSR and self-signing it. The SAN (Subject Alternative Name) is not included . --- From manual page: http://www.php.net/function.openssl-csr-sign --- Test script: --------------- $certificate_key_private_resource=openssl_pkey_new(["digest_alg"=>"sha256","private_key_bits"=>2048,"private_key_type"=>OPENSSL_KEYTYPE_RSA]); $csr=openssl_csr_new(["countryName"=>'CA',"stateOrProvinceName"=>'State',"localityName"=>'City',"organizationName"=>'Company','organizationalUnitName'=>'Unit',"commonName"=>'example.org',"emailAddress"=>'email@email.com'],$certificate_key_private_resource,['config'=>'CUSTOM_CONFIG_FILE_PATH']); $sscert=openssl_csr_sign($csr,null,$certificate_key_private_resource,365);openssl_x509_export($sscert,$c,false); echo $c; ---------------------------- OPENSSL CUSTOM CONFIG FILE ---------------------------- [ req ] default_bits = 2048 default_keyfile = privkey.pem distinguished_name = req_distinguished_name req_extensions = req_ext [ req_distinguished_name ] countryName = Country Name (2 letter code) countryName_default = US stateOrProvinceName = State or Province Name (full name) stateOrProvinceName_default = Illinois localityName = Locality Name (eg, city) localityName_default = Chicago organizationName = Organization Name (eg, company) organizationName_default = Example, Co. commonName = Common Name (eg, YOUR name) commonName_max = 64 [ req_ext ] subjectAltName = @alt_names [alt_names] DNS.1 = exmaple.org DNS.2 = www.example.org ---------------------------- OPENSSL CUSTOM CONFIG FILE END ---------------------------- Expected result: ---------------- outputted cert should contain Subject Alternative Name Actual result: -------------- outputted cert does not contain Subject Alternative Name -- Edit bug report at https://bugs.php.net/bug.php?id=71050&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=71050&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=71050&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=71050&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=71050&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=71050&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=71050&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=71050&r=needscript Try newer version: https://bugs.php.net/fix.php?id=71050&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=71050&r=support Expected behavior: https://bugs.php.net/fix.php?id=71050&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=71050&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=71050&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=71050&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71050&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=71050&r=dst IIS Stability: https://bugs.php.net/fix.php?id=71050&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=71050&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=71050&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=71050&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=71050&r=mysqlcfg

« previous php.bugs (#197660) next »