Utilizziamo una CA che si aspetta un challengePassword , quindi ho impostato un openssl.cnf come questo:
oid_section = OIDs [ req ] distinguished_name = req_distinguished_name attributes = req_attributes req_extensions = v3_req [ OIDs ] RequestProfile = 1.3.6.1.4.1.311.20.2 [ req_distinguished_name ] commonName = Common Name organizationalUnitName = Organizational Unit Name organizationName = Organization Name localityName = Locality Name stateOrProvinceName = State or Province Name countryName = Country [ v3_req ] basicConstraints = CA:FALSE keyUsage = digitalSignature, keyEncipherment subjectKeyIdentifier = hash subjectAltName = @alt_names RequestProfile = ASN1:BMP:tlsserver [ alt_names ] IP = 192.168.0.1 DNS = test.unit.org.ch [ req_attributes ] challengePassword = ChallengePassword
Ho creato una richiesta di certificato con
openssl req \ -new -keyout test.key -out test.csr \ -subj /C=ch/ST=BE/L=Berne/O=org/OU=unit/CN=test.unit.org.ch \ -newkey rsa:2048 -nodes -config openssl.cnf
Per quanto ne so, test.csr sembra generalmente soddisfacente, tranne che l'elenco Attributes è vuoto. Mi aspettavo di vedere la password della sfida lì:
[simon@centos Projects]$ openssl req -noout -text -in test.csr
Certificate Request:
Data:
Version: 0 (0x0)
Subject: C=ch, ST=BE, L=Berne, O=org, OU=unit, CN=test.unit.org.ch
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (2048 bit)
Modulus:
00:ce:b2:52:74:40:5e:c4:73:13:2a:08:ec:94:ea:
[...]
Exponent: 65537 (0x10001)
Attributes:
Requested Extensions:
X509v3 Basic Constraints:
CA:FALSE
X509v3 Key Usage:
Digital Signature, Key Encipherment
X509v3 Subject Key Identifier:
37:1E:95:70:3B:27:BA:8F:09:77:E4:42:DD:FD:A8:DD:29:01:F0:51
X509v3 Subject Alternative Name:
IP Address:192.168.0.1, DNS:test.unit.org.ch
1.3.6.1.4.1.311.20.2:
...t.l.s.s.e.r.v.e.r
Signature Algorithm: sha256WithRSAEncryption
0b:5e:96:a2:83:b0:d5:08:1f:d0:34:e3:d4:c4:37:53:f2:28:
[...]
Questo è con OpenSSL versione 1.0.2k (CentOS 7.5), ma succede anche su RHEL 7.3 con la versione 1.0.1e.
Probabilmente fraintendo qualcosa di molto semplice - qualcuno potrebbe darmi un suggerimento?