1/*
2 * Copyright 2001-2021 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 OPENSSL_TYPES_H
11# define OPENSSL_TYPES_H
12# pragma once
13
14# include <limits.h>
15
16# ifdef __cplusplus
17extern "C" {
18# endif
19
20# include <openssl/e_os2.h>
21# include <openssl/safestack.h>
22# include <openssl/macros.h>
23
24typedef struct ossl_provider_st OSSL_PROVIDER; /* Provider Object */
25
26# ifdef NO_ASN1_TYPEDEFS
27# define ASN1_INTEGER ASN1_STRING
28# define ASN1_ENUMERATED ASN1_STRING
29# define ASN1_BIT_STRING ASN1_STRING
30# define ASN1_OCTET_STRING ASN1_STRING
31# define ASN1_PRINTABLESTRING ASN1_STRING
32# define ASN1_T61STRING ASN1_STRING
33# define ASN1_IA5STRING ASN1_STRING
34# define ASN1_UTCTIME ASN1_STRING
35# define ASN1_GENERALIZEDTIME ASN1_STRING
36# define ASN1_TIME ASN1_STRING
37# define ASN1_GENERALSTRING ASN1_STRING
38# define ASN1_UNIVERSALSTRING ASN1_STRING
39# define ASN1_BMPSTRING ASN1_STRING
40# define ASN1_VISIBLESTRING ASN1_STRING
41# define ASN1_UTF8STRING ASN1_STRING
42# define ASN1_BOOLEAN int
43# define ASN1_NULL int
44# else
45typedef struct asn1_string_st ASN1_INTEGER;
46typedef struct asn1_string_st ASN1_ENUMERATED;
47typedef struct asn1_string_st ASN1_BIT_STRING;
48typedef struct asn1_string_st ASN1_OCTET_STRING;
49typedef struct asn1_string_st ASN1_PRINTABLESTRING;
50typedef struct asn1_string_st ASN1_T61STRING;
51typedef struct asn1_string_st ASN1_IA5STRING;
52typedef struct asn1_string_st ASN1_GENERALSTRING;
53typedef struct asn1_string_st ASN1_UNIVERSALSTRING;
54typedef struct asn1_string_st ASN1_BMPSTRING;
55typedef struct asn1_string_st ASN1_UTCTIME;
56typedef struct asn1_string_st ASN1_TIME;
57typedef struct asn1_string_st ASN1_GENERALIZEDTIME;
58typedef struct asn1_string_st ASN1_VISIBLESTRING;
59typedef struct asn1_string_st ASN1_UTF8STRING;
60typedef struct asn1_string_st ASN1_STRING;
61typedef int ASN1_BOOLEAN;
62typedef int ASN1_NULL;
63# endif
64
65typedef struct asn1_type_st ASN1_TYPE;
66typedef struct asn1_object_st ASN1_OBJECT;
67typedef struct asn1_string_table_st ASN1_STRING_TABLE;
68
69typedef struct ASN1_ITEM_st ASN1_ITEM;
70typedef struct asn1_pctx_st ASN1_PCTX;
71typedef struct asn1_sctx_st ASN1_SCTX;
72
73# ifdef _WIN32
74# undef X509_NAME
75# undef X509_EXTENSIONS
76# undef PKCS7_ISSUER_AND_SERIAL
77# undef PKCS7_SIGNER_INFO
78# undef OCSP_REQUEST
79# undef OCSP_RESPONSE
80# endif
81
82# ifdef BIGNUM
83# undef BIGNUM
84# endif
85
86typedef struct bio_st BIO;
87typedef struct bignum_st BIGNUM;
88typedef struct bignum_ctx BN_CTX;
89typedef struct bn_blinding_st BN_BLINDING;
90typedef struct bn_mont_ctx_st BN_MONT_CTX;
91typedef struct bn_recp_ctx_st BN_RECP_CTX;
92typedef struct bn_gencb_st BN_GENCB;
93
94typedef struct buf_mem_st BUF_MEM;
95
96STACK_OF(BIGNUM);
97STACK_OF(BIGNUM_const);
98
99typedef struct err_state_st ERR_STATE;
100
101typedef struct evp_cipher_st EVP_CIPHER;
102typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX;
103typedef struct evp_md_st EVP_MD;
104typedef struct evp_md_ctx_st EVP_MD_CTX;
105typedef struct evp_mac_st EVP_MAC;
106typedef struct evp_mac_ctx_st EVP_MAC_CTX;
107typedef struct evp_pkey_st EVP_PKEY;
108
109typedef struct evp_pkey_asn1_method_st EVP_PKEY_ASN1_METHOD;
110
111typedef struct evp_pkey_method_st EVP_PKEY_METHOD;
112typedef struct evp_pkey_ctx_st EVP_PKEY_CTX;
113
114typedef struct evp_keymgmt_st EVP_KEYMGMT;
115
116typedef struct evp_kdf_st EVP_KDF;
117typedef struct evp_kdf_ctx_st EVP_KDF_CTX;
118
119typedef struct evp_rand_st EVP_RAND;
120typedef struct evp_rand_ctx_st EVP_RAND_CTX;
121
122typedef struct evp_keyexch_st EVP_KEYEXCH;
123
124typedef struct evp_signature_st EVP_SIGNATURE;
125
126typedef struct evp_asym_cipher_st EVP_ASYM_CIPHER;
127
128typedef struct evp_kem_st EVP_KEM;
129
130typedef struct evp_Encode_Ctx_st EVP_ENCODE_CTX;
131
132typedef struct hmac_ctx_st HMAC_CTX;
133
134typedef struct dh_st DH;
135typedef struct dh_method DH_METHOD;
136
137# ifndef OPENSSL_NO_DEPRECATED_3_0
138typedef struct dsa_st DSA;
139typedef struct dsa_method DSA_METHOD;
140# endif
141
142# ifndef OPENSSL_NO_DEPRECATED_3_0
143typedef struct rsa_st RSA;
144typedef struct rsa_meth_st RSA_METHOD;
145# endif
146typedef struct rsa_pss_params_st RSA_PSS_PARAMS;
147
148# ifndef OPENSSL_NO_DEPRECATED_3_0
149typedef struct ec_key_st EC_KEY;
150typedef struct ec_key_method_st EC_KEY_METHOD;
151# endif
152
153typedef struct rand_meth_st RAND_METHOD;
154typedef struct rand_drbg_st RAND_DRBG;
155
156typedef struct ssl_dane_st SSL_DANE;
157typedef struct x509_st X509;
158typedef struct X509_algor_st X509_ALGOR;
159typedef struct X509_crl_st X509_CRL;
160typedef struct x509_crl_method_st X509_CRL_METHOD;
161typedef struct x509_revoked_st X509_REVOKED;
162typedef struct X509_name_st X509_NAME;
163typedef struct X509_pubkey_st X509_PUBKEY;
164typedef struct x509_store_st X509_STORE;
165typedef struct x509_store_ctx_st X509_STORE_CTX;
166
167typedef struct x509_object_st X509_OBJECT;
168typedef struct x509_lookup_st X509_LOOKUP;
169typedef struct x509_lookup_method_st X509_LOOKUP_METHOD;
170typedef struct X509_VERIFY_PARAM_st X509_VERIFY_PARAM;
171
172typedef struct x509_sig_info_st X509_SIG_INFO;
173
174typedef struct pkcs8_priv_key_info_st PKCS8_PRIV_KEY_INFO;
175
176typedef struct v3_ext_ctx X509V3_CTX;
177typedef struct conf_st CONF;
178typedef struct ossl_init_settings_st OPENSSL_INIT_SETTINGS;
179
180typedef struct ui_st UI;
181typedef struct ui_method_st UI_METHOD;
182
183typedef struct engine_st ENGINE;
184typedef struct ssl_st SSL;
185typedef struct ssl_ctx_st SSL_CTX;
186
187typedef struct comp_ctx_st COMP_CTX;
188typedef struct comp_method_st COMP_METHOD;
189
190typedef struct X509_POLICY_NODE_st X509_POLICY_NODE;
191typedef struct X509_POLICY_LEVEL_st X509_POLICY_LEVEL;
192typedef struct X509_POLICY_TREE_st X509_POLICY_TREE;
193typedef struct X509_POLICY_CACHE_st X509_POLICY_CACHE;
194
195typedef struct AUTHORITY_KEYID_st AUTHORITY_KEYID;
196typedef struct DIST_POINT_st DIST_POINT;
197typedef struct ISSUING_DIST_POINT_st ISSUING_DIST_POINT;
198typedef struct NAME_CONSTRAINTS_st NAME_CONSTRAINTS;
199
200typedef struct crypto_ex_data_st CRYPTO_EX_DATA;
201
202typedef struct ossl_http_req_ctx_st OSSL_HTTP_REQ_CTX;
203typedef struct ocsp_response_st OCSP_RESPONSE;
204typedef struct ocsp_responder_id_st OCSP_RESPID;
205
206typedef struct sct_st SCT;
207typedef struct sct_ctx_st SCT_CTX;
208typedef struct ctlog_st CTLOG;
209typedef struct ctlog_store_st CTLOG_STORE;
210typedef struct ct_policy_eval_ctx_st CT_POLICY_EVAL_CTX;
211
212typedef struct ossl_store_info_st OSSL_STORE_INFO;
213typedef struct ossl_store_search_st OSSL_STORE_SEARCH;
214
215typedef struct ossl_lib_ctx_st OSSL_LIB_CTX;
216
217typedef struct ossl_dispatch_st OSSL_DISPATCH;
218typedef struct ossl_item_st OSSL_ITEM;
219typedef struct ossl_algorithm_st OSSL_ALGORITHM;
220typedef struct ossl_param_st OSSL_PARAM;
221typedef struct ossl_param_bld_st OSSL_PARAM_BLD;
222
223typedef int pem_password_cb (char *buf, int size, int rwflag, void *userdata);
224
225typedef struct ossl_encoder_st OSSL_ENCODER;
226typedef struct ossl_encoder_ctx_st OSSL_ENCODER_CTX;
227typedef struct ossl_decoder_st OSSL_DECODER;
228typedef struct ossl_decoder_ctx_st OSSL_DECODER_CTX;
229
230typedef struct ossl_self_test_st OSSL_SELF_TEST;
231
232#ifdef __cplusplus
233}
234#endif
235
236#endif /* OPENSSL_TYPES_H */
237