Provide ASN1_R_TYPE_NOT_PRIMITIVE.
authorjsing <jsing@openbsd.org>
Mon, 29 Aug 2022 06:48:58 +0000 (06:48 +0000)
committerjsing <jsing@openbsd.org>
Mon, 29 Aug 2022 06:48:58 +0000 (06:48 +0000)
Needed for an upcoming change.

ok tb@

lib/libcrypto/asn1/asn1.h
lib/libcrypto/asn1/asn1_err.c

index f172e02..6782549 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: asn1.h,v 1.68 2022/07/12 14:42:48 kn Exp $ */
+/* $OpenBSD: asn1.h,v 1.69 2022/08/29 06:48:58 jsing Exp $ */
 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
  * All rights reserved.
  *
@@ -1180,6 +1180,7 @@ void ERR_load_ASN1_strings(void);
 #define ASN1_R_TOO_LONG                                         155
 #define ASN1_R_TOO_SMALL                                224
 #define ASN1_R_TYPE_NOT_CONSTRUCTED                     156
+#define ASN1_R_TYPE_NOT_PRIMITIVE                       231
 #define ASN1_R_UNABLE_TO_DECODE_RSA_KEY                         157
 #define ASN1_R_UNABLE_TO_DECODE_RSA_PRIVATE_KEY                 158
 #define ASN1_R_UNEXPECTED_EOC                           159
index 8a99e78..f67fa71 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: asn1_err.c,v 1.24 2022/07/12 14:42:48 kn Exp $ */
+/* $OpenBSD: asn1_err.c,v 1.25 2022/08/29 06:48:58 jsing Exp $ */
 /* ====================================================================
  * Copyright (c) 1999-2011 The OpenSSL Project.  All rights reserved.
  *
@@ -176,6 +176,7 @@ static ERR_STRING_DATA ASN1_str_reasons[] = {
        {ERR_REASON(ASN1_R_TOO_LONG)             , "too long"},
        {ERR_REASON(ASN1_R_TOO_SMALL)            , "too small"},
        {ERR_REASON(ASN1_R_TYPE_NOT_CONSTRUCTED) , "type not constructed"},
+       {ERR_REASON(ASN1_R_TYPE_NOT_PRIMITIVE)   , "type not primitive"},
        {ERR_REASON(ASN1_R_UNABLE_TO_DECODE_RSA_KEY), "unable to decode rsa key"},
        {ERR_REASON(ASN1_R_UNABLE_TO_DECODE_RSA_PRIVATE_KEY), "unable to decode rsa private key"},
        {ERR_REASON(ASN1_R_UNEXPECTED_EOC)       , "unexpected eoc"},