-/* $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>
*
},
.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",
},
{
.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",
.oid = "2",
.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,