Bug #80269 [NEW]: OpenSSL sets Subject wrong with extraattribs parameter
| From: | tom dot schillemans at fasterforward dot nl | Date: | Thu, 22 Oct 2020 08:59:58 +0000 |
| Subject: | Bug #80269 [NEW]: OpenSSL sets Subject wrong with extraattribs parameter | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-229851@lists.php.net to get a copy of this message | ||
From: tom dot schillemans at fasterforward dot nl
Operating system: Ubuntu 14.4 / Windows 10
PHP version: 7.4.11
Package: OpenSSL related
Bug Type: Bug
Bug description:OpenSSL sets Subject wrong with extraattribs parameter
Description:
------------
I want to create a Certificate Sign Request with OpenSSL.
To do this I have the test code provided in the gist.
As you can see in the results I am getting, the openssl library also
puts the extraattribs in the subject.
When I use the OpenSSL cli tool it does not do that using the exact same
config file.
Test script:
---------------
https://gist.github.com/TomSchillemans/f3cb9668ae1878f699032e1acb5486a9
Expected result:
----------------
Certificate Request:
Data:
Version: 1 (0x0)
Subject: C = NL, ST = ST, L = L, O = O, CN = 2013
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
RSA Public-Key: (2048 bit)
Modulus:
00:b2:28:99:92:71:f0:0a:03:70:10:29:ba:50:53:
...
35:9b
Exponent: 65537 (0x10001)
Attributes:
streetAddress :
postalCode :
facsimileTelephoneNumber :
telephoneNumber :012345678
1.3.6.1.4.1.11278.1150.2.1:12345678
1.3.6.1.4.1.11278.1150.2.2:20128551
name :Organisation
emailAddress :info@example.com
Requested Extensions:
X509v3 Basic Constraints:
CA:FALSE
Signature Algorithm: sha256WithRSAEncryption
30:de:00:b2:5d:c3:23:c1:12:2e:62:7b:2f:a1:29:4f:36:8d:
...
2c:0c:70:9f
Actual result:
--------------
Certificate Request:
Data:
Version: 1 (0x0)
Subject: C = NL, ST = ST, L = L, O = O, CN = 2013,
facsimileTelephoneNumber = , postalCode = , street = , name =
Organisation, telephoneNumber = 012345678, 1.3.6.1.4.1.11278.1150.2.1 =
001564, 1.3.6.1.4.1.11278.1150.2.2 = 12345678, emailAddress =
info@example.com
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
RSA Public-Key: (2048 bit)
Modulus:
00:b2:28:99:92:71:f0:0a:03:70:10:29:ba:50:53:
...
35:9b
Exponent: 65537 (0x10001)
Attributes:
streetAddress :
postalCode :
facsimileTelephoneNumber :
telephoneNumber :012345678
1.3.6.1.4.1.11278.1150.2.1:12345678
1.3.6.1.4.1.11278.1150.2.2:20128551
name :Organisation
emailAddress :info@example.com
Requested Extensions:
X509v3 Basic Constraints:
CA:FALSE
Signature Algorithm: sha256WithRSAEncryption
30:de:00:b2:5d:c3:23:c1:12:2e:62:7b:2f:a1:29:4f:36:8d:
...
2c:0c:70:9f
--
Edit bug report at https://bugs.php.net/bug.php?id=80269&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=80269&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=80269&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=80269&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=80269&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=80269&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=80269&r=support
Expected behavior: https://bugs.php.net/fix.php?id=80269&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=80269&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=80269&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=80269&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=80269&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=80269&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=80269&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=80269&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=80269&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=80269&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=80269&r=mysqlcfg