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.
}
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);