]> git.ipfire.org Git - thirdparty/openssl.git/blob - crypto/cmp/cmp_err.c
4086d5220b16d53a0b69a2b2de164272dd3a8af1
[thirdparty/openssl.git] / crypto / cmp / cmp_err.c
1 /*
2 * Copyright 2007-2019 The OpenSSL Project Authors. All Rights Reserved.
3 * Copyright Nokia 2007-2019
4 * Copyright Siemens AG 2015-2019
5 *
6 * Licensed under the Apache License 2.0 (the "License"). You may not use
7 * this file except in compliance with the License. You can obtain a copy
8 * in the file LICENSE in the source distribution or at
9 * https://www.openssl.org/source/license.html
10 */
11
12 #include <openssl/err.h>
13 #include <openssl/cmperr.h>
14
15 #ifndef OPENSSL_NO_ERR
16
17 static const ERR_STRING_DATA CMP_str_reasons[] = {
18 {ERR_PACK(ERR_LIB_CMP, 0, CMP_R_INVALID_ARGS), "invalid args"},
19 {ERR_PACK(ERR_LIB_CMP, 0, CMP_R_MULTIPLE_SAN_SOURCES),
20 "multiple san sources"},
21 {ERR_PACK(ERR_LIB_CMP, 0, CMP_R_NO_STDIO), "no stdio"},
22 {ERR_PACK(ERR_LIB_CMP, 0, CMP_R_NULL_ARGUMENT), "null argument"},
23 {0, NULL}
24 };
25
26 #endif
27
28 int ERR_load_CMP_strings(void)
29 {
30 #ifndef OPENSSL_NO_ERR
31 if (ERR_reason_error_string(CMP_str_reasons[0].error) == NULL)
32 ERR_load_strings_const(CMP_str_reasons);
33 #endif
34 return 1;
35 }