]>
Commit | Line | Data |
---|---|---|
21dcbebc | 1 | /* |
0d664759 | 2 | * Copyright 2001-2018 The OpenSSL Project Authors. All Rights Reserved. |
d66ace9d | 3 | * |
48f4ad77 | 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use |
21dcbebc RS |
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 | |
d66ace9d BL |
8 | */ |
9 | ||
ae4186b0 DMSP |
10 | #ifndef OPENSSL_TYPES_H |
11 | # define OPENSSL_TYPES_H | |
d66ace9d | 12 | |
03f887ca VD |
13 | #include <limits.h> |
14 | ||
17e80c6b RS |
15 | #ifdef __cplusplus |
16 | extern "C" { | |
17 | #endif | |
18 | ||
0f113f3e | 19 | # include <openssl/e_os2.h> |
c3a4fa4c | 20 | # include <openssl/safestack.h> |
0f113f3e | 21 | |
4c2883a9 RL |
22 | typedef struct ossl_provider_st OSSL_PROVIDER; /* Provider Object */ |
23 | ||
0f113f3e MC |
24 | # ifdef NO_ASN1_TYPEDEFS |
25 | # define ASN1_INTEGER ASN1_STRING | |
26 | # define ASN1_ENUMERATED ASN1_STRING | |
27 | # define ASN1_BIT_STRING ASN1_STRING | |
28 | # define ASN1_OCTET_STRING ASN1_STRING | |
29 | # define ASN1_PRINTABLESTRING ASN1_STRING | |
30 | # define ASN1_T61STRING ASN1_STRING | |
31 | # define ASN1_IA5STRING ASN1_STRING | |
32 | # define ASN1_UTCTIME ASN1_STRING | |
33 | # define ASN1_GENERALIZEDTIME ASN1_STRING | |
34 | # define ASN1_TIME ASN1_STRING | |
35 | # define ASN1_GENERALSTRING ASN1_STRING | |
36 | # define ASN1_UNIVERSALSTRING ASN1_STRING | |
37 | # define ASN1_BMPSTRING ASN1_STRING | |
38 | # define ASN1_VISIBLESTRING ASN1_STRING | |
39 | # define ASN1_UTF8STRING ASN1_STRING | |
40 | # define ASN1_BOOLEAN int | |
41 | # define ASN1_NULL int | |
42 | # else | |
d66ace9d BL |
43 | typedef struct asn1_string_st ASN1_INTEGER; |
44 | typedef struct asn1_string_st ASN1_ENUMERATED; | |
45 | typedef struct asn1_string_st ASN1_BIT_STRING; | |
46 | typedef struct asn1_string_st ASN1_OCTET_STRING; | |
47 | typedef struct asn1_string_st ASN1_PRINTABLESTRING; | |
48 | typedef struct asn1_string_st ASN1_T61STRING; | |
49 | typedef struct asn1_string_st ASN1_IA5STRING; | |
50 | typedef struct asn1_string_st ASN1_GENERALSTRING; | |
51 | typedef struct asn1_string_st ASN1_UNIVERSALSTRING; | |
52 | typedef struct asn1_string_st ASN1_BMPSTRING; | |
53 | typedef struct asn1_string_st ASN1_UTCTIME; | |
54 | typedef struct asn1_string_st ASN1_TIME; | |
55 | typedef struct asn1_string_st ASN1_GENERALIZEDTIME; | |
56 | typedef struct asn1_string_st ASN1_VISIBLESTRING; | |
57 | typedef struct asn1_string_st ASN1_UTF8STRING; | |
fa1ba589 | 58 | typedef struct asn1_string_st ASN1_STRING; |
d66ace9d BL |
59 | typedef int ASN1_BOOLEAN; |
60 | typedef int ASN1_NULL; | |
0f113f3e | 61 | # endif |
d66ace9d | 62 | |
dc1ce3bc DSH |
63 | typedef struct asn1_object_st ASN1_OBJECT; |
64 | ||
31904ecd | 65 | typedef struct ASN1_ITEM_st ASN1_ITEM; |
1ef7acfe | 66 | typedef struct asn1_pctx_st ASN1_PCTX; |
d7d5a55d | 67 | typedef struct asn1_sctx_st ASN1_SCTX; |
1ef7acfe | 68 | |
f1f5ee17 | 69 | # ifdef _WIN32 |
0f113f3e MC |
70 | # undef X509_NAME |
71 | # undef X509_EXTENSIONS | |
0f113f3e | 72 | # undef PKCS7_ISSUER_AND_SERIAL |
f1f5ee17 | 73 | # undef PKCS7_SIGNER_INFO |
0f113f3e MC |
74 | # undef OCSP_REQUEST |
75 | # undef OCSP_RESPONSE | |
76 | # endif | |
77 | ||
78 | # ifdef BIGNUM | |
79 | # undef BIGNUM | |
80 | # endif | |
96fc458a | 81 | |
94af0cd7 | 82 | typedef struct bio_st BIO; |
d6dda126 GT |
83 | typedef struct bignum_st BIGNUM; |
84 | typedef struct bignum_ctx BN_CTX; | |
85 | typedef struct bn_blinding_st BN_BLINDING; | |
86 | typedef struct bn_mont_ctx_st BN_MONT_CTX; | |
87 | typedef struct bn_recp_ctx_st BN_RECP_CTX; | |
88 | typedef struct bn_gencb_st BN_GENCB; | |
89 | ||
90 | typedef struct buf_mem_st BUF_MEM; | |
91 | ||
c3a4fa4c RL |
92 | STACK_OF(BIGNUM); |
93 | STACK_OF(BIGNUM_const); | |
94 | ||
14e275e8 RL |
95 | typedef struct err_state_st ERR_STATE; |
96 | ||
d66ace9d BL |
97 | typedef struct evp_cipher_st EVP_CIPHER; |
98 | typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX; | |
ef853206 NC |
99 | typedef struct evp_md_st EVP_MD; |
100 | typedef struct evp_md_ctx_st EVP_MD_CTX; | |
567db2c1 RL |
101 | typedef struct evp_mac_st EVP_MAC; |
102 | typedef struct evp_mac_ctx_st EVP_MAC_CTX; | |
d66ace9d BL |
103 | typedef struct evp_pkey_st EVP_PKEY; |
104 | ||
448be743 DSH |
105 | typedef struct evp_pkey_asn1_method_st EVP_PKEY_ASN1_METHOD; |
106 | ||
0b6f3c66 DSH |
107 | typedef struct evp_pkey_method_st EVP_PKEY_METHOD; |
108 | typedef struct evp_pkey_ctx_st EVP_PKEY_CTX; | |
5a285add | 109 | |
a94a3e0d RL |
110 | typedef struct evp_keymgmt_st EVP_KEYMGMT; |
111 | ||
d2ba8123 | 112 | typedef struct evp_kdf_st EVP_KDF; |
5a285add | 113 | typedef struct evp_kdf_ctx_st EVP_KDF_CTX; |
0b6f3c66 | 114 | |
ff64702b MC |
115 | typedef struct evp_keyexch_st EVP_KEYEXCH; |
116 | ||
dfcb5d29 MC |
117 | typedef struct evp_signature_st EVP_SIGNATURE; |
118 | ||
2c938e2e MC |
119 | typedef struct evp_asym_cipher_st EVP_ASYM_CIPHER; |
120 | ||
a0be4fd1 RL |
121 | typedef struct evp_Encode_Ctx_st EVP_ENCODE_CTX; |
122 | ||
3f43aecc RL |
123 | typedef struct hmac_ctx_st HMAC_CTX; |
124 | ||
3a87a9b9 GT |
125 | typedef struct dh_st DH; |
126 | typedef struct dh_method DH_METHOD; | |
127 | ||
128 | typedef struct dsa_st DSA; | |
129 | typedef struct dsa_method DSA_METHOD; | |
130 | ||
131 | typedef struct rsa_st RSA; | |
132 | typedef struct rsa_meth_st RSA_METHOD; | |
677add38 | 133 | typedef struct rsa_pss_params_st RSA_PSS_PARAMS; |
3a87a9b9 | 134 | |
f8d3ab49 RL |
135 | typedef struct ec_key_st EC_KEY; |
136 | typedef struct ec_key_method_st EC_KEY_METHOD; | |
137 | ||
3a87a9b9 | 138 | typedef struct rand_meth_st RAND_METHOD; |
75e2c877 | 139 | typedef struct rand_drbg_st RAND_DRBG; |
3a87a9b9 | 140 | |
b9aec69a | 141 | typedef struct ssl_dane_st SSL_DANE; |
d66ace9d BL |
142 | typedef struct x509_st X509; |
143 | typedef struct X509_algor_st X509_ALGOR; | |
144 | typedef struct X509_crl_st X509_CRL; | |
010fa0b3 DSH |
145 | typedef struct x509_crl_method_st X509_CRL_METHOD; |
146 | typedef struct x509_revoked_st X509_REVOKED; | |
d66ace9d | 147 | typedef struct X509_name_st X509_NAME; |
448be743 | 148 | typedef struct X509_pubkey_st X509_PUBKEY; |
d66ace9d BL |
149 | typedef struct x509_store_st X509_STORE; |
150 | typedef struct x509_store_ctx_st X509_STORE_CTX; | |
151 | ||
f0e0fd51 RS |
152 | typedef struct x509_object_st X509_OBJECT; |
153 | typedef struct x509_lookup_st X509_LOOKUP; | |
154 | typedef struct x509_lookup_method_st X509_LOOKUP_METHOD; | |
155 | typedef struct X509_VERIFY_PARAM_st X509_VERIFY_PARAM; | |
156 | ||
786dd2c2 DSH |
157 | typedef struct x509_sig_info_st X509_SIG_INFO; |
158 | ||
448be743 DSH |
159 | typedef struct pkcs8_priv_key_info_st PKCS8_PRIV_KEY_INFO; |
160 | ||
9ea1b878 DSH |
161 | typedef struct v3_ext_ctx X509V3_CTX; |
162 | typedef struct conf_st CONF; | |
7253fd55 | 163 | typedef struct ossl_init_settings_st OPENSSL_INIT_SETTINGS; |
9ea1b878 | 164 | |
3a87a9b9 GT |
165 | typedef struct ui_st UI; |
166 | typedef struct ui_method_st UI_METHOD; | |
167 | ||
1a142264 | 168 | typedef struct engine_st ENGINE; |
05935c47 DSH |
169 | typedef struct ssl_st SSL; |
170 | typedef struct ssl_ctx_st SSL_CTX; | |
1a142264 | 171 | |
9a555706 RS |
172 | typedef struct comp_ctx_st COMP_CTX; |
173 | typedef struct comp_method_st COMP_METHOD; | |
174 | ||
4acc3e90 DSH |
175 | typedef struct X509_POLICY_NODE_st X509_POLICY_NODE; |
176 | typedef struct X509_POLICY_LEVEL_st X509_POLICY_LEVEL; | |
177 | typedef struct X509_POLICY_TREE_st X509_POLICY_TREE; | |
178 | typedef struct X509_POLICY_CACHE_st X509_POLICY_CACHE; | |
179 | ||
edc54021 DSH |
180 | typedef struct AUTHORITY_KEYID_st AUTHORITY_KEYID; |
181 | typedef struct DIST_POINT_st DIST_POINT; | |
182 | typedef struct ISSUING_DIST_POINT_st ISSUING_DIST_POINT; | |
e9746e03 | 183 | typedef struct NAME_CONSTRAINTS_st NAME_CONSTRAINTS; |
edc54021 | 184 | |
210a21bc | 185 | typedef struct crypto_ex_data_st CRYPTO_EX_DATA; |
210a21bc | 186 | |
29f178bd | 187 | typedef struct ossl_http_req_ctx_st OCSP_REQ_CTX; /* backward compatibility */ |
67c8e7f4 DSH |
188 | typedef struct ocsp_response_st OCSP_RESPONSE; |
189 | typedef struct ocsp_responder_id_st OCSP_RESPID; | |
c1c6c0bf | 190 | |
a8d177ac | 191 | typedef struct sct_st SCT; |
8c6afbc5 RP |
192 | typedef struct sct_ctx_st SCT_CTX; |
193 | typedef struct ctlog_st CTLOG; | |
194 | typedef struct ctlog_store_st CTLOG_STORE; | |
7d054e5a | 195 | typedef struct ct_policy_eval_ctx_st CT_POLICY_EVAL_CTX; |
a8d177ac | 196 | |
71a5516d | 197 | typedef struct ossl_store_info_st OSSL_STORE_INFO; |
fac8673b | 198 | typedef struct ossl_store_search_st OSSL_STORE_SEARCH; |
71a5516d | 199 | |
d64b6299 RL |
200 | typedef struct openssl_ctx_st OPENSSL_CTX; |
201 | ||
7753be74 RL |
202 | typedef struct ossl_dispatch_st OSSL_DISPATCH; |
203 | typedef struct ossl_item_st OSSL_ITEM; | |
204 | typedef struct ossl_algorithm_st OSSL_ALGORITHM; | |
205 | typedef struct ossl_param_st OSSL_PARAM; | |
206 | ||
0d003c52 RL |
207 | typedef int pem_password_cb (char *buf, int size, int rwflag, void *userdata); |
208 | ||
209 | typedef struct ossl_serializer_st OSSL_SERIALIZER; | |
210 | typedef struct ossl_serializer_ctx_st OSSL_SERIALIZER_CTX; | |
211 | ||
d94a1a70 VD |
212 | #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L && \ |
213 | defined(INTMAX_MAX) && defined(UINTMAX_MAX) | |
03f887ca VD |
214 | typedef intmax_t ossl_intmax_t; |
215 | typedef uintmax_t ossl_uintmax_t; | |
216 | #else | |
217 | /* | |
218 | * Not long long, because the C-library can only be expected to provide | |
219 | * strtoll(), strtoull() at the same time as intmax_t and strtoimax(), | |
220 | * strtoumax(). Since we use these for parsing arguments, we need the | |
221 | * conversion functions, not just the sizes. | |
222 | */ | |
223 | typedef long ossl_intmax_t; | |
224 | typedef unsigned long ossl_uintmax_t; | |
225 | #endif | |
226 | ||
17e80c6b RS |
227 | #ifdef __cplusplus |
228 | } | |
229 | #endif | |
96fc458a DG |
230 | |
231 | #endif /* OPENSSL_TYPES_H */ |