Fixes so NO_RSA works again.
[openssl.git] / crypto / x509 / x509.h
index 227bbaf1ca269b65897a15490e82e4a230954bdc..68b5818c957eb7d3a5e761d385ee49043e7f0d60 100644 (file)
@@ -280,10 +280,10 @@ DECLARE_ASN1_SET_OF(X509)
 /* This is used for a table of trust checking functions */
 
 typedef struct x509_trust_st {
-       int trust_id;
-       int trust_flags;
+       int trust;
+       int flags;
        int (*check_trust)(struct x509_trust_st *, X509 *, int);
-       char *trust_name;
+       char *name;
        int arg1;
        void *arg2;
 } X509_TRUST;
@@ -298,6 +298,11 @@ DECLARE_STACK_OF(X509_TRUST)
 #define X509_TRUST_EMAIL       4
 #define X509_TRUST_OBJECT_SIGN 5
 
+/* Keep these up to date! */
+#define X509_TRUST_MIN         1
+#define X509_TRUST_MAX         5
+
+
 /* trust_flags values */
 #define        X509_TRUST_DYNAMIC      1
 #define        X509_TRUST_DYNAMIC_NAME 2
@@ -742,12 +747,16 @@ int               X509_get_pubkey_parameters(EVP_PKEY *pkey,
 int            i2d_PUBKEY(EVP_PKEY *a,unsigned char **pp);
 EVP_PKEY *     d2i_PUBKEY(EVP_PKEY **a,unsigned char **pp,
                        long length);
+#ifndef NO_RSA
 int            i2d_RSA_PUBKEY(RSA *a,unsigned char **pp);
 RSA *          d2i_RSA_PUBKEY(RSA **a,unsigned char **pp,
                        long length);
+#endif
+#ifndef NO_DSA
 int            i2d_DSA_PUBKEY(DSA *a,unsigned char **pp);
 DSA *          d2i_DSA_PUBKEY(DSA **a,unsigned char **pp,
                        long length);
+#endif
 
 X509_SIG *     X509_SIG_new(void );
 void           X509_SIG_free(X509_SIG *a);
@@ -1057,10 +1066,10 @@ int X509_check_trust(X509 *x, int id, int flags);
 int X509_TRUST_get_count(void);
 X509_TRUST * X509_TRUST_iget(int idx);
 int X509_TRUST_get_by_id(int id);
-int X509_TRUST_add(X509_TRUST *xp);
+int X509_TRUST_add(int id, int flags, int (*ck)(X509_TRUST *, X509 *, int),
+                                       char *name, int arg1, void *arg2);
 void X509_TRUST_cleanup(void);
-void X509_TRUST_add_standard(void);
-int X509_TRUST_get_id(X509_TRUST *xp);
+int X509_TRUST_get_flags(X509_TRUST *xp);
 char *X509_TRUST_iget_name(X509_TRUST *xp);
 int X509_TRUST_get_trust(X509_TRUST *xp);
 
@@ -1100,6 +1109,7 @@ int X509_TRUST_get_trust(X509_TRUST *xp);
 #define X509_F_X509_REQ_TO_X509                                 123
 #define X509_F_X509_STORE_ADD_CERT                      124
 #define X509_F_X509_STORE_ADD_CRL                       125
+#define X509_F_X509_STORE_CTX_PURPOSE_INHERIT           134
 #define X509_F_X509_TO_X509_REQ                                 126
 #define X509_F_X509_TRUST_ADD                           133
 #define X509_F_X509_VERIFY_CERT                                 127
@@ -1122,6 +1132,8 @@ int X509_TRUST_get_trust(X509_TRUST *xp);
 #define X509_R_UNABLE_TO_GET_CERTS_PUBLIC_KEY           108
 #define X509_R_UNKNOWN_KEY_TYPE                                 117
 #define X509_R_UNKNOWN_NID                              109
+#define X509_R_UNKNOWN_PURPOSE_ID                       121
+#define X509_R_UNKNOWN_TRUST_ID                                 120
 #define X509_R_UNSUPPORTED_ALGORITHM                    111
 #define X509_R_WRONG_LOOKUP_TYPE                        112