1 /* 2 * Copyright (C) 2022 Huawei Technologies Co., Ltd. 3 * Licensed under the Mulan PSL v2. 4 * You can use this software according to the terms and conditions of the Mulan PSL v2. 5 * You may obtain a copy of Mulan PSL v2 at: 6 * http://license.coscl.org.cn/MulanPSL2 7 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR 8 * IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR 9 * PURPOSE. 10 * See the Mulan PSL v2 for more details. 11 */ 12 13 #ifndef TEE_OPENSSL_ERR_H 14 #define TEE_OPENSSL_ERR_H 15 16 /* 17 * define openssl lib reasons err code: 18 * Delete the prefix TEE_ERR_, which is the error code name in the open-source library. 19 */ 20 /* for common lib err */ 21 #define TEE_ERR_R_MALLOC_FAILURE 0x80022041 22 #define TEE_ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED 0x80022042 23 #define TEE_ERR_R_PASSED_NULL_PARAMETER 0x80022043 24 #define TEE_ERR_R_INTERNAL_ERROR 0x80022044 25 #define TEE_ERR_R_DISABLED 0x80022045 26 #define TEE_ERR_R_INIT_FAIL 0x80022046 27 #define TEE_ERR_R_PASSED_INVALID_ARGUMENT 0x80022007 28 #define TEE_ERR_R_OPERATION_FAIL 0x80022048 29 30 /* for bn lib err */ 31 #define TEE_ERR_BN_R_ARG2_LT_ARG3 0x80023064 32 #define TEE_ERR_BN_R_BAD_RECIPROCAL 0x80023065 33 #define TEE_ERR_BN_R_BIGNUM_TOO_LONG 0x80023072 34 #define TEE_ERR_BN_R_BITS_TOO_SMALL 0x80023076 35 #define TEE_ERR_BN_R_CALLED_WITH_EVEN_MODULUS 0x80023066 36 #define TEE_ERR_BN_R_DIV_BY_ZERO 0x80023067 37 #define TEE_ERR_BN_R_ENCODING_ERROR 0x80023068 38 #define TEE_ERR_BN_R_EXPAND_ON_STATIC_BIGNUM_DATA 0x80023069 39 #define TEE_ERR_BN_R_INPUT_NOT_REDUCED 0x8002306e 40 #define TEE_ERR_BN_R_INVALID_LENGTH 0x8002306a 41 #define TEE_ERR_BN_R_INVALID_RANGE 0x80023073 42 #define TEE_ERR_BN_R_INVALID_SHIFT 0x80023077 43 #define TEE_ERR_BN_R_NOT_A_SQUARE 0x8002306f 44 #define TEE_ERR_BN_R_NOT_INITIALIZED 0x8002306b 45 #define TEE_ERR_BN_R_NO_INVERSE 0x8002306c 46 #define TEE_ERR_BN_R_NO_SOLUTION 0x80023074 47 #define TEE_ERR_BN_R_PRIVATE_KEY_TOO_LARGE 0x80023075 48 #define TEE_ERR_BN_R_P_IS_NOT_PRIME 0x80023070 49 #define TEE_ERR_BN_R_TOO_MANY_ITERATIONS 0x80023071 50 #define TEE_ERR_BN_R_TOO_MANY_TEMPORARY_VARIABLES 0x8002306d 51 52 /* for rsa lib err */ 53 #define TEE_ERR_RSA_R_ALGORITHM_MISMATCH 0x80024064 54 #define TEE_ERR_RSA_R_BAD_E_VALUE 0x80024065 55 #define TEE_ERR_RSA_R_BAD_FIXED_HEADER_DECRYPT 0x80024066 56 #define TEE_ERR_RSA_R_BAD_PAD_BYTE_COUNT 0x80024067 57 #define TEE_ERR_RSA_R_BAD_SIGNATURE 0x80024068 58 #define TEE_ERR_RSA_R_BLOCK_TYPE_IS_NOT_01 0x8002406a 59 #define TEE_ERR_RSA_R_BLOCK_TYPE_IS_NOT_02 0x8002406b 60 #define TEE_ERR_RSA_R_DATA_GREATER_THAN_MOD_LEN 0x8002406c 61 #define TEE_ERR_RSA_R_DATA_TOO_LARGE 0x8002406d 62 #define TEE_ERR_RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE 0x8002406e 63 #define TEE_ERR_RSA_R_DATA_TOO_LARGE_FOR_MODULUS 0x80024084 64 #define TEE_ERR_RSA_R_DATA_TOO_SMALL 0x8002406f 65 #define TEE_ERR_RSA_R_DATA_TOO_SMALL_FOR_KEY_SIZE 0x8002407a 66 #define TEE_ERR_RSA_R_DIGEST_DOES_NOT_MATCH 0x8002409e 67 #define TEE_ERR_RSA_R_DIGEST_NOT_ALLOWED 0x80024091 68 #define TEE_ERR_RSA_R_DIGEST_TOO_BIG_FOR_RSA_KEY 0x80024070 69 #define TEE_ERR_RSA_R_DMP1_NOT_CONGRUENT_TO_D 0x8002407c 70 #define TEE_ERR_RSA_R_DMQ1_NOT_CONGRUENT_TO_D 0x8002407d 71 #define TEE_ERR_RSA_R_D_E_NOT_CONGRUENT_TO_1 0x8002407b 72 #define TEE_ERR_RSA_R_FIRST_OCTET_INVALID 0x80024085 73 #define TEE_ERR_RSA_R_ILLEGAL_OR_UNSUPPORTED_PADDING_MODE 0x80024090 74 #define TEE_ERR_RSA_R_INVALID_DIGEST 0x8002409d 75 #define TEE_ERR_RSA_R_INVALID_DIGEST_LENGTH 0x8002408f 76 #define TEE_ERR_RSA_R_INVALID_HEADER 0x80024089 77 #define TEE_ERR_RSA_R_INVALID_LABEL 0x800240a0 78 #define TEE_ERR_RSA_R_INVALID_MESSAGE_LENGTH 0x80024083 79 #define TEE_ERR_RSA_R_INVALID_MGF1_MD 0x8002409c 80 #define TEE_ERR_RSA_R_INVALID_MULTI_PRIME_KEY 0x800240a7 81 #define TEE_ERR_RSA_R_INVALID_OAEP_PARAMETERS 0x800240a1 82 #define TEE_ERR_RSA_R_INVALID_PADDING 0x8002408a 83 #define TEE_ERR_RSA_R_INVALID_PADDING_MODE 0x8002408d 84 #define TEE_ERR_RSA_R_INVALID_PSS_PARAMETERS 0x80024095 85 #define TEE_ERR_RSA_R_INVALID_PSS_SALTLEN 0x80024092 86 #define TEE_ERR_RSA_R_INVALID_SALT_LENGTH 0x80024096 87 #define TEE_ERR_RSA_R_INVALID_TRAILER 0x8002408b 88 #define TEE_ERR_RSA_R_INVALID_X931_DIGEST 0x8002408e 89 #define TEE_ERR_RSA_R_IQMP_NOT_INVERSE_OF_Q 0x8002407e 90 #define TEE_ERR_RSA_R_KEY_PRIME_NUM_INVALID 0x800240a5 91 #define TEE_ERR_RSA_R_KEY_SIZE_TOO_SMALL 0x80024078 92 #define TEE_ERR_RSA_R_LAST_OCTET_INVALID 0x80024086 93 #define TEE_ERR_RSA_R_MISSING_PRIVATE_KEY 0x800240b3 94 #define TEE_ERR_RSA_R_MGF1_DIGEST_NOT_ALLOWED 0x80024098 95 #define TEE_ERR_RSA_R_MODULUS_TOO_LARGE 0x80024069 96 #define TEE_ERR_RSA_R_MP_COEFFICIENT_NOT_INVERSE_OF_R 0x800240a8 97 #define TEE_ERR_RSA_R_MP_EXPONENT_NOT_CONGRUENT_TO_D 0x800240a9 98 #define TEE_ERR_RSA_R_MP_R_NOT_PRIME 0x800240aa 99 #define TEE_ERR_RSA_R_NO_PUBLIC_EXPONENT 0x8002408c 100 #define TEE_ERR_RSA_R_NULL_BEFORE_BLOCK_MISSING 0x80024071 101 #define TEE_ERR_RSA_R_N_DOES_NOT_EQUAL_PRODUCT_OF_PRIMES 0x800240ac 102 #define TEE_ERR_RSA_R_N_DOES_NOT_EQUAL_P_Q 0x8002407f 103 #define TEE_ERR_RSA_R_OAEP_DECODING_ERROR 0x80024079 104 #define TEE_ERR_RSA_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE 0x80024094 105 #define TEE_ERR_RSA_R_PADDING_CHECK_FAILED 0x80024072 106 #define TEE_ERR_RSA_R_PKCS_DECODING_ERROR 0x8002409f 107 #define TEE_ERR_RSA_R_PSS_SALTLEN_TOO_SMALL 0x800240a4 108 #define TEE_ERR_RSA_R_P_NOT_PRIME 0x80024080 109 #define TEE_ERR_RSA_R_Q_NOT_PRIME 0x80024081 110 #define TEE_ERR_RSA_R_RSA_OPERATIONS_NOT_SUPPORTED 0x80024082 111 #define TEE_ERR_RSA_R_SLEN_CHECK_FAILED 0x80024088 112 #define TEE_ERR_RSA_R_SLEN_RECOVERY_FAILED 0x80024087 113 #define TEE_ERR_RSA_R_SSLV3_ROLLBACK_ATTACK 0x80024073 114 #define TEE_ERR_RSA_R_THE_ASN1_OBJECT_IDENTIFIER_IS_NOT_KNOWN_FOR_THIS_MD 0x80024074 115 #define TEE_ERR_RSA_R_UNKNOWN_ALGORITHM_TYPE 0x80024075 116 #define TEE_ERR_RSA_R_UNKNOWN_DIGEST 0x800240a6 117 #define TEE_ERR_RSA_R_UNKNOWN_MASK_DIGEST 0x80024097 118 #define TEE_ERR_RSA_R_UNKNOWN_PADDING_TYPE 0x80024076 119 #define TEE_ERR_RSA_R_UNSUPPORTED_ENCRYPTION_TYPE 0x800240a2 120 #define TEE_ERR_RSA_R_UNSUPPORTED_LABEL_SOURCE 0x800240a3 121 #define TEE_ERR_RSA_R_UNSUPPORTED_MASK_ALGORITHM 0x80024099 122 #define TEE_ERR_RSA_R_UNSUPPORTED_MASK_PARAMETER 0x8002409a 123 #define TEE_ERR_RSA_R_UNSUPPORTED_SIGNATURE_TYPE 0x8002409b 124 #define TEE_ERR_RSA_R_VALUE_MISSING 0x80024093 125 #define TEE_ERR_RSA_R_WRONG_SIGNATURE_LENGTH 0x80024077 126 127 /* for evp lib err */ 128 #define TEE_ERR_EVP_R_AES_KEY_SETUP_FAILED 0x8002508f 129 #define TEE_ERR_EVP_R_ARIA_KEY_SETUP_FAILED 0x800250b0 130 #define TEE_ERR_EVP_R_BAD_DECRYPT 0x80025064 131 #define TEE_ERR_EVP_R_BAD_KEY_LENGTH 0x800250c3 132 #define TEE_ERR_EVP_R_BUFFER_TOO_SMALL 0x8002509b 133 #define TEE_ERR_EVP_R_CAMELLIA_KEY_SETUP_FAILED 0x8002509d 134 #define TEE_ERR_EVP_R_CIPHER_PARAMETER_ERROR 0x8002507a 135 #define TEE_ERR_EVP_R_COMMAND_NOT_SUPPORTED 0x80025093 136 #define TEE_ERR_EVP_R_COPY_ERROR 0x800250ad 137 #define TEE_ERR_EVP_R_CTRL_NOT_IMPLEMENTED 0x80025084 138 #define TEE_ERR_EVP_R_CTRL_OPERATION_NOT_IMPLEMENTED 0x80025085 139 #define TEE_ERR_EVP_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH 0x8002508a 140 #define TEE_ERR_EVP_R_DECODE_ERROR 0x80025072 141 #define TEE_ERR_EVP_R_DIFFERENT_KEY_TYPES 0x80025065 142 #define TEE_ERR_EVP_R_DIFFERENT_PARAMETERS 0x80025099 143 #define TEE_ERR_EVP_R_ERROR_LOADING_SECTION 0x800250a5 144 #define TEE_ERR_EVP_R_ERROR_SETTING_FIPS_MODE 0x800250a6 145 #define TEE_ERR_EVP_R_EXPECTING_AN_HMAC_KEY 0x800250ae 146 #define TEE_ERR_EVP_R_EXPECTING_AN_RSA_KEY 0x8002507f 147 #define TEE_ERR_EVP_R_EXPECTING_A_DH_KEY 0x80025080 148 #define TEE_ERR_EVP_R_EXPECTING_A_DSA_KEY 0x80025081 149 #define TEE_ERR_EVP_R_EXPECTING_A_EC_KEY 0x8002508e 150 #define TEE_ERR_EVP_R_EXPECTING_A_POLY1305_KEY 0x800250a4 151 #define TEE_ERR_EVP_R_EXPECTING_A_SIPHASH_KEY 0x800250af 152 #define TEE_ERR_EVP_R_FIPS_MODE_NOT_SUPPORTED 0x800250a7 153 #define TEE_ERR_EVP_R_GET_RAW_KEY_FAILED 0x800250b6 154 #define TEE_ERR_EVP_R_ILLEGAL_SCRYPT_PARAMETERS 0x800250ab 155 #define TEE_ERR_EVP_R_INITIALIZATION_ERROR 0x80025086 156 #define TEE_ERR_EVP_R_INPUT_NOT_INITIALIZED 0x8002506f 157 #define TEE_ERR_EVP_R_INVALID_DIGEST 0x80025098 158 #define TEE_ERR_EVP_R_INVALID_FIPS_MODE 0x800250a8 159 #define TEE_ERR_EVP_R_INVALID_IV_LENGTH 0x800250c2 160 #define TEE_ERR_EVP_R_INVALID_KEY 0x800250a3 161 #define TEE_ERR_EVP_R_INVALID_KEY_LENGTH 0x80025082 162 #define TEE_ERR_EVP_R_INVALID_OPERATION 0x80025094 163 #define TEE_ERR_EVP_R_KEYGEN_FAILURE 0x80025078 164 #define TEE_ERR_EVP_R_KEY_SETUP_FAILED 0x800250b4 165 #define TEE_ERR_EVP_R_MEMORY_LIMIT_EXCEEDED 0x800250ac 166 #define TEE_ERR_EVP_R_MESSAGE_DIGEST_IS_NULL 0x8002509f 167 #define TEE_ERR_EVP_R_METHOD_NOT_SUPPORTED 0x80025090 168 #define TEE_ERR_EVP_R_MISSING_PARAMETERS 0x80025067 169 #define TEE_ERR_EVP_R_NOT_XOF_OR_INVALID_LENGTH 0x800250b2 170 #define TEE_ERR_EVP_R_NO_CIPHER_SET 0x80025083 171 #define TEE_ERR_EVP_R_NO_DEFAULT_DIGEST 0x8002509e 172 #define TEE_ERR_EVP_R_NO_DIGEST_SET 0x8002508b 173 #define TEE_ERR_EVP_R_NO_KEY_SET 0x8002509a 174 #define TEE_ERR_EVP_R_NO_OPERATION_SET 0x80025095 175 #define TEE_ERR_EVP_R_ONLY_ONESHOT_SUPPORTED 0x800250b1 176 #define TEE_ERR_EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE 0x80025096 177 #define TEE_ERR_EVP_R_OPERATON_NOT_INITIALIZED 0x80025097 178 #define TEE_ERR_EVP_R_PARTIALLY_OVERLAPPING 0x800250a2 179 #define TEE_ERR_EVP_R_PBKDF2_ERROR 0x800250b5 180 #define TEE_ERR_EVP_R_PKEY_APPLICATION_ASN1_METHOD_ALREADY_REGISTERED 0x800250b3 181 #define TEE_ERR_EVP_R_PRIVATE_KEY_DECODE_ERROR 0x80025091 182 #define TEE_ERR_EVP_R_PRIVATE_KEY_ENCODE_ERROR 0x80025092 183 #define TEE_ERR_EVP_R_PUBLIC_KEY_NOT_RSA 0x8002506a 184 #define TEE_ERR_EVP_R_UNKNOWN_CIPHER 0x800250a0 185 #define TEE_ERR_EVP_R_UNKNOWN_DIGEST 0x800250a1 186 #define TEE_ERR_EVP_R_UNKNOWN_OPTION 0x800250a9 187 #define TEE_ERR_EVP_R_UNKNOWN_PBE_ALGORITHM 0x80025079 188 #define TEE_ERR_EVP_R_UNSUPPORTED_ALGORITHM 0x8002509c 189 #define TEE_ERR_EVP_R_UNSUPPORTED_CIPHER 0x8002506b 190 #define TEE_ERR_EVP_R_UNSUPPORTED_KEYLENGTH 0x8002507b 191 #define TEE_ERR_EVP_R_UNSUPPORTED_KEY_DERIVATION_FUNCTION 0x8002507c 192 #define TEE_ERR_EVP_R_UNSUPPORTED_KEY_SIZE 0x8002506c 193 #define TEE_ERR_EVP_R_UNSUPPORTED_NUMBER_OF_ROUNDS 0x80025087 194 #define TEE_ERR_EVP_R_UNSUPPORTED_PRF 0x8002507d 195 #define TEE_ERR_EVP_R_UNSUPPORTED_PRIVATE_KEY_ALGORITHM 0x80025076 196 #define TEE_ERR_EVP_R_UNSUPPORTED_SALT_TYPE 0x8002507e 197 #define TEE_ERR_EVP_R_WRAP_MODE_NOT_ALLOWED 0x800250aa 198 #define TEE_ERR_EVP_R_WRONG_FINAL_BLOCK_LENGTH 0x8002506d 199 #define TEE_ERR_EVP_R_XTS_DUPLICATED_KEYS 0x800250b7 200 201 /* for pem lib err */ 202 #define TEE_ERR_PEM_R_BAD_BASE64_DECODE 0x80026064 203 #define TEE_ERR_PEM_R_BAD_DECRYPT 0x80026065 204 #define TEE_ERR_PEM_R_BAD_END_LINE 0x80026066 205 #define TEE_ERR_PEM_R_BAD_IV_CHARS 0x80026067 206 #define TEE_ERR_PEM_R_BAD_MAGIC_NUMBER 0x80026074 207 #define TEE_ERR_PEM_R_BAD_PASSWORD_READ 0x80026068 208 #define TEE_ERR_PEM_R_BAD_VERSION_NUMBER 0x80026075 209 #define TEE_ERR_PEM_R_BIO_WRITE_FAILURE 0x80026076 210 #define TEE_ERR_PEM_R_CIPHER_IS_NULL 0x8002607f 211 #define TEE_ERR_PEM_R_ERROR_CONVERTING_PRIVATE_KEY 0x80026073 212 #define TEE_ERR_PEM_R_EXPECTING_PRIVATE_KEY_BLOB 0x80026077 213 #define TEE_ERR_PEM_R_EXPECTING_PUBLIC_KEY_BLOB 0x80026078 214 #define TEE_ERR_PEM_R_HEADER_TOO_LONG 0x80026080 215 #define TEE_ERR_PEM_R_INCONSISTENT_HEADER 0x80026079 216 #define TEE_ERR_PEM_R_KEYBLOB_HEADER_PARSE_ERROR 0x8002607a 217 #define TEE_ERR_PEM_R_KEYBLOB_TOO_SHORT 0x8002607b 218 #define TEE_ERR_PEM_R_MISSING_DEK_IV 0x80026081 219 #define TEE_ERR_PEM_R_NOT_DEK_INFO 0x80026069 220 #define TEE_ERR_PEM_R_NOT_ENCRYPTED 0x8002606a 221 #define TEE_ERR_PEM_R_NOT_PROC_TYPE 0x8002606b 222 #define TEE_ERR_PEM_R_NO_START_LINE 0x8002606c 223 #define TEE_ERR_PEM_R_PROBLEMS_GETTING_PASSWORD 0x8002606d 224 #define TEE_ERR_PEM_R_PVK_DATA_TOO_SHORT 0x8002607c 225 #define TEE_ERR_PEM_R_PVK_TOO_SHORT 0x8002607d 226 #define TEE_ERR_PEM_R_READ_KEY 0x8002606f 227 #define TEE_ERR_PEM_R_SHORT_HEADER 0x80026070 228 #define TEE_ERR_PEM_R_UNEXPECTED_DEK_IV 0x80026082 229 #define TEE_ERR_PEM_R_UNSUPPORTED_CIPHER 0x80026071 230 #define TEE_ERR_PEM_R_UNSUPPORTED_ENCRYPTION 0x80026072 231 #define TEE_ERR_PEM_R_UNSUPPORTED_KEY_COMPONENTS 0x8002607e 232 233 /* for x509 lib err */ 234 #define TEE_ERR_X509_R_AKID_MISMATCH 0x8002706e 235 #define TEE_ERR_X509_R_BAD_SELECTOR 0x80027085 236 #define TEE_ERR_X509_R_BAD_X509_FILETYPE 0x80027064 237 #define TEE_ERR_X509_R_BASE64_DECODE_ERROR 0x80027076 238 #define TEE_ERR_X509_R_CANT_CHECK_DH_KEY 0x80027072 239 #define TEE_ERR_X509_R_CERT_ALREADY_IN_HASH_TABLE 0x80027065 240 #define TEE_ERR_X509_R_CRL_ALREADY_DELTA 0x8002707f 241 #define TEE_ERR_X509_R_CRL_VERIFY_FAILURE 0x80027083 242 #define TEE_ERR_X509_R_IDP_MISMATCH 0x80027080 243 #define TEE_ERR_X509_R_INVALID_ATTRIBUTES 0x8002708a 244 #define TEE_ERR_X509_R_INVALID_DIRECTORY 0x80027071 245 #define TEE_ERR_X509_R_INVALID_FIELD_NAME 0x80027077 246 #define TEE_ERR_X509_R_INVALID_TRUST 0x8002707b 247 #define TEE_ERR_X509_R_ISSUER_MISMATCH 0x80027081 248 #define TEE_ERR_X509_R_KEY_TYPE_MISMATCH 0x80027073 249 #define TEE_ERR_X509_R_KEY_VALUES_MISMATCH 0x80027074 250 #define TEE_ERR_X509_R_LOADING_CERT_DIR 0x80027067 251 #define TEE_ERR_X509_R_LOADING_DEFAULTS 0x80027068 252 #define TEE_ERR_X509_R_METHOD_NOT_SUPPORTED 0x8002707c 253 #define TEE_ERR_X509_R_NAME_TOO_LONG 0x80027086 254 #define TEE_ERR_X509_R_NEWER_CRL_NOT_NEWER 0x80027084 255 #define TEE_ERR_X509_R_NO_CERTIFICATE_FOUND 0x80027087 256 #define TEE_ERR_X509_R_NO_CERTIFICATE_OR_CRL_FOUND 0x80027088 257 #define TEE_ERR_X509_R_NO_CERT_SET_FOR_US_TO_VERIFY 0x80027069 258 #define TEE_ERR_X509_R_NO_CRL_FOUND 0x80027089 259 #define TEE_ERR_X509_R_NO_CRL_NUMBER 0x80027082 260 #define TEE_ERR_X509_R_PUBLIC_KEY_DECODE_ERROR 0x8002707d 261 #define TEE_ERR_X509_R_PUBLIC_KEY_ENCODE_ERROR 0x8002707e 262 #define TEE_ERR_X509_R_SHOULD_RETRY 0x8002706a 263 #define TEE_ERR_X509_R_UNABLE_TO_FIND_PARAMETERS_IN_CHAIN 0x8002706b 264 #define TEE_ERR_X509_R_UNABLE_TO_GET_CERTS_PUBLIC_KEY 0x8002706c 265 #define TEE_ERR_X509_R_UNKNOWN_KEY_TYPE 0x80027075 266 #define TEE_ERR_X509_R_UNKNOWN_NID 0x8002706d 267 #define TEE_ERR_X509_R_UNKNOWN_PURPOSE_ID 0x80027079 268 #define TEE_ERR_X509_R_UNKNOWN_TRUST_ID 0x80027078 269 #define TEE_ERR_X509_R_UNSUPPORTED_ALGORITHM 0x8002706f 270 #define TEE_ERR_X509_R_WRONG_LOOKUP_TYPE 0x80027070 271 #define TEE_ERR_X509_R_WRONG_TYPE 0x8002707a 272 273 /* for asn1 lib err */ 274 #define TEE_ERR_ASN1_R_ADDING_OBJECT 0x800280ab 275 #define TEE_ERR_ASN1_R_ASN1_PARSE_ERROR 0x800280cb 276 #define TEE_ERR_ASN1_R_ASN1_SIG_PARSE_ERROR 0x800280cc 277 #define TEE_ERR_ASN1_R_AUX_ERROR 0x80028064 278 #define TEE_ERR_ASN1_R_BAD_OBJECT_HEADER 0x80028066 279 #define TEE_ERR_ASN1_R_BMPSTRING_IS_WRONG_LENGTH 0x800280d6 280 #define TEE_ERR_ASN1_R_BN_LIB 0x80028069 281 #define TEE_ERR_ASN1_R_BOOLEAN_IS_WRONG_LENGTH 0x8002806a 282 #define TEE_ERR_ASN1_R_BUFFER_TOO_SMALL 0x8002806b 283 #define TEE_ERR_ASN1_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER 0x8002806c 284 #define TEE_ERR_ASN1_R_CONTEXT_NOT_INITIALISED 0x800280d9 285 #define TEE_ERR_ASN1_R_DATA_IS_WRONG 0x8002806d 286 #define TEE_ERR_ASN1_R_DECODE_ERROR 0x8002806e 287 #define TEE_ERR_ASN1_R_DEPTH_EXCEEDED 0x800280ae 288 #define TEE_ERR_ASN1_R_DIGEST_AND_KEY_TYPE_NOT_SUPPORTED 0x800280c6 289 #define TEE_ERR_ASN1_R_ENCODE_ERROR 0x80028070 290 #define TEE_ERR_ASN1_R_ERROR_GETTING_TIME 0x800280ad 291 #define TEE_ERR_ASN1_R_ERROR_LOADING_SECTION 0x800280ac 292 #define TEE_ERR_ASN1_R_ERROR_SETTING_CIPHER_PARAMS 0x80028072 293 #define TEE_ERR_ASN1_R_EXPECTING_AN_INTEGER 0x80028073 294 #define TEE_ERR_ASN1_R_EXPECTING_AN_OBJECT 0x80028074 295 #define TEE_ERR_ASN1_R_EXPLICIT_LENGTH_MISMATCH 0x80028077 296 #define TEE_ERR_ASN1_R_EXPLICIT_TAG_NOT_CONSTRUCTED 0x80028078 297 #define TEE_ERR_ASN1_R_FIELD_MISSING 0x80028079 298 #define TEE_ERR_ASN1_R_FIRST_NUM_TOO_LARGE 0x8002807a 299 #define TEE_ERR_ASN1_R_HEADER_TOO_LONG 0x8002807b 300 #define TEE_ERR_ASN1_R_ILLEGAL_BITSTRING_FORMAT 0x800280af 301 #define TEE_ERR_ASN1_R_ILLEGAL_BOOLEAN 0x800280b0 302 #define TEE_ERR_ASN1_R_ILLEGAL_CHARACTERS 0x8002807c 303 #define TEE_ERR_ASN1_R_ILLEGAL_FORMAT 0x800280b1 304 #define TEE_ERR_ASN1_R_ILLEGAL_HEX 0x800280b2 305 #define TEE_ERR_ASN1_R_ILLEGAL_IMPLICIT_TAG 0x800280b3 306 #define TEE_ERR_ASN1_R_ILLEGAL_INTEGER 0x800280b4 307 #define TEE_ERR_ASN1_R_ILLEGAL_NEGATIVE_VALUE 0x800280e2 308 #define TEE_ERR_ASN1_R_ILLEGAL_NESTED_TAGGING 0x800280b5 309 #define TEE_ERR_ASN1_R_ILLEGAL_NULL 0x8002807d 310 #define TEE_ERR_ASN1_R_ILLEGAL_NULL_VALUE 0x800280b6 311 #define TEE_ERR_ASN1_R_ILLEGAL_OBJECT 0x800280b7 312 #define TEE_ERR_ASN1_R_ILLEGAL_OPTIONAL_ANY 0x8002807e 313 #define TEE_ERR_ASN1_R_ILLEGAL_OPTIONS_ON_ITEM_TEMPLATE 0x800280aa 314 #define TEE_ERR_ASN1_R_ILLEGAL_PADDING 0x800280dd 315 #define TEE_ERR_ASN1_R_ILLEGAL_TAGGED_ANY 0x8002807f 316 #define TEE_ERR_ASN1_R_ILLEGAL_TIME_VALUE 0x800280b8 317 #define TEE_ERR_ASN1_R_ILLEGAL_ZERO_CONTENT 0x800280de 318 #define TEE_ERR_ASN1_R_INTEGER_NOT_ASCII_FORMAT 0x800280b9 319 #define TEE_ERR_ASN1_R_INTEGER_TOO_LARGE_FOR_LONG 0x80028080 320 #define TEE_ERR_ASN1_R_INVALID_BIT_STRING_BITS_LEFT 0x800280dc 321 #define TEE_ERR_ASN1_R_INVALID_BMPSTRING_LENGTH 0x80028081 322 #define TEE_ERR_ASN1_R_INVALID_DIGIT 0x80028082 323 #define TEE_ERR_ASN1_R_INVALID_MIME_TYPE 0x800280cd 324 #define TEE_ERR_ASN1_R_INVALID_MODIFIER 0x800280ba 325 #define TEE_ERR_ASN1_R_INVALID_NUMBER 0x800280bb 326 #define TEE_ERR_ASN1_R_INVALID_OBJECT_ENCODING 0x800280d8 327 #define TEE_ERR_ASN1_R_INVALID_SCRYPT_PARAMETERS 0x800280e3 328 #define TEE_ERR_ASN1_R_INVALID_SEPARATOR 0x80028083 329 #define TEE_ERR_ASN1_R_INVALID_STRING_TABLE_VALUE 0x800280da 330 #define TEE_ERR_ASN1_R_INVALID_UNIVERSALSTRING_LENGTH 0x80028085 331 #define TEE_ERR_ASN1_R_INVALID_UTF8STRING 0x80028086 332 #define TEE_ERR_ASN1_R_INVALID_VALUE 0x800280db 333 #define TEE_ERR_ASN1_R_LIST_ERROR 0x800280bc 334 #define TEE_ERR_ASN1_R_MIME_NO_CONTENT_TYPE 0x800280ce 335 #define TEE_ERR_ASN1_R_MIME_PARSE_ERROR 0x800280cf 336 #define TEE_ERR_ASN1_R_MIME_SIG_PARSE_ERROR 0x800280d0 337 #define TEE_ERR_ASN1_R_MISSING_EOC 0x80028089 338 #define TEE_ERR_ASN1_R_MISSING_SECOND_NUMBER 0x8002808a 339 #define TEE_ERR_ASN1_R_MISSING_VALUE 0x800280bd 340 #define TEE_ERR_ASN1_R_MSTRING_NOT_UNIVERSAL 0x8002808b 341 #define TEE_ERR_ASN1_R_MSTRING_WRONG_TAG 0x8002808c 342 #define TEE_ERR_ASN1_R_NESTED_ASN1_STRING 0x800280c5 343 #define TEE_ERR_ASN1_R_NESTED_TOO_DEEP 0x800280c9 344 #define TEE_ERR_ASN1_R_NON_HEX_CHARACTERS 0x8002808d 345 #define TEE_ERR_ASN1_R_NOT_ASCII_FORMAT 0x800280be 346 #define TEE_ERR_ASN1_R_NOT_ENOUGH_DATA 0x8002808e 347 #define TEE_ERR_ASN1_R_NO_CONTENT_TYPE 0x800280d1 348 #define TEE_ERR_ASN1_R_NO_MATCHING_CHOICE_TYPE 0x8002808f 349 #define TEE_ERR_ASN1_R_NO_MULTIPART_BODY_FAILURE 0x800280d2 350 #define TEE_ERR_ASN1_R_NO_MULTIPART_BOUNDARY 0x800280d3 351 #define TEE_ERR_ASN1_R_NO_SIG_CONTENT_TYPE 0x800280d4 352 #define TEE_ERR_ASN1_R_NULL_IS_WRONG_LENGTH 0x80028090 353 #define TEE_ERR_ASN1_R_OBJECT_NOT_ASCII_FORMAT 0x800280bf 354 #define TEE_ERR_ASN1_R_ODD_NUMBER_OF_CHARS 0x80028091 355 #define TEE_ERR_ASN1_R_SECOND_NUMBER_TOO_LARGE 0x80028093 356 #define TEE_ERR_ASN1_R_SEQUENCE_LENGTH_MISMATCH 0x80028094 357 #define TEE_ERR_ASN1_R_SEQUENCE_NOT_CONSTRUCTED 0x80028095 358 #define TEE_ERR_ASN1_R_SEQUENCE_OR_SET_NEEDS_CONFIG 0x800280c0 359 #define TEE_ERR_ASN1_R_SHORT_LINE 0x80028096 360 #define TEE_ERR_ASN1_R_SIG_INVALID_MIME_TYPE 0x800280d5 361 #define TEE_ERR_ASN1_R_STREAMING_NOT_SUPPORTED 0x800280ca 362 #define TEE_ERR_ASN1_R_STRING_TOO_LONG 0x80028097 363 #define TEE_ERR_ASN1_R_STRING_TOO_SHORT 0x80028098 364 #define TEE_ERR_ASN1_R_THE_ASN1_OBJECT_IDENTIFIER_IS_NOT_KNOWN_FOR_THIS_MD 0x8002809a 365 #define TEE_ERR_ASN1_R_TIME_NOT_ASCII_FORMAT 0x800280c1 366 #define TEE_ERR_ASN1_R_TOO_LARGE 0x800280df 367 #define TEE_ERR_ASN1_R_TOO_LONG 0x8002809b 368 #define TEE_ERR_ASN1_R_TOO_SMALL 0x800280e0 369 #define TEE_ERR_ASN1_R_TYPE_NOT_CONSTRUCTED 0x8002809c 370 #define TEE_ERR_ASN1_R_TYPE_NOT_PRIMITIVE 0x800280c3 371 #define TEE_ERR_ASN1_R_UNEXPECTED_EOC 0x8002809f 372 #define TEE_ERR_ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH 0x800280d7 373 #define TEE_ERR_ASN1_R_UNKNOWN_FORMAT 0x800280a0 374 #define TEE_ERR_ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM 0x800280a1 375 #define TEE_ERR_ASN1_R_UNKNOWN_OBJECT_TYPE 0x800280a2 376 #define TEE_ERR_ASN1_R_UNKNOWN_PUBLIC_KEY_TYPE 0x800280a3 377 #define TEE_ERR_ASN1_R_UNKNOWN_SIGNATURE_ALGORITHM 0x800280c7 378 #define TEE_ERR_ASN1_R_UNKNOWN_TAG 0x800280c2 379 #define TEE_ERR_ASN1_R_UNSUPPORTED_ANY_DEFINED_BY_TYPE 0x800280a4 380 #define TEE_ERR_ASN1_R_UNSUPPORTED_CIPHER 0x800280e4 381 #define TEE_ERR_ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE 0x800280a7 382 #define TEE_ERR_ASN1_R_UNSUPPORTED_TYPE 0x800280c4 383 #define TEE_ERR_ASN1_R_WRONG_INTEGER_TYPE 0x800280e1 384 #define TEE_ERR_ASN1_R_WRONG_PUBLIC_KEY_TYPE 0x800280c8 385 #define TEE_ERR_ASN1_R_WRONG_TAG 0x800280a8 386 387 /* for crypto lib err */ 388 #define TEE_ERR_CRYPTO_R_FIPS_MODE_NOT_SUPPORTED 0x80029065 389 #define TEE_ERR_CRYPTO_R_ILLEGAL_HEX_DIGIT 0x80029066 390 #define TEE_ERR_CRYPTO_R_ODD_NUMBER_OF_DIGITS 0x80029067 391 392 /* for ec lib err */ 393 #define TEE_ERR_EC_R_ASN1_ERROR 0x8002a073 394 #define TEE_ERR_EC_R_BAD_SIGNATURE 0x8002a09c 395 #define TEE_ERR_EC_R_BIGNUM_OUT_OF_RANGE 0x8002a090 396 #define TEE_ERR_EC_R_BUFFER_TOO_SMALL 0x8002a064 397 #define TEE_ERR_EC_R_CANNOT_INVERT 0x8002a0a5 398 #define TEE_ERR_EC_R_COORDINATES_OUT_OF_RANGE 0x8002a092 399 #define TEE_ERR_EC_R_CURVE_DOES_NOT_SUPPORT_ECDH 0x8002a0a0 400 #define TEE_ERR_EC_R_CURVE_DOES_NOT_SUPPORT_SIGNING 0x8002a09f 401 #define TEE_ERR_EC_R_D2I_ECPKPARAMETERS_FAILURE 0x8002a075 402 #define TEE_ERR_EC_R_DECODE_ERROR 0x8002a08e 403 #define TEE_ERR_EC_R_DISCRIMINANT_IS_ZERO 0x8002a076 404 #define TEE_ERR_EC_R_EC_GROUP_NEW_BY_NAME_FAILURE 0x8002a077 405 #define TEE_ERR_EC_R_FIELD_TOO_LARGE 0x8002a08f 406 #define TEE_ERR_EC_R_GF2M_NOT_SUPPORTED 0x8002a093 407 #define TEE_ERR_EC_R_GROUP2PKPARAMETERS_FAILURE 0x8002a078 408 #define TEE_ERR_EC_R_I2D_ECPKPARAMETERS_FAILURE 0x8002a079 409 #define TEE_ERR_EC_R_INCOMPATIBLE_OBJECTS 0x8002a065 410 #define TEE_ERR_EC_R_INVALID_ARGUMENT 0x8002a070 411 #define TEE_ERR_EC_R_INVALID_COMPRESSED_POINT 0x8002a06e 412 #define TEE_ERR_EC_R_INVALID_COMPRESSION_BIT 0x8002a06d 413 #define TEE_ERR_EC_R_INVALID_CURVE 0x8002a08d 414 #define TEE_ERR_EC_R_INVALID_DIGEST 0x8002a097 415 #define TEE_ERR_EC_R_INVALID_DIGEST_TYPE 0x8002a08a 416 #define TEE_ERR_EC_R_INVALID_ENCODING 0x8002a066 417 #define TEE_ERR_EC_R_INVALID_FIELD 0x8002a067 418 #define TEE_ERR_EC_R_INVALID_FORM 0x8002a068 419 #define TEE_ERR_EC_R_INVALID_GROUP_ORDER 0x8002a07a 420 #define TEE_ERR_EC_R_INVALID_KEY 0x8002a074 421 #define TEE_ERR_EC_R_INVALID_OUTPUT_LENGTH 0x8002a0a1 422 #define TEE_ERR_EC_R_INVALID_PEER_KEY 0x8002a085 423 #define TEE_ERR_EC_R_INVALID_PENTANOMIAL_BASIS 0x8002a084 424 #define TEE_ERR_EC_R_INVALID_PRIVATE_KEY 0x8002a07b 425 #define TEE_ERR_EC_R_INVALID_TRINOMIAL_BASIS 0x8002a089 426 #define TEE_ERR_EC_R_KDF_PARAMETER_ERROR 0x8002a094 427 #define TEE_ERR_EC_R_KEYS_NOT_SET 0x8002a08c 428 #define TEE_ERR_EC_R_LADDER_POST_FAILURE 0x8002a088 429 #define TEE_ERR_EC_R_LADDER_PRE_FAILURE 0x8002a099 430 #define TEE_ERR_EC_R_LADDER_STEP_FAILURE 0x8002a0a2 431 #define TEE_ERR_EC_R_MISSING_PARAMETERS 0x8002a07c 432 #define TEE_ERR_EC_R_MISSING_PRIVATE_KEY 0x8002a07d 433 #define TEE_ERR_EC_R_NEED_NEW_SETUP_VALUES 0x8002a09d 434 #define TEE_ERR_EC_R_NOT_A_NIST_PRIME 0x8002a087 435 #define TEE_ERR_EC_R_NOT_IMPLEMENTED 0x8002a07e 436 #define TEE_ERR_EC_R_NOT_INITIALIZED 0x8002a06f 437 #define TEE_ERR_EC_R_NO_PARAMETERS_SET 0x8002a08b 438 #define TEE_ERR_EC_R_NO_PRIVATE_VALUE 0x8002a09a 439 #define TEE_ERR_EC_R_OPERATION_NOT_SUPPORTED 0x8002a098 440 #define TEE_ERR_EC_R_PASSED_NULL_PARAMETER 0x8002a086 441 #define TEE_ERR_EC_R_PEER_KEY_ERROR 0x8002a095 442 #define TEE_ERR_EC_R_PKPARAMETERS2GROUP_FAILURE 0x8002a07f 443 #define TEE_ERR_EC_R_POINT_ARITHMETIC_FAILURE 0x8002a09b 444 #define TEE_ERR_EC_R_POINT_AT_INFINITY 0x8002a06a 445 #define TEE_ERR_EC_R_POINT_COORDINATES_BLIND_FAILURE 0x8002a0a3 446 #define TEE_ERR_EC_R_POINT_IS_NOT_ON_CURVE 0x8002a06b 447 #define TEE_ERR_EC_R_RANDOM_NUMBER_GENERATION_FAILED 0x8002a09e 448 #define TEE_ERR_EC_R_SHARED_INFO_ERROR 0x8002a096 449 #define TEE_ERR_EC_R_SLOT_FULL 0x8002a06c 450 #define TEE_ERR_EC_R_UNDEFINED_GENERATOR 0x8002a071 451 #define TEE_ERR_EC_R_UNDEFINED_ORDER 0x8002a080 452 #define TEE_ERR_EC_R_UNKNOWN_COFACTOR 0x8002a0a4 453 #define TEE_ERR_EC_R_UNKNOWN_GROUP 0x8002a081 454 #define TEE_ERR_EC_R_UNKNOWN_ORDER 0x8002a072 455 #define TEE_ERR_EC_R_UNSUPPORTED_FIELD 0x8002a083 456 #define TEE_ERR_EC_R_WRONG_CURVE_PARAMETERS 0x8002a091 457 #define TEE_ERR_EC_R_WRONG_ORDER 0x8002a082 458 459 /* for pkcs7 lib err */ 460 #define TEE_ERR_PKCS7_R_CERTIFICATE_VERIFY_ERROR 0x8002b075 461 #define TEE_ERR_PKCS7_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER 0x8002b090 462 #define TEE_ERR_PKCS7_R_CIPHER_NOT_INITIALIZED 0x8002b074 463 #define TEE_ERR_PKCS7_R_CONTENT_AND_DATA_PRESENT 0x8002b076 464 #define TEE_ERR_PKCS7_R_CTRL_ERROR 0x8002b098 465 #define TEE_ERR_PKCS7_R_DECRYPT_ERROR 0x8002b077 466 #define TEE_ERR_PKCS7_R_DIGEST_FAILURE 0x8002b065 467 #define TEE_ERR_PKCS7_R_ENCRYPTION_CTRL_FAILURE 0x8002b095 468 #define TEE_ERR_PKCS7_R_ENCRYPTION_NOT_SUPPORTED_FOR_THIS_KEY_TYPE 0x8002b096 469 #define TEE_ERR_PKCS7_R_ERROR_ADDING_RECIPIENT 0x8002b078 470 #define TEE_ERR_PKCS7_R_ERROR_SETTING_CIPHER 0x8002b079 471 #define TEE_ERR_PKCS7_R_INVALID_NULL_POINTER 0x8002b08f 472 #define TEE_ERR_PKCS7_R_INVALID_SIGNED_DATA_TYPE 0x8002b09b 473 #define TEE_ERR_PKCS7_R_NO_CONTENT 0x8002b07a 474 #define TEE_ERR_PKCS7_R_NO_DEFAULT_DIGEST 0x8002b097 475 #define TEE_ERR_PKCS7_R_NO_MATCHING_DIGEST_TYPE_FOUND 0x8002b09a 476 #define TEE_ERR_PKCS7_R_NO_RECIPIENT_MATCHES_CERTIFICATE 0x8002b073 477 #define TEE_ERR_PKCS7_R_NO_SIGNATURES_ON_DATA 0x8002b07b 478 #define TEE_ERR_PKCS7_R_NO_SIGNERS 0x8002b08e 479 #define TEE_ERR_PKCS7_R_OPERATION_NOT_SUPPORTED_ON_THIS_TYPE 0x8002b068 480 #define TEE_ERR_PKCS7_R_PKCS7_ADD_SIGNATURE_ERROR 0x8002b07c 481 #define TEE_ERR_PKCS7_R_PKCS7_ADD_SIGNER_ERROR 0x8002b099 482 #define TEE_ERR_PKCS7_R_PKCS7_DATASIGN 0x8002b091 483 #define TEE_ERR_PKCS7_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE 0x8002b07f 484 #define TEE_ERR_PKCS7_R_SIGNATURE_FAILURE 0x8002b069 485 #define TEE_ERR_PKCS7_R_SIGNER_CERTIFICATE_NOT_FOUND 0x8002b080 486 #define TEE_ERR_PKCS7_R_SIGNING_CTRL_FAILURE 0x8002b093 487 #define TEE_ERR_PKCS7_R_SIGNING_NOT_SUPPORTED_FOR_THIS_KEY_TYPE 0x8002b094 488 #define TEE_ERR_PKCS7_R_SMIME_TEXT_ERROR 0x8002b081 489 #define TEE_ERR_PKCS7_R_UNABLE_TO_FIND_CERTIFICATE 0x8002b06a 490 #define TEE_ERR_PKCS7_R_UNABLE_TO_FIND_MEM_BIO 0x8002b06b 491 #define TEE_ERR_PKCS7_R_UNABLE_TO_FIND_MESSAGE_DIGEST 0x8002b06c 492 #define TEE_ERR_PKCS7_R_UNKNOWN_DIGEST_TYPE 0x8002b06d 493 #define TEE_ERR_PKCS7_R_UNKNOWN_OPERATION 0x8002b06e 494 #define TEE_ERR_PKCS7_R_UNSUPPORTED_CIPHER_TYPE 0x8002b06f 495 #define TEE_ERR_PKCS7_R_UNSUPPORTED_CONTENT_TYPE 0x8002b070 496 #define TEE_ERR_PKCS7_R_WRONG_CONTENT_TYPE 0x8002b071 497 #define TEE_ERR_PKCS7_R_WRONG_PKCS7_TYPE 0x8002b072 498 499 #endif