Fix crash
[openssl.git] / crypto / err / err_all.c
1 /*
2  * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
3  *
4  * Licensed under the OpenSSL license (the "License").  You may not use
5  * this file except in compliance with the License.  You can obtain a copy
6  * in the file LICENSE in the source distribution or at
7  * https://www.openssl.org/source/license.html
8  */
9
10 #include <stdio.h>
11 #include "internal/err_int.h"
12 #include <openssl/asn1.h>
13 #include <openssl/bn.h>
14 #include <openssl/ec.h>
15 #include <openssl/buffer.h>
16 #include <openssl/bio.h>
17 #include <openssl/comp.h>
18 #include <openssl/rsa.h>
19 #include <openssl/dh.h>
20 #include <openssl/dsa.h>
21 #include <openssl/evp.h>
22 #include <openssl/objects.h>
23 #include <openssl/pem2.h>
24 #include <openssl/x509.h>
25 #include <openssl/x509v3.h>
26 #include <openssl/conf.h>
27 #include <openssl/pkcs12.h>
28 #include <openssl/rand.h>
29 #include "internal/dso.h"
30 #include <openssl/engine.h>
31 #include <openssl/ui.h>
32 #include <openssl/ocsp.h>
33 #include <openssl/err.h>
34 #include <openssl/ts.h>
35 #include <openssl/cms.h>
36 #include <openssl/ct.h>
37 #include <openssl/async.h>
38 #include <openssl/kdf.h>
39 #include <openssl/store.h>
40
41 int err_load_crypto_strings_int(void)
42 {
43     if (
44 #ifndef OPENSSL_NO_ERR
45         ERR_load_ERR_strings() == 0 ||    /* include error strings for SYSerr */
46         ERR_load_BN_strings() == 0 ||
47 # ifndef OPENSSL_NO_RSA
48         ERR_load_RSA_strings() == 0 ||
49 # endif
50 # ifndef OPENSSL_NO_DH
51         ERR_load_DH_strings() == 0 ||
52 # endif
53         ERR_load_EVP_strings() == 0 ||
54         ERR_load_BUF_strings() == 0 ||
55         ERR_load_OBJ_strings() == 0 ||
56         ERR_load_PEM_strings() == 0 ||
57 # ifndef OPENSSL_NO_DSA
58         ERR_load_DSA_strings() == 0 ||
59 # endif
60         ERR_load_X509_strings() == 0 ||
61         ERR_load_ASN1_strings() == 0 ||
62         ERR_load_CONF_strings() == 0 ||
63         ERR_load_CRYPTO_strings() == 0 ||
64 # ifndef OPENSSL_NO_COMP
65         ERR_load_COMP_strings() == 0 ||
66 # endif
67 # ifndef OPENSSL_NO_EC
68         ERR_load_EC_strings() == 0 ||
69 # endif
70         /* skip ERR_load_SSL_strings() because it is not in this library */
71         ERR_load_BIO_strings() == 0 ||
72         ERR_load_PKCS7_strings() == 0 ||
73         ERR_load_X509V3_strings() == 0 ||
74         ERR_load_PKCS12_strings() == 0 ||
75         ERR_load_RAND_strings() == 0 ||
76         ERR_load_DSO_strings() == 0 ||
77 # ifndef OPENSSL_NO_TS
78         ERR_load_TS_strings() == 0 ||
79 # endif
80 # ifndef OPENSSL_NO_ENGINE
81         ERR_load_ENGINE_strings() == 0 ||
82 # endif
83 # ifndef OPENSSL_NO_OCSP
84         ERR_load_OCSP_strings() == 0 ||
85 # endif
86         ERR_load_UI_strings() == 0 ||
87 # ifndef OPENSSL_NO_CMS
88         ERR_load_CMS_strings() == 0 ||
89 # endif
90 # ifndef OPENSSL_NO_CT
91         ERR_load_CT_strings() == 0 ||
92 # endif
93         ERR_load_ASYNC_strings() == 0 ||
94 #endif
95         ERR_load_KDF_strings() == 0 ||
96         ERR_load_OSSL_STORE_strings() == 0)
97         return 0;
98
99     return 1;
100 }