mirror of
https://github.com/openbsd/src.git
synced 2025-01-10 06:47:55 -08:00
asn1oct: add a couple more tests
This commit is contained in:
parent
d6fa391bda
commit
193c648312
@ -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 <tb@openbsd.org>
|
||||
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user