1e1051a39Sopenharmony_ci/* 2e1051a39Sopenharmony_ci * Generated by util/mkerr.pl DO NOT EDIT 3e1051a39Sopenharmony_ci * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4e1051a39Sopenharmony_ci * 5e1051a39Sopenharmony_ci * Licensed under the Apache License 2.0 (the "License"). You may not use 6e1051a39Sopenharmony_ci * this file except in compliance with the License. You can obtain a copy 7e1051a39Sopenharmony_ci * in the file LICENSE in the source distribution or at 8e1051a39Sopenharmony_ci * https://www.openssl.org/source/license.html 9e1051a39Sopenharmony_ci */ 10e1051a39Sopenharmony_ci 11e1051a39Sopenharmony_ci#include <openssl/err.h> 12e1051a39Sopenharmony_ci#include <openssl/x509err.h> 13e1051a39Sopenharmony_ci#include "crypto/x509err.h" 14e1051a39Sopenharmony_ci 15e1051a39Sopenharmony_ci#ifndef OPENSSL_NO_ERR 16e1051a39Sopenharmony_ci 17e1051a39Sopenharmony_cistatic const ERR_STRING_DATA X509_str_reasons[] = { 18e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_X509, 0, X509_R_AKID_MISMATCH), "akid mismatch"}, 19e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_X509, 0, X509_R_BAD_SELECTOR), "bad selector"}, 20e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_X509, 0, X509_R_BAD_X509_FILETYPE), "bad x509 filetype"}, 21e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_X509, 0, X509_R_BASE64_DECODE_ERROR), 22e1051a39Sopenharmony_ci "base64 decode error"}, 23e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_X509, 0, X509_R_CANT_CHECK_DH_KEY), "cant check dh key"}, 24e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_X509, 0, X509_R_CERTIFICATE_VERIFICATION_FAILED), 25e1051a39Sopenharmony_ci "certificate verification failed"}, 26e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_X509, 0, X509_R_CERT_ALREADY_IN_HASH_TABLE), 27e1051a39Sopenharmony_ci "cert already in hash table"}, 28e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_X509, 0, X509_R_CRL_ALREADY_DELTA), "crl already delta"}, 29e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_X509, 0, X509_R_CRL_VERIFY_FAILURE), 30e1051a39Sopenharmony_ci "crl verify failure"}, 31e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_X509, 0, X509_R_ERROR_GETTING_MD_BY_NID), 32e1051a39Sopenharmony_ci "error getting md by nid"}, 33e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_X509, 0, X509_R_ERROR_USING_SIGINF_SET), 34e1051a39Sopenharmony_ci "error using siginf set"}, 35e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_X509, 0, X509_R_IDP_MISMATCH), "idp mismatch"}, 36e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_X509, 0, X509_R_INVALID_ATTRIBUTES), 37e1051a39Sopenharmony_ci "invalid attributes"}, 38e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_X509, 0, X509_R_INVALID_DIRECTORY), "invalid directory"}, 39e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_X509, 0, X509_R_INVALID_DISTPOINT), "invalid distpoint"}, 40e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_X509, 0, X509_R_INVALID_FIELD_NAME), 41e1051a39Sopenharmony_ci "invalid field name"}, 42e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_X509, 0, X509_R_INVALID_TRUST), "invalid trust"}, 43e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_X509, 0, X509_R_ISSUER_MISMATCH), "issuer mismatch"}, 44e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_X509, 0, X509_R_KEY_TYPE_MISMATCH), "key type mismatch"}, 45e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_X509, 0, X509_R_KEY_VALUES_MISMATCH), 46e1051a39Sopenharmony_ci "key values mismatch"}, 47e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_X509, 0, X509_R_LOADING_CERT_DIR), "loading cert dir"}, 48e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_X509, 0, X509_R_LOADING_DEFAULTS), "loading defaults"}, 49e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_X509, 0, X509_R_METHOD_NOT_SUPPORTED), 50e1051a39Sopenharmony_ci "method not supported"}, 51e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_X509, 0, X509_R_NAME_TOO_LONG), "name too long"}, 52e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_X509, 0, X509_R_NEWER_CRL_NOT_NEWER), 53e1051a39Sopenharmony_ci "newer crl not newer"}, 54e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_X509, 0, X509_R_NO_CERTIFICATE_FOUND), 55e1051a39Sopenharmony_ci "no certificate found"}, 56e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_X509, 0, X509_R_NO_CERTIFICATE_OR_CRL_FOUND), 57e1051a39Sopenharmony_ci "no certificate or crl found"}, 58e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_X509, 0, X509_R_NO_CERT_SET_FOR_US_TO_VERIFY), 59e1051a39Sopenharmony_ci "no cert set for us to verify"}, 60e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_X509, 0, X509_R_NO_CRL_FOUND), "no crl found"}, 61e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_X509, 0, X509_R_NO_CRL_NUMBER), "no crl number"}, 62e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_X509, 0, X509_R_PUBLIC_KEY_DECODE_ERROR), 63e1051a39Sopenharmony_ci "public key decode error"}, 64e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_X509, 0, X509_R_PUBLIC_KEY_ENCODE_ERROR), 65e1051a39Sopenharmony_ci "public key encode error"}, 66e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_X509, 0, X509_R_SHOULD_RETRY), "should retry"}, 67e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_X509, 0, X509_R_UNABLE_TO_FIND_PARAMETERS_IN_CHAIN), 68e1051a39Sopenharmony_ci "unable to find parameters in chain"}, 69e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_X509, 0, X509_R_UNABLE_TO_GET_CERTS_PUBLIC_KEY), 70e1051a39Sopenharmony_ci "unable to get certs public key"}, 71e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_X509, 0, X509_R_UNKNOWN_KEY_TYPE), "unknown key type"}, 72e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_X509, 0, X509_R_UNKNOWN_NID), "unknown nid"}, 73e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_X509, 0, X509_R_UNKNOWN_PURPOSE_ID), 74e1051a39Sopenharmony_ci "unknown purpose id"}, 75e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_X509, 0, X509_R_UNKNOWN_SIGID_ALGS), 76e1051a39Sopenharmony_ci "unknown sigid algs"}, 77e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_X509, 0, X509_R_UNKNOWN_TRUST_ID), "unknown trust id"}, 78e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_X509, 0, X509_R_UNSUPPORTED_ALGORITHM), 79e1051a39Sopenharmony_ci "unsupported algorithm"}, 80e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_X509, 0, X509_R_WRONG_LOOKUP_TYPE), "wrong lookup type"}, 81e1051a39Sopenharmony_ci {ERR_PACK(ERR_LIB_X509, 0, X509_R_WRONG_TYPE), "wrong type"}, 82e1051a39Sopenharmony_ci {0, NULL} 83e1051a39Sopenharmony_ci}; 84e1051a39Sopenharmony_ci 85e1051a39Sopenharmony_ci#endif 86e1051a39Sopenharmony_ci 87e1051a39Sopenharmony_ciint ossl_err_load_X509_strings(void) 88e1051a39Sopenharmony_ci{ 89e1051a39Sopenharmony_ci#ifndef OPENSSL_NO_ERR 90e1051a39Sopenharmony_ci if (ERR_reason_error_string(X509_str_reasons[0].error) == NULL) 91e1051a39Sopenharmony_ci ERR_load_strings_const(X509_str_reasons); 92e1051a39Sopenharmony_ci#endif 93e1051a39Sopenharmony_ci return 1; 94e1051a39Sopenharmony_ci} 95