From: jsing Date: Fri, 11 Feb 2022 16:39:50 +0000 (+0000) Subject: Test OBJ_obj2nid() with an undefined (NID_undef) object. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=5829123c5c857862e2852cdda095b861b28e6fd4;p=openbsd Test OBJ_obj2nid() with an undefined (NID_undef) object. --- diff --git a/regress/lib/libcrypto/objects/objectstest.c b/regress/lib/libcrypto/objects/objectstest.c index 1a9674cb484..c1890d8a96a 100644 --- a/regress/lib/libcrypto/objects/objectstest.c +++ b/regress/lib/libcrypto/objects/objectstest.c @@ -1,4 +1,4 @@ -/* $OpenBSD: objectstest.c,v 1.1 2022/02/11 16:34:23 jsing Exp $ */ +/* $OpenBSD: objectstest.c,v 1.2 2022/02/11 16:39:50 jsing Exp $ */ /* * Copyright (c) 2017, 2022 Joel Sing * @@ -211,7 +211,7 @@ obj_nid_test(struct obj_test *ot) int nid; int failed = 1; - if (ot->nid == NID_undef) + if (ot->nid == NID_undef && ot->oid != NULL) return 0; if ((obj = OBJ_nid2obj(ot->nid)) == NULL) {