11cb0ef41Sopenharmony_ci/*
21cb0ef41Sopenharmony_ci * Generated by util/mkerr.pl DO NOT EDIT
31cb0ef41Sopenharmony_ci * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved.
41cb0ef41Sopenharmony_ci *
51cb0ef41Sopenharmony_ci * Licensed under the Apache License 2.0 (the "License").  You may not use
61cb0ef41Sopenharmony_ci * this file except in compliance with the License.  You can obtain a copy
71cb0ef41Sopenharmony_ci * in the file LICENSE in the source distribution or at
81cb0ef41Sopenharmony_ci * https://www.openssl.org/source/license.html
91cb0ef41Sopenharmony_ci */
101cb0ef41Sopenharmony_ci
111cb0ef41Sopenharmony_ci#include <openssl/err.h>
121cb0ef41Sopenharmony_ci#include <openssl/x509err.h>
131cb0ef41Sopenharmony_ci#include "crypto/x509err.h"
141cb0ef41Sopenharmony_ci
151cb0ef41Sopenharmony_ci#ifndef OPENSSL_NO_ERR
161cb0ef41Sopenharmony_ci
171cb0ef41Sopenharmony_cistatic const ERR_STRING_DATA X509_str_reasons[] = {
181cb0ef41Sopenharmony_ci    {ERR_PACK(ERR_LIB_X509, 0, X509_R_AKID_MISMATCH), "akid mismatch"},
191cb0ef41Sopenharmony_ci    {ERR_PACK(ERR_LIB_X509, 0, X509_R_BAD_SELECTOR), "bad selector"},
201cb0ef41Sopenharmony_ci    {ERR_PACK(ERR_LIB_X509, 0, X509_R_BAD_X509_FILETYPE), "bad x509 filetype"},
211cb0ef41Sopenharmony_ci    {ERR_PACK(ERR_LIB_X509, 0, X509_R_BASE64_DECODE_ERROR),
221cb0ef41Sopenharmony_ci    "base64 decode error"},
231cb0ef41Sopenharmony_ci    {ERR_PACK(ERR_LIB_X509, 0, X509_R_CANT_CHECK_DH_KEY), "cant check dh key"},
241cb0ef41Sopenharmony_ci    {ERR_PACK(ERR_LIB_X509, 0, X509_R_CERTIFICATE_VERIFICATION_FAILED),
251cb0ef41Sopenharmony_ci    "certificate verification failed"},
261cb0ef41Sopenharmony_ci    {ERR_PACK(ERR_LIB_X509, 0, X509_R_CERT_ALREADY_IN_HASH_TABLE),
271cb0ef41Sopenharmony_ci    "cert already in hash table"},
281cb0ef41Sopenharmony_ci    {ERR_PACK(ERR_LIB_X509, 0, X509_R_CRL_ALREADY_DELTA), "crl already delta"},
291cb0ef41Sopenharmony_ci    {ERR_PACK(ERR_LIB_X509, 0, X509_R_CRL_VERIFY_FAILURE),
301cb0ef41Sopenharmony_ci    "crl verify failure"},
311cb0ef41Sopenharmony_ci    {ERR_PACK(ERR_LIB_X509, 0, X509_R_DUPLICATE_ATTRIBUTE),
321cb0ef41Sopenharmony_ci    "duplicate attribute"},
331cb0ef41Sopenharmony_ci    {ERR_PACK(ERR_LIB_X509, 0, X509_R_ERROR_GETTING_MD_BY_NID),
341cb0ef41Sopenharmony_ci    "error getting md by nid"},
351cb0ef41Sopenharmony_ci    {ERR_PACK(ERR_LIB_X509, 0, X509_R_ERROR_USING_SIGINF_SET),
361cb0ef41Sopenharmony_ci    "error using siginf set"},
371cb0ef41Sopenharmony_ci    {ERR_PACK(ERR_LIB_X509, 0, X509_R_IDP_MISMATCH), "idp mismatch"},
381cb0ef41Sopenharmony_ci    {ERR_PACK(ERR_LIB_X509, 0, X509_R_INVALID_ATTRIBUTES),
391cb0ef41Sopenharmony_ci    "invalid attributes"},
401cb0ef41Sopenharmony_ci    {ERR_PACK(ERR_LIB_X509, 0, X509_R_INVALID_DIRECTORY), "invalid directory"},
411cb0ef41Sopenharmony_ci    {ERR_PACK(ERR_LIB_X509, 0, X509_R_INVALID_DISTPOINT), "invalid distpoint"},
421cb0ef41Sopenharmony_ci    {ERR_PACK(ERR_LIB_X509, 0, X509_R_INVALID_FIELD_NAME),
431cb0ef41Sopenharmony_ci    "invalid field name"},
441cb0ef41Sopenharmony_ci    {ERR_PACK(ERR_LIB_X509, 0, X509_R_INVALID_TRUST), "invalid trust"},
451cb0ef41Sopenharmony_ci    {ERR_PACK(ERR_LIB_X509, 0, X509_R_ISSUER_MISMATCH), "issuer mismatch"},
461cb0ef41Sopenharmony_ci    {ERR_PACK(ERR_LIB_X509, 0, X509_R_KEY_TYPE_MISMATCH), "key type mismatch"},
471cb0ef41Sopenharmony_ci    {ERR_PACK(ERR_LIB_X509, 0, X509_R_KEY_VALUES_MISMATCH),
481cb0ef41Sopenharmony_ci    "key values mismatch"},
491cb0ef41Sopenharmony_ci    {ERR_PACK(ERR_LIB_X509, 0, X509_R_LOADING_CERT_DIR), "loading cert dir"},
501cb0ef41Sopenharmony_ci    {ERR_PACK(ERR_LIB_X509, 0, X509_R_LOADING_DEFAULTS), "loading defaults"},
511cb0ef41Sopenharmony_ci    {ERR_PACK(ERR_LIB_X509, 0, X509_R_METHOD_NOT_SUPPORTED),
521cb0ef41Sopenharmony_ci    "method not supported"},
531cb0ef41Sopenharmony_ci    {ERR_PACK(ERR_LIB_X509, 0, X509_R_NAME_TOO_LONG), "name too long"},
541cb0ef41Sopenharmony_ci    {ERR_PACK(ERR_LIB_X509, 0, X509_R_NEWER_CRL_NOT_NEWER),
551cb0ef41Sopenharmony_ci    "newer crl not newer"},
561cb0ef41Sopenharmony_ci    {ERR_PACK(ERR_LIB_X509, 0, X509_R_NO_CERTIFICATE_FOUND),
571cb0ef41Sopenharmony_ci    "no certificate found"},
581cb0ef41Sopenharmony_ci    {ERR_PACK(ERR_LIB_X509, 0, X509_R_NO_CERTIFICATE_OR_CRL_FOUND),
591cb0ef41Sopenharmony_ci    "no certificate or crl found"},
601cb0ef41Sopenharmony_ci    {ERR_PACK(ERR_LIB_X509, 0, X509_R_NO_CERT_SET_FOR_US_TO_VERIFY),
611cb0ef41Sopenharmony_ci    "no cert set for us to verify"},
621cb0ef41Sopenharmony_ci    {ERR_PACK(ERR_LIB_X509, 0, X509_R_NO_CRL_FOUND), "no crl found"},
631cb0ef41Sopenharmony_ci    {ERR_PACK(ERR_LIB_X509, 0, X509_R_NO_CRL_NUMBER), "no crl number"},
641cb0ef41Sopenharmony_ci    {ERR_PACK(ERR_LIB_X509, 0, X509_R_PUBLIC_KEY_DECODE_ERROR),
651cb0ef41Sopenharmony_ci    "public key decode error"},
661cb0ef41Sopenharmony_ci    {ERR_PACK(ERR_LIB_X509, 0, X509_R_PUBLIC_KEY_ENCODE_ERROR),
671cb0ef41Sopenharmony_ci    "public key encode error"},
681cb0ef41Sopenharmony_ci    {ERR_PACK(ERR_LIB_X509, 0, X509_R_SHOULD_RETRY), "should retry"},
691cb0ef41Sopenharmony_ci    {ERR_PACK(ERR_LIB_X509, 0, X509_R_UNABLE_TO_FIND_PARAMETERS_IN_CHAIN),
701cb0ef41Sopenharmony_ci    "unable to find parameters in chain"},
711cb0ef41Sopenharmony_ci    {ERR_PACK(ERR_LIB_X509, 0, X509_R_UNABLE_TO_GET_CERTS_PUBLIC_KEY),
721cb0ef41Sopenharmony_ci    "unable to get certs public key"},
731cb0ef41Sopenharmony_ci    {ERR_PACK(ERR_LIB_X509, 0, X509_R_UNKNOWN_KEY_TYPE), "unknown key type"},
741cb0ef41Sopenharmony_ci    {ERR_PACK(ERR_LIB_X509, 0, X509_R_UNKNOWN_NID), "unknown nid"},
751cb0ef41Sopenharmony_ci    {ERR_PACK(ERR_LIB_X509, 0, X509_R_UNKNOWN_PURPOSE_ID),
761cb0ef41Sopenharmony_ci    "unknown purpose id"},
771cb0ef41Sopenharmony_ci    {ERR_PACK(ERR_LIB_X509, 0, X509_R_UNKNOWN_SIGID_ALGS),
781cb0ef41Sopenharmony_ci    "unknown sigid algs"},
791cb0ef41Sopenharmony_ci    {ERR_PACK(ERR_LIB_X509, 0, X509_R_UNKNOWN_TRUST_ID), "unknown trust id"},
801cb0ef41Sopenharmony_ci    {ERR_PACK(ERR_LIB_X509, 0, X509_R_UNSUPPORTED_ALGORITHM),
811cb0ef41Sopenharmony_ci    "unsupported algorithm"},
821cb0ef41Sopenharmony_ci    {ERR_PACK(ERR_LIB_X509, 0, X509_R_WRONG_LOOKUP_TYPE), "wrong lookup type"},
831cb0ef41Sopenharmony_ci    {ERR_PACK(ERR_LIB_X509, 0, X509_R_WRONG_TYPE), "wrong type"},
841cb0ef41Sopenharmony_ci    {0, NULL}
851cb0ef41Sopenharmony_ci};
861cb0ef41Sopenharmony_ci
871cb0ef41Sopenharmony_ci#endif
881cb0ef41Sopenharmony_ci
891cb0ef41Sopenharmony_ciint ossl_err_load_X509_strings(void)
901cb0ef41Sopenharmony_ci{
911cb0ef41Sopenharmony_ci#ifndef OPENSSL_NO_ERR
921cb0ef41Sopenharmony_ci    if (ERR_reason_error_string(X509_str_reasons[0].error) == NULL)
931cb0ef41Sopenharmony_ci        ERR_load_strings_const(X509_str_reasons);
941cb0ef41Sopenharmony_ci#endif
951cb0ef41Sopenharmony_ci    return 1;
961cb0ef41Sopenharmony_ci}
97