OpenSSL: always provide OBJ_create() with name strings.

Some versions of OpenSSL seem to go back and forth as to whether NULL
for these names are okay.  Don't risk it.

Signed-off-by: Peter Jones <pjones@redhat.com>
Upstream-commit-id: 46b76a01717
This commit is contained in:
Peter Jones 2019-01-15 18:04:34 -05:00
parent 5d30a31fef
commit 44b211bcf7

4
shim.c
View File

@ -388,7 +388,9 @@ static BOOLEAN verify_eku(UINT8 *Cert, UINTN CertSize)
EXTENDED_KEY_USAGE *eku; EXTENDED_KEY_USAGE *eku;
ASN1_OBJECT *module_signing; ASN1_OBJECT *module_signing;
module_signing = OBJ_nid2obj(OBJ_create(OID_EKU_MODSIGN, NULL, NULL)); module_signing = OBJ_nid2obj(OBJ_create(OID_EKU_MODSIGN,
"modsign-eku",
"modsign-eku"));
x509 = d2i_X509 (NULL, &Temp, (long) CertSize); x509 = d2i_X509 (NULL, &Temp, (long) CertSize);
if (x509 != NULL) { if (x509 != NULL) {