ossl_typ.h 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. /*
  2. * Copyright 2001-2018 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. #ifndef HEADER_OPENSSL_TYPES_H
  10. # define HEADER_OPENSSL_TYPES_H
  11. #include <limits.h>
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15. # include <openssl/e_os2.h>
  16. # ifdef NO_ASN1_TYPEDEFS
  17. # define ASN1_INTEGER ASN1_STRING
  18. # define ASN1_ENUMERATED ASN1_STRING
  19. # define ASN1_BIT_STRING ASN1_STRING
  20. # define ASN1_OCTET_STRING ASN1_STRING
  21. # define ASN1_PRINTABLESTRING ASN1_STRING
  22. # define ASN1_T61STRING ASN1_STRING
  23. # define ASN1_IA5STRING ASN1_STRING
  24. # define ASN1_UTCTIME ASN1_STRING
  25. # define ASN1_GENERALIZEDTIME ASN1_STRING
  26. # define ASN1_TIME ASN1_STRING
  27. # define ASN1_GENERALSTRING ASN1_STRING
  28. # define ASN1_UNIVERSALSTRING ASN1_STRING
  29. # define ASN1_BMPSTRING ASN1_STRING
  30. # define ASN1_VISIBLESTRING ASN1_STRING
  31. # define ASN1_UTF8STRING ASN1_STRING
  32. # define ASN1_BOOLEAN int
  33. # define ASN1_NULL int
  34. # else
  35. typedef struct asn1_string_st ASN1_INTEGER;
  36. typedef struct asn1_string_st ASN1_ENUMERATED;
  37. typedef struct asn1_string_st ASN1_BIT_STRING;
  38. typedef struct asn1_string_st ASN1_OCTET_STRING;
  39. typedef struct asn1_string_st ASN1_PRINTABLESTRING;
  40. typedef struct asn1_string_st ASN1_T61STRING;
  41. typedef struct asn1_string_st ASN1_IA5STRING;
  42. typedef struct asn1_string_st ASN1_GENERALSTRING;
  43. typedef struct asn1_string_st ASN1_UNIVERSALSTRING;
  44. typedef struct asn1_string_st ASN1_BMPSTRING;
  45. typedef struct asn1_string_st ASN1_UTCTIME;
  46. typedef struct asn1_string_st ASN1_TIME;
  47. typedef struct asn1_string_st ASN1_GENERALIZEDTIME;
  48. typedef struct asn1_string_st ASN1_VISIBLESTRING;
  49. typedef struct asn1_string_st ASN1_UTF8STRING;
  50. typedef struct asn1_string_st ASN1_STRING;
  51. typedef int ASN1_BOOLEAN;
  52. typedef int ASN1_NULL;
  53. # endif
  54. typedef struct asn1_object_st ASN1_OBJECT;
  55. typedef struct ASN1_ITEM_st ASN1_ITEM;
  56. typedef struct asn1_pctx_st ASN1_PCTX;
  57. typedef struct asn1_sctx_st ASN1_SCTX;
  58. # ifdef _WIN32
  59. # undef X509_NAME
  60. # undef X509_EXTENSIONS
  61. # undef PKCS7_ISSUER_AND_SERIAL
  62. # undef PKCS7_SIGNER_INFO
  63. # undef OCSP_REQUEST
  64. # undef OCSP_RESPONSE
  65. # endif
  66. # ifdef BIGNUM
  67. # undef BIGNUM
  68. # endif
  69. struct dane_st;
  70. typedef struct bio_st BIO;
  71. typedef struct bignum_st BIGNUM;
  72. typedef struct bignum_ctx BN_CTX;
  73. typedef struct bn_blinding_st BN_BLINDING;
  74. typedef struct bn_mont_ctx_st BN_MONT_CTX;
  75. typedef struct bn_recp_ctx_st BN_RECP_CTX;
  76. typedef struct bn_gencb_st BN_GENCB;
  77. typedef struct buf_mem_st BUF_MEM;
  78. typedef struct evp_cipher_st EVP_CIPHER;
  79. typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX;
  80. typedef struct evp_md_st EVP_MD;
  81. typedef struct evp_md_ctx_st EVP_MD_CTX;
  82. typedef struct evp_pkey_st EVP_PKEY;
  83. typedef struct evp_pkey_asn1_method_st EVP_PKEY_ASN1_METHOD;
  84. typedef struct evp_pkey_method_st EVP_PKEY_METHOD;
  85. typedef struct evp_pkey_ctx_st EVP_PKEY_CTX;
  86. typedef struct evp_Encode_Ctx_st EVP_ENCODE_CTX;
  87. typedef struct hmac_ctx_st HMAC_CTX;
  88. typedef struct dh_st DH;
  89. typedef struct dh_method DH_METHOD;
  90. typedef struct dsa_st DSA;
  91. typedef struct dsa_method DSA_METHOD;
  92. typedef struct rsa_st RSA;
  93. typedef struct rsa_meth_st RSA_METHOD;
  94. typedef struct rsa_pss_params_st RSA_PSS_PARAMS;
  95. typedef struct ec_key_st EC_KEY;
  96. typedef struct ec_key_method_st EC_KEY_METHOD;
  97. typedef struct rand_meth_st RAND_METHOD;
  98. typedef struct rand_drbg_st RAND_DRBG;
  99. typedef struct ssl_dane_st SSL_DANE;
  100. typedef struct x509_st X509;
  101. typedef struct X509_algor_st X509_ALGOR;
  102. typedef struct X509_crl_st X509_CRL;
  103. typedef struct x509_crl_method_st X509_CRL_METHOD;
  104. typedef struct x509_revoked_st X509_REVOKED;
  105. typedef struct X509_name_st X509_NAME;
  106. typedef struct X509_pubkey_st X509_PUBKEY;
  107. typedef struct x509_store_st X509_STORE;
  108. typedef struct x509_store_ctx_st X509_STORE_CTX;
  109. typedef struct x509_object_st X509_OBJECT;
  110. typedef struct x509_lookup_st X509_LOOKUP;
  111. typedef struct x509_lookup_method_st X509_LOOKUP_METHOD;
  112. typedef struct X509_VERIFY_PARAM_st X509_VERIFY_PARAM;
  113. typedef struct x509_sig_info_st X509_SIG_INFO;
  114. typedef struct pkcs8_priv_key_info_st PKCS8_PRIV_KEY_INFO;
  115. typedef struct v3_ext_ctx X509V3_CTX;
  116. typedef struct conf_st CONF;
  117. typedef struct ossl_init_settings_st OPENSSL_INIT_SETTINGS;
  118. typedef struct ui_st UI;
  119. typedef struct ui_method_st UI_METHOD;
  120. typedef struct engine_st ENGINE;
  121. typedef struct ssl_st SSL;
  122. typedef struct ssl_ctx_st SSL_CTX;
  123. typedef struct comp_ctx_st COMP_CTX;
  124. typedef struct comp_method_st COMP_METHOD;
  125. typedef struct X509_POLICY_NODE_st X509_POLICY_NODE;
  126. typedef struct X509_POLICY_LEVEL_st X509_POLICY_LEVEL;
  127. typedef struct X509_POLICY_TREE_st X509_POLICY_TREE;
  128. typedef struct X509_POLICY_CACHE_st X509_POLICY_CACHE;
  129. typedef struct AUTHORITY_KEYID_st AUTHORITY_KEYID;
  130. typedef struct DIST_POINT_st DIST_POINT;
  131. typedef struct ISSUING_DIST_POINT_st ISSUING_DIST_POINT;
  132. typedef struct NAME_CONSTRAINTS_st NAME_CONSTRAINTS;
  133. typedef struct crypto_ex_data_st CRYPTO_EX_DATA;
  134. typedef struct ocsp_req_ctx_st OCSP_REQ_CTX;
  135. typedef struct ocsp_response_st OCSP_RESPONSE;
  136. typedef struct ocsp_responder_id_st OCSP_RESPID;
  137. typedef struct sct_st SCT;
  138. typedef struct sct_ctx_st SCT_CTX;
  139. typedef struct ctlog_st CTLOG;
  140. typedef struct ctlog_store_st CTLOG_STORE;
  141. typedef struct ct_policy_eval_ctx_st CT_POLICY_EVAL_CTX;
  142. typedef struct ossl_store_info_st OSSL_STORE_INFO;
  143. typedef struct ossl_store_search_st OSSL_STORE_SEARCH;
  144. #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L && \
  145. defined(INTMAX_MAX) && defined(UINTMAX_MAX)
  146. typedef intmax_t ossl_intmax_t;
  147. typedef uintmax_t ossl_uintmax_t;
  148. #else
  149. /*
  150. * Not long long, because the C-library can only be expected to provide
  151. * strtoll(), strtoull() at the same time as intmax_t and strtoimax(),
  152. * strtoumax(). Since we use these for parsing arguments, we need the
  153. * conversion functions, not just the sizes.
  154. */
  155. typedef long ossl_intmax_t;
  156. typedef unsigned long ossl_uintmax_t;
  157. #endif
  158. #ifdef __cplusplus
  159. }
  160. #endif
  161. #endif /* def HEADER_OPENSSL_TYPES_H */