pki: Allow overriding EKU flags from certificate request via command line

The flags encoded in the PKCS#10 structure (or derived from the encoded
profile name) might not be appropriate in some instances. This allows
overriding them without having to issue a new certificate request.
This commit is contained in:
Tobias Brunner 2023-02-23 16:54:51 +01:00
parent 350101abad
commit 8325eeff06

View File

@ -482,8 +482,11 @@ static int issue()
}
req = (pkcs10_t*)cert_req;
/* Add Extended Key Usage (EKU) flags */
flags |= req->get_flags(req);
/* Add Extended Key Usage (EKU) flags if not overridden */
if (!flags)
{
flags = req->get_flags(req);
}
/* Add subjectAltNames from PKCS#10 certificate request */
enumerator = req->create_subjectAltName_enumerator(req);