Tweak regress in such a way that it would have caught the bug in
authortb <tb@openbsd.org>
Fri, 13 May 2022 16:39:58 +0000 (16:39 +0000)
committertb <tb@openbsd.org>
Fri, 13 May 2022 16:39:58 +0000 (16:39 +0000)
d2i_ASN1_OBJECT() fixed in a_object.c r1.48.

from jsing

regress/lib/libcrypto/asn1/asn1object.c

index 4427225..3005fc3 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: asn1object.c,v 1.6 2022/03/19 17:37:10 jsing Exp $ */
+/* $OpenBSD: asn1object.c,v 1.7 2022/05/13 16:39:58 tb Exp $ */
 /*
  * Copyright (c) 2017, 2021, 2022 Joel Sing <jsing@openbsd.org>
  *
@@ -276,6 +276,11 @@ do_asn1_object_test(struct asn1_object_test *aot)
                fprintf(stderr, "FAIL: d2i_ASN1_OBJECT() failed\n");
                goto failed;
        }
+       if (p != aot->der + aot->der_len) {
+               fprintf(stderr, "FAIL: d2i_ASN1_OBJECT() p = %p, want %p\n",
+                   p, aot->der + aot->der_len);
+               goto failed;
+       }
 
        if (aot->txt != NULL) {
                ret = i2t_ASN1_OBJECT(buf, sizeof(buf), aobj);