/src/openssl30/crypto/asn1/asn1_err.c
| Line | Count | Source | 
| 1 |  | /* | 
| 2 |  |  * Generated by util/mkerr.pl DO NOT EDIT | 
| 3 |  |  * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. | 
| 4 |  |  * | 
| 5 |  |  * Licensed under the Apache License 2.0 (the "License").  You may not use | 
| 6 |  |  * this file except in compliance with the License.  You can obtain a copy | 
| 7 |  |  * in the file LICENSE in the source distribution or at | 
| 8 |  |  * https://www.openssl.org/source/license.html | 
| 9 |  |  */ | 
| 10 |  |  | 
| 11 |  | #include <openssl/err.h> | 
| 12 |  | #include <openssl/asn1err.h> | 
| 13 |  | #include "crypto/asn1err.h" | 
| 14 |  |  | 
| 15 |  | #ifndef OPENSSL_NO_ERR | 
| 16 |  |  | 
| 17 |  | static const ERR_STRING_DATA ASN1_str_reasons[] = { | 
| 18 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_ADDING_OBJECT), "adding object"}, | 
| 19 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_ASN1_PARSE_ERROR), "asn1 parse error"}, | 
| 20 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_ASN1_SIG_PARSE_ERROR), | 
| 21 |  |     "asn1 sig parse error"}, | 
| 22 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_AUX_ERROR), "aux error"}, | 
| 23 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_BAD_OBJECT_HEADER), "bad object header"}, | 
| 24 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_BAD_TEMPLATE), "bad template"}, | 
| 25 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_BMPSTRING_IS_WRONG_LENGTH), | 
| 26 |  |     "bmpstring is wrong length"}, | 
| 27 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_BN_LIB), "bn lib"}, | 
| 28 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_BOOLEAN_IS_WRONG_LENGTH), | 
| 29 |  |     "boolean is wrong length"}, | 
| 30 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_BUFFER_TOO_SMALL), "buffer too small"}, | 
| 31 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER), | 
| 32 |  |     "cipher has no object identifier"}, | 
| 33 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_CONTEXT_NOT_INITIALISED), | 
| 34 |  |     "context not initialised"}, | 
| 35 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_DATA_IS_WRONG), "data is wrong"}, | 
| 36 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_DECODE_ERROR), "decode error"}, | 
| 37 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_DEPTH_EXCEEDED), "depth exceeded"}, | 
| 38 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_DIGEST_AND_KEY_TYPE_NOT_SUPPORTED), | 
| 39 |  |     "digest and key type not supported"}, | 
| 40 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_ENCODE_ERROR), "encode error"}, | 
| 41 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_ERROR_GETTING_TIME), | 
| 42 |  |     "error getting time"}, | 
| 43 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_ERROR_LOADING_SECTION), | 
| 44 |  |     "error loading section"}, | 
| 45 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_ERROR_SETTING_CIPHER_PARAMS), | 
| 46 |  |     "error setting cipher params"}, | 
| 47 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_EXPECTING_AN_INTEGER), | 
| 48 |  |     "expecting an integer"}, | 
| 49 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_EXPECTING_AN_OBJECT), | 
| 50 |  |     "expecting an object"}, | 
| 51 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_EXPLICIT_LENGTH_MISMATCH), | 
| 52 |  |     "explicit length mismatch"}, | 
| 53 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_EXPLICIT_TAG_NOT_CONSTRUCTED), | 
| 54 |  |     "explicit tag not constructed"}, | 
| 55 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_FIELD_MISSING), "field missing"}, | 
| 56 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_FIRST_NUM_TOO_LARGE), | 
| 57 |  |     "first num too large"}, | 
| 58 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_HEADER_TOO_LONG), "header too long"}, | 
| 59 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_ILLEGAL_BITSTRING_FORMAT), | 
| 60 |  |     "illegal bitstring format"}, | 
| 61 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_ILLEGAL_BOOLEAN), "illegal boolean"}, | 
| 62 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_ILLEGAL_CHARACTERS), | 
| 63 |  |     "illegal characters"}, | 
| 64 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_ILLEGAL_FORMAT), "illegal format"}, | 
| 65 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_ILLEGAL_HEX), "illegal hex"}, | 
| 66 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_ILLEGAL_IMPLICIT_TAG), | 
| 67 |  |     "illegal implicit tag"}, | 
| 68 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_ILLEGAL_INTEGER), "illegal integer"}, | 
| 69 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_ILLEGAL_NEGATIVE_VALUE), | 
| 70 |  |     "illegal negative value"}, | 
| 71 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_ILLEGAL_NESTED_TAGGING), | 
| 72 |  |     "illegal nested tagging"}, | 
| 73 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_ILLEGAL_NULL), "illegal null"}, | 
| 74 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_ILLEGAL_NULL_VALUE), | 
| 75 |  |     "illegal null value"}, | 
| 76 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_ILLEGAL_OBJECT), "illegal object"}, | 
| 77 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_ILLEGAL_OPTIONAL_ANY), | 
| 78 |  |     "illegal optional any"}, | 
| 79 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_ILLEGAL_OPTIONS_ON_ITEM_TEMPLATE), | 
| 80 |  |     "illegal options on item template"}, | 
| 81 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_ILLEGAL_PADDING), "illegal padding"}, | 
| 82 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_ILLEGAL_TAGGED_ANY), | 
| 83 |  |     "illegal tagged any"}, | 
| 84 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_ILLEGAL_TIME_VALUE), | 
| 85 |  |     "illegal time value"}, | 
| 86 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_ILLEGAL_ZERO_CONTENT), | 
| 87 |  |     "illegal zero content"}, | 
| 88 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_INTEGER_NOT_ASCII_FORMAT), | 
| 89 |  |     "integer not ascii format"}, | 
| 90 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_INTEGER_TOO_LARGE_FOR_LONG), | 
| 91 |  |     "integer too large for long"}, | 
| 92 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_INVALID_BIT_STRING_BITS_LEFT), | 
| 93 |  |     "invalid bit string bits left"}, | 
| 94 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_INVALID_BMPSTRING_LENGTH), | 
| 95 |  |     "invalid bmpstring length"}, | 
| 96 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_INVALID_DIGIT), "invalid digit"}, | 
| 97 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_INVALID_MIME_TYPE), "invalid mime type"}, | 
| 98 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_INVALID_MODIFIER), "invalid modifier"}, | 
| 99 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_INVALID_NUMBER), "invalid number"}, | 
| 100 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_INVALID_OBJECT_ENCODING), | 
| 101 |  |     "invalid object encoding"}, | 
| 102 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_INVALID_SCRYPT_PARAMETERS), | 
| 103 |  |     "invalid scrypt parameters"}, | 
| 104 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_INVALID_SEPARATOR), "invalid separator"}, | 
| 105 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_INVALID_STRING_TABLE_VALUE), | 
| 106 |  |     "invalid string table value"}, | 
| 107 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_INVALID_UNIVERSALSTRING_LENGTH), | 
| 108 |  |     "invalid universalstring length"}, | 
| 109 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_INVALID_UTF8STRING), | 
| 110 |  |     "invalid utf8string"}, | 
| 111 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_INVALID_VALUE), "invalid value"}, | 
| 112 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_LENGTH_TOO_LONG), "length too long"}, | 
| 113 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_LIST_ERROR), "list error"}, | 
| 114 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_MIME_NO_CONTENT_TYPE), | 
| 115 |  |     "mime no content type"}, | 
| 116 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_MIME_PARSE_ERROR), "mime parse error"}, | 
| 117 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_MIME_SIG_PARSE_ERROR), | 
| 118 |  |     "mime sig parse error"}, | 
| 119 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_MISSING_EOC), "missing eoc"}, | 
| 120 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_MISSING_SECOND_NUMBER), | 
| 121 |  |     "missing second number"}, | 
| 122 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_MISSING_VALUE), "missing value"}, | 
| 123 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_MSTRING_NOT_UNIVERSAL), | 
| 124 |  |     "mstring not universal"}, | 
| 125 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_MSTRING_WRONG_TAG), "mstring wrong tag"}, | 
| 126 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_NESTED_ASN1_STRING), | 
| 127 |  |     "nested asn1 string"}, | 
| 128 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_NESTED_TOO_DEEP), "nested too deep"}, | 
| 129 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_NON_HEX_CHARACTERS), | 
| 130 |  |     "non hex characters"}, | 
| 131 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_NOT_ASCII_FORMAT), "not ascii format"}, | 
| 132 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_NOT_ENOUGH_DATA), "not enough data"}, | 
| 133 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_NO_CONTENT_TYPE), "no content type"}, | 
| 134 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_NO_MATCHING_CHOICE_TYPE), | 
| 135 |  |     "no matching choice type"}, | 
| 136 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_NO_MULTIPART_BODY_FAILURE), | 
| 137 |  |     "no multipart body failure"}, | 
| 138 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_NO_MULTIPART_BOUNDARY), | 
| 139 |  |     "no multipart boundary"}, | 
| 140 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_NO_SIG_CONTENT_TYPE), | 
| 141 |  |     "no sig content type"}, | 
| 142 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_NULL_IS_WRONG_LENGTH), | 
| 143 |  |     "null is wrong length"}, | 
| 144 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_OBJECT_NOT_ASCII_FORMAT), | 
| 145 |  |     "object not ascii format"}, | 
| 146 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_ODD_NUMBER_OF_CHARS), | 
| 147 |  |     "odd number of chars"}, | 
| 148 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_SECOND_NUMBER_TOO_LARGE), | 
| 149 |  |     "second number too large"}, | 
| 150 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_SEQUENCE_LENGTH_MISMATCH), | 
| 151 |  |     "sequence length mismatch"}, | 
| 152 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_SEQUENCE_NOT_CONSTRUCTED), | 
| 153 |  |     "sequence not constructed"}, | 
| 154 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_SEQUENCE_OR_SET_NEEDS_CONFIG), | 
| 155 |  |     "sequence or set needs config"}, | 
| 156 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_SHORT_LINE), "short line"}, | 
| 157 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_SIG_INVALID_MIME_TYPE), | 
| 158 |  |     "sig invalid mime type"}, | 
| 159 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_STREAMING_NOT_SUPPORTED), | 
| 160 |  |     "streaming not supported"}, | 
| 161 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_STRING_TOO_LONG), "string too long"}, | 
| 162 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_STRING_TOO_SHORT), "string too short"}, | 
| 163 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_THE_ASN1_OBJECT_IDENTIFIER_IS_NOT_KNOWN_FOR_THIS_MD), | 
| 164 |  |     "the asn1 object identifier is not known for this md"}, | 
| 165 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_TIME_NOT_ASCII_FORMAT), | 
| 166 |  |     "time not ascii format"}, | 
| 167 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_TOO_LARGE), "too large"}, | 
| 168 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_TOO_LONG), "too long"}, | 
| 169 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_TOO_SMALL), "too small"}, | 
| 170 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_TYPE_NOT_CONSTRUCTED), | 
| 171 |  |     "type not constructed"}, | 
| 172 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_TYPE_NOT_PRIMITIVE), | 
| 173 |  |     "type not primitive"}, | 
| 174 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_UNEXPECTED_EOC), "unexpected eoc"}, | 
| 175 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH), | 
| 176 |  |     "universalstring is wrong length"}, | 
| 177 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_UNKNOWN_DIGEST), "unknown digest"}, | 
| 178 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_UNKNOWN_FORMAT), "unknown format"}, | 
| 179 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM), | 
| 180 |  |     "unknown message digest algorithm"}, | 
| 181 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_UNKNOWN_OBJECT_TYPE), | 
| 182 |  |     "unknown object type"}, | 
| 183 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_UNKNOWN_PUBLIC_KEY_TYPE), | 
| 184 |  |     "unknown public key type"}, | 
| 185 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_UNKNOWN_SIGNATURE_ALGORITHM), | 
| 186 |  |     "unknown signature algorithm"}, | 
| 187 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_UNKNOWN_TAG), "unknown tag"}, | 
| 188 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_UNSUPPORTED_ANY_DEFINED_BY_TYPE), | 
| 189 |  |     "unsupported any defined by type"}, | 
| 190 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_UNSUPPORTED_CIPHER), | 
| 191 |  |     "unsupported cipher"}, | 
| 192 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE), | 
| 193 |  |     "unsupported public key type"}, | 
| 194 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_UNSUPPORTED_TYPE), "unsupported type"}, | 
| 195 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_WRONG_INTEGER_TYPE), | 
| 196 |  |     "wrong integer type"}, | 
| 197 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_WRONG_PUBLIC_KEY_TYPE), | 
| 198 |  |     "wrong public key type"}, | 
| 199 |  |     {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_WRONG_TAG), "wrong tag"}, | 
| 200 |  |     {0, NULL} | 
| 201 |  | }; | 
| 202 |  |  | 
| 203 |  | #endif | 
| 204 |  |  | 
| 205 |  | int ossl_err_load_ASN1_strings(void) | 
| 206 | 54 | { | 
| 207 | 54 | #ifndef OPENSSL_NO_ERR | 
| 208 | 54 |     if (ERR_reason_error_string(ASN1_str_reasons[0].error) == NULL) | 
| 209 | 54 |         ERR_load_strings_const(ASN1_str_reasons); | 
| 210 | 54 | #endif | 
| 211 | 54 |     return 1; | 
| 212 | 54 | } |