(oops) Apologies all, that last header-cleanup commit was from the wrong
[openssl.git] / crypto / x509 / x509.h
index 049308ba80ee1cfb5b3f1b73321804e76f13fbc6..edf1cd49395b5d581c054cc8ce17d1bb06cc0047 100644 (file)
 #include <openssl/asn1.h>
 #include <openssl/safestack.h>
 
-#ifndef OPENSSL_NO_RSA
-#include <openssl/rsa.h>
-#endif
-
-#ifndef OPENSSL_NO_DSA
-#include <openssl/dsa.h>
-#endif
-
 #ifndef OPENSSL_NO_EC
 #include <openssl/ec.h>
 #endif
 #include <openssl/ecdh.h>
 #endif
 
+#ifndef OPENSSL_NO_DEPRECATED
+#ifndef OPENSSL_NO_RSA
+#include <openssl/rsa.h>
+#endif
+#ifndef OPENSSL_NO_DSA
+#include <openssl/dsa.h>
+#endif
 #ifndef OPENSSL_NO_DH
 #include <openssl/dh.h>
 #endif
+#endif
+
 #ifndef OPENSSL_NO_SHA
 #include <openssl/sha.h>
 #endif
@@ -112,8 +113,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
@@ -284,6 +286,7 @@ struct x509_st
        unsigned long ex_nscert;
        ASN1_OCTET_STRING *skid;
        struct AUTHORITY_KEYID_st *akid;
+       X509_POLICY_CACHE *policy_cache;
 #ifndef OPENSSL_NO_SHA
        unsigned char sha1_hash[SHA_DIGEST_LENGTH];
 #endif
@@ -855,10 +858,6 @@ X509_REQ *X509_REQ_dup(X509_REQ *req);
 X509_ALGOR *X509_ALGOR_dup(X509_ALGOR *xn);
 X509_NAME *X509_NAME_dup(X509_NAME *xn);
 X509_NAME_ENTRY *X509_NAME_ENTRY_dup(X509_NAME_ENTRY *ne);
-#ifndef OPENSSL_NO_RSA
-RSA *RSAPublicKey_dup(RSA *rsa);
-RSA *RSAPrivateKey_dup(RSA *rsa);
-#endif
 
 #endif /* !SSLEAY_MACROS */
 
@@ -887,21 +886,21 @@ 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);
-EVP_PKEY *     d2i_PUBKEY(EVP_PKEY **a,unsigned char **pp,
+EVP_PKEY *     d2i_PUBKEY(EVP_PKEY **a,const unsigned char **pp,
                        long length);
 #ifndef OPENSSL_NO_RSA
 int            i2d_RSA_PUBKEY(RSA *a,unsigned char **pp);
-RSA *          d2i_RSA_PUBKEY(RSA **a,unsigned char **pp,
+RSA *          d2i_RSA_PUBKEY(RSA **a,const unsigned char **pp,
                        long length);
 #endif
 #ifndef OPENSSL_NO_DSA
 int            i2d_DSA_PUBKEY(DSA *a,unsigned char **pp);
-DSA *          d2i_DSA_PUBKEY(DSA **a,unsigned char **pp,
+DSA *          d2i_DSA_PUBKEY(DSA **a,const unsigned char **pp,
                        long length);
 #endif
 #ifndef OPENSSL_NO_EC
 int            i2d_EC_PUBKEY(EC_KEY *a, unsigned char **pp);
-EC_KEY                 *d2i_EC_PUBKEY(EC_KEY **a, unsigned char **pp,
+EC_KEY                 *d2i_EC_PUBKEY(EC_KEY **a, const unsigned char **pp,
                        long length);
 #endif
 
@@ -932,7 +931,7 @@ int X509_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
 int X509_set_ex_data(X509 *r, int idx, void *arg);
 void *X509_get_ex_data(X509 *r, int idx);
 int            i2d_X509_AUX(X509 *a,unsigned char **pp);
-X509 *         d2i_X509_AUX(X509 **a,unsigned char **pp,long length);
+X509 *         d2i_X509_AUX(X509 **a,const unsigned char **pp,long length);
 
 int X509_alias_set1(X509 *x, unsigned char *name, int len);
 int X509_keyid_set1(X509 *x, unsigned char *id, int len);
@@ -954,7 +953,7 @@ int X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev);
 X509_PKEY *    X509_PKEY_new(void );
 void           X509_PKEY_free(X509_PKEY *a);
 int            i2d_X509_PKEY(X509_PKEY *a,unsigned char **pp);
-X509_PKEY *    d2i_X509_PKEY(X509_PKEY **a,unsigned char **pp,long length);
+X509_PKEY *    d2i_X509_PKEY(X509_PKEY **a,const unsigned char **pp,long length);
 
 DECLARE_ASN1_FUNCTIONS(NETSCAPE_SPKI)
 DECLARE_ASN1_FUNCTIONS(NETSCAPE_SPKAC)