diff options
| author | tb <> | 2023-05-12 10:43:28 +0000 |
|---|---|---|
| committer | tb <> | 2023-05-12 10:43:28 +0000 |
| commit | 691f32f6d318c9bab9c2d738a840e54776d6d9e8 (patch) | |
| tree | 30ce8da7579c0c4ded89c5bb85dee59655008702 /src/regress/lib/libcrypto/asn1/asn1oct.c | |
| parent | a16324e54a8b77c1b2e74836e3e7d439d2ed63fd (diff) | |
| download | openbsd-691f32f6d318c9bab9c2d738a840e54776d6d9e8.tar.gz openbsd-691f32f6d318c9bab9c2d738a840e54776d6d9e8.tar.bz2 openbsd-691f32f6d318c9bab9c2d738a840e54776d6d9e8.zip | |
asn1oct: add a couple more tests
Diffstat (limited to 'src/regress/lib/libcrypto/asn1/asn1oct.c')
| -rw-r--r-- | src/regress/lib/libcrypto/asn1/asn1oct.c | 11 |
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 | }, |
