X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=include%2Fopenssl%2Fx509.h;h=50a5edd27efecbd19a8e7d3c297c145959018d89;hp=cdf392a9bf8eb58ddc6097e39243dec23610b031;hb=2a056de832a62f9c6da67779f3764f004df6fdb0;hpb=338f5727c88b1ce44a802c5115707309d6316fc4 diff --git a/include/openssl/x509.h b/include/openssl/x509.h index cdf392a9bf..50a5edd27e 100644 --- a/include/openssl/x509.h +++ b/include/openssl/x509.h @@ -65,6 +65,7 @@ # define HEADER_X509_H # include +# include # include # include # include @@ -75,11 +76,9 @@ # ifndef OPENSSL_NO_EC # include -# include -# include # endif -# ifdef OPENSSL_USE_DEPRECATED +# if OPENSSL_API_COMPAT < 0x10100000L # ifndef OPENSSL_NO_RSA # include # endif @@ -144,9 +143,9 @@ typedef struct X509_sig_st { typedef struct X509_name_entry_st X509_NAME_ENTRY; -DECLARE_STACK_OF(X509_NAME_ENTRY) +DEFINE_STACK_OF(X509_NAME_ENTRY) -DECLARE_STACK_OF(X509_NAME) +DEFINE_STACK_OF(X509_NAME) # define X509_EX_V_NETSCAPE_HACK 0x8000 # define X509_EX_V_INIT 0x0001 @@ -154,11 +153,11 @@ typedef struct X509_extension_st X509_EXTENSION; typedef STACK_OF(X509_EXTENSION) X509_EXTENSIONS; -DECLARE_STACK_OF(X509_EXTENSION) +DEFINE_STACK_OF(X509_EXTENSION) typedef struct x509_attributes_st X509_ATTRIBUTE; -DECLARE_STACK_OF(X509_ATTRIBUTE) +DEFINE_STACK_OF(X509_ATTRIBUTE) typedef struct X509_req_info_st X509_REQ_INFO; @@ -168,7 +167,7 @@ typedef struct x509_cert_aux_st X509_CERT_AUX; typedef struct x509_cinf_st X509_CINF; -DECLARE_STACK_OF(X509) +DEFINE_STACK_OF(X509) /* This is used for a table of trust checking functions */ @@ -181,7 +180,7 @@ typedef struct x509_trust_st { void *arg2; } X509_TRUST; -DECLARE_STACK_OF(X509_TRUST) +DEFINE_STACK_OF(X509_TRUST) /* standard trust ids */ @@ -287,11 +286,11 @@ DECLARE_STACK_OF(X509_TRUST) XN_FLAG_FN_LN | \ XN_FLAG_FN_ALIGN) -DECLARE_STACK_OF(X509_REVOKED) +DEFINE_STACK_OF(X509_REVOKED) typedef struct X509_crl_info_st X509_CRL_INFO; -DECLARE_STACK_OF(X509_CRL) +DEFINE_STACK_OF(X509_CRL) typedef struct private_key_st { int version; @@ -319,7 +318,7 @@ typedef struct X509_info_st { int references; } X509_INFO; -DECLARE_STACK_OF(X509_INFO) +DEFINE_STACK_OF(X509_INFO) /* * The next 2 structures and their 8 routines were sent to me by Pat Richard @@ -577,6 +576,7 @@ DECLARE_ASN1_FUNCTIONS(X509_VAL) DECLARE_ASN1_FUNCTIONS(X509_PUBKEY) int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey); +EVP_PKEY *X509_PUBKEY_get0(X509_PUBKEY *key); EVP_PKEY *X509_PUBKEY_get(X509_PUBKEY *key); int X509_get_pubkey_parameters(EVP_PKEY *pkey, STACK_OF(X509) *chain); int i2d_PUBKEY(EVP_PKEY *a, unsigned char **pp); @@ -710,6 +710,7 @@ STACK_OF(X509_EXTENSION) *X509_get0_extensions(const X509 *x); void X509_get0_uids(ASN1_BIT_STRING **piuid, ASN1_BIT_STRING **psuid, X509 *x); X509_ALGOR *X509_get0_tbs_sigalg(X509 *x); +EVP_PKEY *X509_get0_pubkey(X509 *x); EVP_PKEY *X509_get_pubkey(X509 *x); ASN1_BIT_STRING *X509_get0_pubkey_bitstr(const X509 *x); int X509_certificate_type(X509 *x, EVP_PKEY *pubkey /* optional */ ); @@ -1070,8 +1071,10 @@ void ERR_load_X509_strings(void); /* Function codes. */ # define X509_F_ADD_CERT_DIR 100 +# define X509_F_BUILD_CHAIN 106 # define X509_F_BY_FILE_CTRL 101 # define X509_F_CHECK_POLICY 145 +# define X509_F_DANE_I2D 107 # define X509_F_DIR_CTRL 102 # define X509_F_GET_CERT_BY_SUBJECT 103 # define X509_F_NETSCAPE_SPKI_B64_DECODE 129 @@ -1099,7 +1102,7 @@ void ERR_load_X509_strings(void); # define X509_F_X509_NAME_ONELINE 116 # define X509_F_X509_NAME_PRINT 117 # define X509_F_X509_PRINT_EX_FP 118 -# define X509_F_X509_PUBKEY_GET 119 +# define X509_F_X509_PUBKEY_GET0 119 # define X509_F_X509_PUBKEY_SET 120 # define X509_F_X509_REQ_CHECK_PRIVATE_KEY 144 # define X509_F_X509_REQ_PRINT_EX 121 @@ -1118,6 +1121,7 @@ void ERR_load_X509_strings(void); /* Reason codes. */ # define X509_R_AKID_MISMATCH 110 +# define X509_R_BAD_SELECTOR 133 # define X509_R_BAD_X509_FILETYPE 100 # define X509_R_BASE64_DECODE_ERROR 118 # define X509_R_CANT_CHECK_DH_KEY 114