I was playing a little bit with signature algorithms, trying to determine which CAs among the ones I use are currently issuing SHA2 certificates.
I generated a CSR specifying the SHA256 hash (either using gnutls-certtool
with the hash
param and openssl req
with the -sha256
param) and the CSR is clearly displaying sha256WithRSAEncryption
as the signature algorithm.
$ openssl req -noout -text -in test.csr
Certificate Request:
...
Signature Algorithm: sha256WithRSAEncryption
...
However, the resulted certificate from the CA is hashed with sha1WithRSAEncryption
.
$ openssl x509 -noout -text -in test.crt
Certificate:
Data:
Version: 3 (0x2)
Serial Number: ... (...)
Signature Algorithm: sha1WithRSAEncryption
Of course, generating a CSR with --hash SHA1
(sha1WithRSAEncryption
hash) will cause the resulting certificate to use sha1WithRSAEncryption
(as expected).
The CA states that the hash should be specified as part of the order, not of the CSR (which is something I can't do in any case given I'm submitting the order via a third party service).
Hence the question. Should the CA obey to the hash algorithm specified in the CSR?