]> git.ipfire.org Git - thirdparty/openssl.git/blame - crypto/cmp/cmp_err.c
Fix an s_server arbitrary file read issue on Windows
[thirdparty/openssl.git] / crypto / cmp / cmp_err.c
CommitLineData
8869ad4a 1/*
7960dbec
DDO
2 * Copyright 2007-2019 The OpenSSL Project Authors. All Rights Reserved.
3 * Copyright Nokia 2007-2019
4 * Copyright Siemens AG 2015-2019
8869ad4a
AK
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
8869ad4a 17static const ERR_STRING_DATA CMP_str_reasons[] = {
7960dbec
DDO
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"},
8869ad4a
AK
23 {0, NULL}
24};
25
26#endif
27
28int ERR_load_CMP_strings(void)
29{
30#ifndef OPENSSL_NO_ERR
0cd1b144 31 if (ERR_reason_error_string(CMP_str_reasons[0].error) == NULL)
8869ad4a 32 ERR_load_strings_const(CMP_str_reasons);
8869ad4a
AK
33#endif
34 return 1;
35}