Ensure .cer and .crl outside-TBS signatures are sha256WithRSAEncryption
authorjob <job@openbsd.org>
Mon, 6 Mar 2023 16:58:41 +0000 (16:58 +0000)
committerjob <job@openbsd.org>
Mon, 6 Mar 2023 16:58:41 +0000 (16:58 +0000)
commit7c9af4b7eaaa3b811785cd7dad8a5d57dfe9e260
treec71689d348ddf95b196c7ff67f7df30c3ab915a1
parent96dd31e7b62d15dd951185cbbf5ff65f6790ec57
Ensure .cer and .crl outside-TBS signatures are sha256WithRSAEncryption

Note: there is a potential for confusion in RFC 7935, the specification
differentiates between 2 contexts: "in the certificate" and "CMS SignedData".

In the CMS context, either rsaEncryption or sha256WithRSAEncryption can
appear (and both *do* appear in the wild).

However, RFC 7935 section 2 fourth paragraph starting with "In certificates,
CRLs, ..." mandates that sha256WithRSAEncryption is used to sign .cer and
.crl files:

    "The Object Identifier (OID) sha256WithRSAEncryption from RFC4055 MUST
    be used in these products."

The above requirement matches observations on existing RPKI deployments.

OK tb@
usr.sbin/rpki-client/cert.c
usr.sbin/rpki-client/crl.c