From: tb Date: Fri, 12 May 2023 10:43:28 +0000 (+0000) Subject: asn1oct: add a couple more tests X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=193c648312d20f36f7bfd5fae87174bce41c7c6b;p=openbsd asn1oct: add a couple more tests --- diff --git a/regress/lib/libcrypto/asn1/asn1oct.c b/regress/lib/libcrypto/asn1/asn1oct.c index a61e6edbc15..fef312d739b 100644 --- a/regress/lib/libcrypto/asn1/asn1oct.c +++ b/regress/lib/libcrypto/asn1/asn1oct.c @@ -1,4 +1,4 @@ -/* $OpenBSD: asn1oct.c,v 1.2 2023/05/12 08:56:05 tb Exp $ */ +/* $OpenBSD: asn1oct.c,v 1.3 2023/05/12 10:43:28 tb Exp $ */ /* * Copyright (c) 2023 Theo Buehler @@ -155,6 +155,11 @@ static const struct s2i_asn1_octet_string_test { .in = "", .want = "", }, + { + .desc = "only colons", + .in = ":::::::", + .want = "", + }, { .desc = "a 0 octet", .in = "00", @@ -205,6 +210,10 @@ static const struct s2i_asn1_octet_string_test { .desc = "non-hex digit", .in = "g00d", }, + { + .desc = "non-hex digits", + .in = "d0gged", + }, { .desc = "trailing non-hex digit", .in = "d00der",