Avoid clashes with Win32 names in WinCrypt.h
[openssl.git] / crypto / x509 / x509.h
index 3ac3c5a4a45ea3c144cb35acf8fd93dfe39e402d..e7706ce9f996b3388b0212039105e27eea7ff7ce 100644 (file)
@@ -64,6 +64,7 @@
 #ifndef HEADER_X509_H
 #define HEADER_X509_H
 
+#include <openssl/e_os2.h>
 #include <openssl/symhacks.h>
 #ifndef OPENSSL_NO_BUFFER
 #include <openssl/buffer.h>
 #ifndef OPENSSL_NO_SHA
 #include <openssl/sha.h>
 #endif
-#include <openssl/e_os2.h>
 #include <openssl/ossl_typ.h>
 
 #ifdef  __cplusplus
@@ -112,8 +112,9 @@ extern "C" {
 #endif
 
 #ifdef OPENSSL_SYS_WIN32
-/* Under Win32 this is defined in wincrypt.h */
+/* Under Win32 these are defined in wincrypt.h */
 #undef X509_NAME
+#undef X509_CERT_PAIR
 #endif
 
 #define X509_FILETYPE_PEM      1
@@ -306,6 +307,11 @@ typedef struct x509_trust_st {
 
 DECLARE_STACK_OF(X509_TRUST)
 
+typedef struct x509_cert_pair_st {
+       X509 *forward;
+       X509 *reverse;
+} X509_CERT_PAIR;
+
 /* standard trust ids */
 
 #define X509_TRUST_DEFAULT     -1      /* Only valid in purpose settings */
@@ -503,10 +509,12 @@ typedef struct Netscape_certificate_sequence
        STACK_OF(X509) *certs;
        } NETSCAPE_CERT_SEQUENCE;
 
+/* Unused (and iv length is wrong)
 typedef struct CBCParameter_st
        {
        unsigned char iv[8];
        } CBC_PARAM;
+*/
 
 /* Password based encryption structure */
 
@@ -918,6 +926,8 @@ DECLARE_ASN1_FUNCTIONS(X509_CINF)
 DECLARE_ASN1_FUNCTIONS(X509)
 DECLARE_ASN1_FUNCTIONS(X509_CERT_AUX)
 
+DECLARE_ASN1_FUNCTIONS(X509_CERT_PAIR)
+
 int X509_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
             CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
 int X509_set_ex_data(X509 *r, int idx, void *arg);
@@ -1029,6 +1039,8 @@ int X509_CRL_sort(X509_CRL *crl);
 int X509_REVOKED_set_serialNumber(X509_REVOKED *x, ASN1_INTEGER *serial);
 int X509_REVOKED_set_revocationDate(X509_REVOKED *r, ASN1_TIME *tm);
 
+int            X509_REQ_check_private_key(X509_REQ *x509,EVP_PKEY *pkey);
+
 int            X509_check_private_key(X509 *x509,EVP_PKEY *pkey);
 
 int            X509_issuer_and_serial_cmp(const X509 *a, const X509 *b);
@@ -1262,6 +1274,7 @@ void ERR_load_X509_strings(void);
 #define X509_F_X509_PRINT_FP                            118
 #define X509_F_X509_PUBKEY_GET                          119
 #define X509_F_X509_PUBKEY_SET                          120
+#define X509_F_X509_REQ_CHECK_PRIVATE_KEY               144
 #define X509_F_X509_REQ_PRINT                           121
 #define X509_F_X509_REQ_PRINT_FP                        122
 #define X509_F_X509_REQ_TO_X509                                 123