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