Home | History | Annotate | Line # | Download | only in engines
      1  1.1  christos /*
      2  1.1  christos  * Generated by util/mkerr.pl DO NOT EDIT
      3  1.1  christos  * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
      4  1.1  christos  *
      5  1.1  christos  * Licensed under the Apache License 2.0 (the "License").  You may not use
      6  1.1  christos  * this file except in compliance with the License.  You can obtain a copy
      7  1.1  christos  * in the file LICENSE in the source distribution or at
      8  1.1  christos  * https://www.openssl.org/source/license.html
      9  1.1  christos  */
     10  1.1  christos 
     11  1.1  christos #include <openssl/err.h>
     12  1.1  christos #include "e_loader_attic_err.h"
     13  1.1  christos 
     14  1.1  christos #ifndef OPENSSL_NO_ERR
     15  1.1  christos 
     16  1.1  christos static ERR_STRING_DATA ATTIC_str_reasons[] = {
     17  1.1  christos     {ERR_PACK(0, 0, ATTIC_R_AMBIGUOUS_CONTENT_TYPE), "ambiguous content type"},
     18  1.1  christos     {ERR_PACK(0, 0, ATTIC_R_BAD_PASSWORD_READ), "bad password read"},
     19  1.1  christos     {ERR_PACK(0, 0, ATTIC_R_ERROR_VERIFYING_PKCS12_MAC),
     20  1.1  christos     "error verifying pkcs12 mac"},
     21  1.1  christos     {ERR_PACK(0, 0, ATTIC_R_INIT_FAILED), "init failed"},
     22  1.1  christos     {ERR_PACK(0, 0, ATTIC_R_PASSPHRASE_CALLBACK_ERROR),
     23  1.1  christos     "passphrase callback error"},
     24  1.1  christos     {ERR_PACK(0, 0, ATTIC_R_PATH_MUST_BE_ABSOLUTE), "path must be absolute"},
     25  1.1  christos     {ERR_PACK(0, 0, ATTIC_R_SEARCH_ONLY_SUPPORTED_FOR_DIRECTORIES),
     26  1.1  christos     "search only supported for directories"},
     27  1.1  christos     {ERR_PACK(0, 0, ATTIC_R_UI_PROCESS_INTERRUPTED_OR_CANCELLED),
     28  1.1  christos     "ui process interrupted or cancelled"},
     29  1.1  christos     {ERR_PACK(0, 0, ATTIC_R_UNSUPPORTED_CONTENT_TYPE),
     30  1.1  christos     "unsupported content type"},
     31  1.1  christos     {ERR_PACK(0, 0, ATTIC_R_UNSUPPORTED_SEARCH_TYPE),
     32  1.1  christos     "unsupported search type"},
     33  1.1  christos     {ERR_PACK(0, 0, ATTIC_R_URI_AUTHORITY_UNSUPPORTED),
     34  1.1  christos     "uri authority unsupported"},
     35  1.1  christos     {0, NULL}
     36  1.1  christos };
     37  1.1  christos 
     38  1.1  christos #endif
     39  1.1  christos 
     40  1.1  christos static int lib_code = 0;
     41  1.1  christos static int error_loaded = 0;
     42  1.1  christos 
     43  1.1  christos static int ERR_load_ATTIC_strings(void)
     44  1.1  christos {
     45  1.1  christos     if (lib_code == 0)
     46  1.1  christos         lib_code = ERR_get_next_error_library();
     47  1.1  christos 
     48  1.1  christos     if (!error_loaded) {
     49  1.1  christos #ifndef OPENSSL_NO_ERR
     50  1.1  christos         ERR_load_strings(lib_code, ATTIC_str_reasons);
     51  1.1  christos #endif
     52  1.1  christos         error_loaded = 1;
     53  1.1  christos     }
     54  1.1  christos     return 1;
     55  1.1  christos }
     56  1.1  christos 
     57  1.1  christos static void ERR_unload_ATTIC_strings(void)
     58  1.1  christos {
     59  1.1  christos     if (error_loaded) {
     60  1.1  christos #ifndef OPENSSL_NO_ERR
     61  1.1  christos         ERR_unload_strings(lib_code, ATTIC_str_reasons);
     62  1.1  christos #endif
     63  1.1  christos         error_loaded = 0;
     64  1.1  christos     }
     65  1.1  christos }
     66  1.1  christos 
     67  1.1  christos static void ERR_ATTIC_error(int function, int reason, const char *file, int line)
     68  1.1  christos {
     69  1.1  christos     if (lib_code == 0)
     70  1.1  christos         lib_code = ERR_get_next_error_library();
     71  1.1  christos     ERR_raise(lib_code, reason);
     72  1.1  christos     ERR_set_debug(file, line, NULL);
     73  1.1  christos }
     74