Fixes so NO_RSA works again.
[openssl.git] / crypto / x509 / x509.h
index ed95058a74362002488fcd9693de5d010f8bfc27..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);
@@ -1015,8 +1024,6 @@ int               X509_EXTENSION_set_data(X509_EXTENSION *ex,
 ASN1_OBJECT *  X509_EXTENSION_get_object(X509_EXTENSION *ex);
 ASN1_OCTET_STRING *X509_EXTENSION_get_data(X509_EXTENSION *ne);
 int            X509_EXTENSION_get_critical(X509_EXTENSION *ex);
-void           X509_init(void);
-void           X509_cleanup(void);
 
 int            X509_verify_cert(X509_STORE_CTX *ctx);
 
@@ -1059,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);