summaryrefslogtreecommitdiff
path: root/regress/lib/libcrypto
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2022-03-19 17:37:11 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2022-03-19 17:37:11 +0000
commit3d61ea903d018f376c126f03f1d53081f872b5b7 (patch)
tree2cb8d3f30fb96f389c46f72fe29fe99c617edcdd /regress/lib/libcrypto
parent236e3d83b92c1d781f72c8e6c0b5de76d0c4d298 (diff)
Revise regress for ascii/text to ASN.1 object conversion rewrite.
Diffstat (limited to 'regress/lib/libcrypto')
-rw-r--r--regress/lib/libcrypto/asn1/asn1object.c68
1 files changed, 10 insertions, 58 deletions
diff --git a/regress/lib/libcrypto/asn1/asn1object.c b/regress/lib/libcrypto/asn1/asn1object.c
index ccaad4e9cfa..4427225b5f3 100644
--- a/regress/lib/libcrypto/asn1/asn1object.c
+++ b/regress/lib/libcrypto/asn1/asn1object.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: asn1object.c,v 1.5 2022/03/19 16:23:17 jsing Exp $ */
+/* $OpenBSD: asn1object.c,v 1.6 2022/03/19 17:37:10 jsing Exp $ */
/*
* Copyright (c) 2017, 2021, 2022 Joel Sing <jsing@openbsd.org>
*
@@ -119,18 +119,6 @@ struct asn1_object_test asn1_object_tests[] = {
.der_len = 5,
},
{
- .oid = "2.5 4.10",
- .txt = "organizationName",
- .content = {
- 0x55, 0x04, 0x0a,
- },
- .content_len = 3,
- .der = {
- 0x06, 0x03, 0x55, 0x04, 0x0a,
- },
- .der_len = 5,
- },
- {
.oid = "2.5.0.0",
.txt = "2.5.0.0",
.content = {
@@ -170,63 +158,23 @@ struct asn1_object_test asn1_object_tests[] = {
},
{
.oid = "2.00005.0000000000004.10",
- .content = {
- 0x55, 0x04, 0x0a,
- },
- .content_len = 3,
- .der = {
- 0x06, 0x03, 0x55, 0x04, 0x0a,
- },
- .der_len = 5,
- .want_error = 0, /* XXX */
+ .want_error = ASN1_R_INVALID_NUMBER,
},
{
.oid = "2..5.4.10",
- .content = {
- 0x50, 0x05, 0x04, 0x0a,
- },
- .content_len = 4,
- .der = {
- 0x06, 0x04, 0x50, 0x05, 0x04, 0x0a,
- },
- .der_len = 6,
- .want_error = 0, /* XXX */
+ .want_error = ASN1_R_INVALID_NUMBER,
},
{
.oid = "2.5..4.10",
- .content = {
- 0x55, 0x00, 0x04, 0x0a,
- },
- .content_len = 4,
- .der = {
- 0x06, 0x04, 0x55, 0x00, 0x04, 0x0a,
- },
- .der_len = 6,
- .want_error = 0, /* XXX */
+ .want_error = ASN1_R_INVALID_NUMBER,
},
{
.oid = "2.5.4..10",
- .content = {
- 0x55, 0x04, 0x00, 0x0a,
- },
- .content_len = 4,
- .der = {
- 0x06, 0x04, 0x55, 0x04, 0x00, 0x0a,
- },
- .der_len = 6,
- .want_error = 0, /* XXX */
+ .want_error = ASN1_R_INVALID_NUMBER,
},
{
.oid = "2.5.4.10.",
- .content = {
- 0x55, 0x04, 0x0a,
- },
- .content_len = 3,
- .der = {
- 0x06, 0x03, 0x55, 0x04, 0x0a,
- },
- .der_len = 5,
- .want_error = 0, /* XXX */
+ .want_error = ASN1_R_INVALID_NUMBER,
},
{
.oid = "3.5.4.10",
@@ -245,6 +193,10 @@ struct asn1_object_test asn1_object_tests[] = {
.want_error = ASN1_R_MISSING_SECOND_NUMBER,
},
{
+ .oid = "2.5 4.10",
+ .want_error = ASN1_R_INVALID_SEPARATOR,
+ },
+ {
.oid = "2,5,4,10",
.want_error = ASN1_R_INVALID_SEPARATOR,
},