Reorganize local header files
[openssl.git] / include / openssl / types.h
1 /*
2  * Copyright 2001-2018 The OpenSSL Project Authors. All Rights Reserved.
3  *
4  * Licensed under the Apache License 2.0 (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 #ifndef HEADER_OPENSSL_TYPES_H
11 # define HEADER_OPENSSL_TYPES_H
12
13 #include <limits.h>
14
15 #ifdef  __cplusplus
16 extern "C" {
17 #endif
18
19 # include <openssl/e_os2.h>
20
21 typedef struct ossl_provider_st OSSL_PROVIDER; /* Provider Object */
22
23 # ifdef NO_ASN1_TYPEDEFS
24 #  define ASN1_INTEGER            ASN1_STRING
25 #  define ASN1_ENUMERATED         ASN1_STRING
26 #  define ASN1_BIT_STRING         ASN1_STRING
27 #  define ASN1_OCTET_STRING       ASN1_STRING
28 #  define ASN1_PRINTABLESTRING    ASN1_STRING
29 #  define ASN1_T61STRING          ASN1_STRING
30 #  define ASN1_IA5STRING          ASN1_STRING
31 #  define ASN1_UTCTIME            ASN1_STRING
32 #  define ASN1_GENERALIZEDTIME    ASN1_STRING
33 #  define ASN1_TIME               ASN1_STRING
34 #  define ASN1_GENERALSTRING      ASN1_STRING
35 #  define ASN1_UNIVERSALSTRING    ASN1_STRING
36 #  define ASN1_BMPSTRING          ASN1_STRING
37 #  define ASN1_VISIBLESTRING      ASN1_STRING
38 #  define ASN1_UTF8STRING         ASN1_STRING
39 #  define ASN1_BOOLEAN            int
40 #  define ASN1_NULL               int
41 # else
42 typedef struct asn1_string_st ASN1_INTEGER;
43 typedef struct asn1_string_st ASN1_ENUMERATED;
44 typedef struct asn1_string_st ASN1_BIT_STRING;
45 typedef struct asn1_string_st ASN1_OCTET_STRING;
46 typedef struct asn1_string_st ASN1_PRINTABLESTRING;
47 typedef struct asn1_string_st ASN1_T61STRING;
48 typedef struct asn1_string_st ASN1_IA5STRING;
49 typedef struct asn1_string_st ASN1_GENERALSTRING;
50 typedef struct asn1_string_st ASN1_UNIVERSALSTRING;
51 typedef struct asn1_string_st ASN1_BMPSTRING;
52 typedef struct asn1_string_st ASN1_UTCTIME;
53 typedef struct asn1_string_st ASN1_TIME;
54 typedef struct asn1_string_st ASN1_GENERALIZEDTIME;
55 typedef struct asn1_string_st ASN1_VISIBLESTRING;
56 typedef struct asn1_string_st ASN1_UTF8STRING;
57 typedef struct asn1_string_st ASN1_STRING;
58 typedef int ASN1_BOOLEAN;
59 typedef int ASN1_NULL;
60 # endif
61
62 typedef struct asn1_object_st ASN1_OBJECT;
63
64 typedef struct ASN1_ITEM_st ASN1_ITEM;
65 typedef struct asn1_pctx_st ASN1_PCTX;
66 typedef struct asn1_sctx_st ASN1_SCTX;
67
68 # ifdef _WIN32
69 #  undef X509_NAME
70 #  undef X509_EXTENSIONS
71 #  undef PKCS7_ISSUER_AND_SERIAL
72 #  undef PKCS7_SIGNER_INFO
73 #  undef OCSP_REQUEST
74 #  undef OCSP_RESPONSE
75 # endif
76
77 # ifdef BIGNUM
78 #  undef BIGNUM
79 # endif
80 struct dane_st;
81 typedef struct bio_st BIO;
82 typedef struct bignum_st BIGNUM;
83 typedef struct bignum_ctx BN_CTX;
84 typedef struct bn_blinding_st BN_BLINDING;
85 typedef struct bn_mont_ctx_st BN_MONT_CTX;
86 typedef struct bn_recp_ctx_st BN_RECP_CTX;
87 typedef struct bn_gencb_st BN_GENCB;
88
89 typedef struct buf_mem_st BUF_MEM;
90
91 typedef struct err_state_st ERR_STATE;
92
93 typedef struct evp_cipher_st EVP_CIPHER;
94 typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX;
95 typedef struct evp_md_st EVP_MD;
96 typedef struct evp_md_ctx_st EVP_MD_CTX;
97 typedef struct evp_mac_st EVP_MAC;
98 typedef struct evp_mac_ctx_st EVP_MAC_CTX;
99 typedef struct evp_pkey_st EVP_PKEY;
100
101 typedef struct evp_pkey_asn1_method_st EVP_PKEY_ASN1_METHOD;
102
103 typedef struct evp_pkey_method_st EVP_PKEY_METHOD;
104 typedef struct evp_pkey_ctx_st EVP_PKEY_CTX;
105
106 typedef struct evp_keymgmt_st EVP_KEYMGMT;
107
108 typedef struct evp_kdf_st EVP_KDF;
109 typedef struct evp_kdf_ctx_st EVP_KDF_CTX;
110
111 typedef struct evp_keyexch_st EVP_KEYEXCH;
112
113 typedef struct evp_signature_st EVP_SIGNATURE;
114
115 typedef struct evp_Encode_Ctx_st EVP_ENCODE_CTX;
116
117 typedef struct hmac_ctx_st HMAC_CTX;
118
119 typedef struct dh_st DH;
120 typedef struct dh_method DH_METHOD;
121
122 typedef struct dsa_st DSA;
123 typedef struct dsa_method DSA_METHOD;
124
125 typedef struct rsa_st RSA;
126 typedef struct rsa_meth_st RSA_METHOD;
127
128 typedef struct ec_key_st EC_KEY;
129 typedef struct ec_key_method_st EC_KEY_METHOD;
130
131 typedef struct rand_meth_st RAND_METHOD;
132 typedef struct rand_drbg_st RAND_DRBG;
133
134 typedef struct ssl_dane_st SSL_DANE;
135 typedef struct x509_st X509;
136 typedef struct X509_algor_st X509_ALGOR;
137 typedef struct X509_crl_st X509_CRL;
138 typedef struct x509_crl_method_st X509_CRL_METHOD;
139 typedef struct x509_revoked_st X509_REVOKED;
140 typedef struct X509_name_st X509_NAME;
141 typedef struct X509_pubkey_st X509_PUBKEY;
142 typedef struct x509_store_st X509_STORE;
143 typedef struct x509_store_ctx_st X509_STORE_CTX;
144
145 typedef struct x509_object_st X509_OBJECT;
146 typedef struct x509_lookup_st X509_LOOKUP;
147 typedef struct x509_lookup_method_st X509_LOOKUP_METHOD;
148 typedef struct X509_VERIFY_PARAM_st X509_VERIFY_PARAM;
149
150 typedef struct x509_sig_info_st X509_SIG_INFO;
151
152 typedef struct pkcs8_priv_key_info_st PKCS8_PRIV_KEY_INFO;
153
154 typedef struct v3_ext_ctx X509V3_CTX;
155 typedef struct conf_st CONF;
156 typedef struct ossl_init_settings_st OPENSSL_INIT_SETTINGS;
157
158 typedef struct ui_st UI;
159 typedef struct ui_method_st UI_METHOD;
160
161 typedef struct engine_st ENGINE;
162 typedef struct ssl_st SSL;
163 typedef struct ssl_ctx_st SSL_CTX;
164
165 typedef struct comp_ctx_st COMP_CTX;
166 typedef struct comp_method_st COMP_METHOD;
167
168 typedef struct X509_POLICY_NODE_st X509_POLICY_NODE;
169 typedef struct X509_POLICY_LEVEL_st X509_POLICY_LEVEL;
170 typedef struct X509_POLICY_TREE_st X509_POLICY_TREE;
171 typedef struct X509_POLICY_CACHE_st X509_POLICY_CACHE;
172
173 typedef struct AUTHORITY_KEYID_st AUTHORITY_KEYID;
174 typedef struct DIST_POINT_st DIST_POINT;
175 typedef struct ISSUING_DIST_POINT_st ISSUING_DIST_POINT;
176 typedef struct NAME_CONSTRAINTS_st NAME_CONSTRAINTS;
177
178 typedef struct crypto_ex_data_st CRYPTO_EX_DATA;
179
180 typedef struct ocsp_req_ctx_st OCSP_REQ_CTX;
181 typedef struct ocsp_response_st OCSP_RESPONSE;
182 typedef struct ocsp_responder_id_st OCSP_RESPID;
183
184 typedef struct sct_st SCT;
185 typedef struct sct_ctx_st SCT_CTX;
186 typedef struct ctlog_st CTLOG;
187 typedef struct ctlog_store_st CTLOG_STORE;
188 typedef struct ct_policy_eval_ctx_st CT_POLICY_EVAL_CTX;
189
190 typedef struct ossl_store_info_st OSSL_STORE_INFO;
191 typedef struct ossl_store_search_st OSSL_STORE_SEARCH;
192
193 typedef struct openssl_ctx_st OPENSSL_CTX;
194
195 typedef struct ossl_dispatch_st OSSL_DISPATCH;
196 typedef struct ossl_item_st OSSL_ITEM;
197 typedef struct ossl_algorithm_st OSSL_ALGORITHM;
198 typedef struct ossl_param_st OSSL_PARAM;
199
200 #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L && \
201     defined(INTMAX_MAX) && defined(UINTMAX_MAX)
202 typedef intmax_t ossl_intmax_t;
203 typedef uintmax_t ossl_uintmax_t;
204 #else
205 /*
206  * Not long long, because the C-library can only be expected to provide
207  * strtoll(), strtoull() at the same time as intmax_t and strtoimax(),
208  * strtoumax().  Since we use these for parsing arguments, we need the
209  * conversion functions, not just the sizes.
210  */
211 typedef long ossl_intmax_t;
212 typedef unsigned long ossl_uintmax_t;
213 #endif
214
215 #ifdef  __cplusplus
216 }
217 #endif
218 #endif                          /* def HEADER_OPENSSL_TYPES_H */