summaryrefslogtreecommitdiff
path: root/src/regress/lib
diff options
context:
space:
mode:
authortb <>2023-05-12 10:43:28 +0000
committertb <>2023-05-12 10:43:28 +0000
commitc68792ad5f1a5c23b89cce981773d589934ec0f5 (patch)
tree30ce8da7579c0c4ded89c5bb85dee59655008702 /src/regress/lib
parent2dc9b70a8ac534811265e7db816fc1f998b8c590 (diff)
downloadopenbsd-c68792ad5f1a5c23b89cce981773d589934ec0f5.tar.gz
openbsd-c68792ad5f1a5c23b89cce981773d589934ec0f5.tar.bz2
openbsd-c68792ad5f1a5c23b89cce981773d589934ec0f5.zip
asn1oct: add a couple more tests
Diffstat (limited to 'src/regress/lib')
-rw-r--r--src/regress/lib/libcrypto/asn1/asn1oct.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/regress/lib/libcrypto/asn1/asn1oct.c b/src/regress/lib/libcrypto/asn1/asn1oct.c
index a61e6edbc1..fef312d739 100644
--- a/src/regress/lib/libcrypto/asn1/asn1oct.c
+++ b/src/regress/lib/libcrypto/asn1/asn1oct.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: asn1oct.c,v 1.2 2023/05/12 08:56:05 tb Exp $ */ 1/* $OpenBSD: asn1oct.c,v 1.3 2023/05/12 10:43:28 tb Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2023 Theo Buehler <tb@openbsd.org> 4 * Copyright (c) 2023 Theo Buehler <tb@openbsd.org>
@@ -156,6 +156,11 @@ static const struct s2i_asn1_octet_string_test {
156 .want = "", 156 .want = "",
157 }, 157 },
158 { 158 {
159 .desc = "only colons",
160 .in = ":::::::",
161 .want = "",
162 },
163 {
159 .desc = "a 0 octet", 164 .desc = "a 0 octet",
160 .in = "00", 165 .in = "00",
161 .want = "00", 166 .want = "00",
@@ -206,6 +211,10 @@ static const struct s2i_asn1_octet_string_test {
206 .in = "g00d", 211 .in = "g00d",
207 }, 212 },
208 { 213 {
214 .desc = "non-hex digits",
215 .in = "d0gged",
216 },
217 {
209 .desc = "trailing non-hex digit", 218 .desc = "trailing non-hex digit",
210 .in = "d00der", 219 .in = "d00der",
211 }, 220 },