Support assembler for Mingw32.
[oweals/openssl.git] / crypto / x509 / x509.h
index 3931710ae1a1d5447798f79de5d2de1d8f5a4f6e..d3336d9cebbe57e6fa852c3862cf2aca08212513 100644 (file)
@@ -242,7 +242,7 @@ typedef struct x509_cert_aux_st
        STACK_OF(ASN1_OBJECT) *reject;          /* rejected uses */
        ASN1_UTF8STRING *alias;                 /* "friendly name" */
        ASN1_OCTET_STRING *keyid;               /* key id of private key */
-       ASN1_TYPE *other;                       /* other unspecified info */
+       STACK_OF(X509_ALGOR) *other;            /* other unspecified info */
        } X509_CERT_AUX;
 
 typedef struct x509_st
@@ -822,11 +822,11 @@ void              X509_CERT_AUX_free(X509_CERT_AUX *a);
 int            i2d_X509_CERT_AUX(X509_CERT_AUX *a,unsigned char **pp);
 X509_CERT_AUX *        d2i_X509_CERT_AUX(X509_CERT_AUX **a,unsigned char **pp,
                                                                long length);
-int X509_alias_rset(X509 *x, unsigned char *name, int len);
-unsigned char * X509_alias_iget(X509 *x, int *len);
+int X509_alias_set1(X509 *x, unsigned char *name, int len);
+unsigned char * X509_alias_get0(X509 *x, int *len);
 int (*X509_TRUST_set_default(int (*trust)(int , X509 *, int)))(int, X509 *, int);
-int X509_radd_trust_object(X509 *x, ASN1_OBJECT *obj);
-int X509_radd_reject_object(X509 *x, ASN1_OBJECT *obj);
+int X509_add1_trust_object(X509 *x, ASN1_OBJECT *obj);
+int X509_add1_reject_object(X509 *x, ASN1_OBJECT *obj);
 void X509_trust_clear(X509 *x);
 void X509_reject_clear(X509 *x);
 
@@ -916,14 +916,14 @@ int X509_REQ_get_attr_by_OBJ(const X509_REQ *req, ASN1_OBJECT *obj,
                          int lastpos);
 X509_ATTRIBUTE *X509_REQ_get_attr(const X509_REQ *req, int loc);
 X509_ATTRIBUTE *X509_REQ_delete_attr(X509_REQ *req, int loc);
-int X509_REQ_radd_attr(X509_REQ *req, X509_ATTRIBUTE *attr);
-int X509_REQ_radd_attr_by_OBJ(X509_REQ *req,
+int X509_REQ_add1_attr(X509_REQ *req, X509_ATTRIBUTE *attr);
+int X509_REQ_add1_attr_by_OBJ(X509_REQ *req,
                        ASN1_OBJECT *obj, int type,
                        unsigned char *bytes, int len);
-int X509_REQ_radd_attr_by_NID(X509_REQ *req,
+int X509_REQ_add1_attr_by_NID(X509_REQ *req,
                        int nid, int type,
                        unsigned char *bytes, int len);
-int X509_REQ_radd_attr_by_txt(X509_REQ *req,
+int X509_REQ_add1_attr_by_txt(X509_REQ *req,
                        char *attrname, int type,
                        unsigned char *bytes, int len);
 
@@ -1011,6 +1011,7 @@ int               X509_get_ext_by_critical(X509 *x, int crit, int lastpos);
 X509_EXTENSION *X509_get_ext(X509 *x, int loc);
 X509_EXTENSION *X509_delete_ext(X509 *x, int loc);
 int            X509_add_ext(X509 *x, X509_EXTENSION *ex, int loc);
+void   *       X509_get_ext_d2i(X509 *x, int nid, int *crit, int *idx);
 
 int            X509_CRL_get_ext_count(X509_CRL *x);
 int            X509_CRL_get_ext_by_NID(X509_CRL *x, int nid, int lastpos);
@@ -1019,6 +1020,7 @@ int               X509_CRL_get_ext_by_critical(X509_CRL *x, int crit, int lastpos);
 X509_EXTENSION *X509_CRL_get_ext(X509_CRL *x, int loc);
 X509_EXTENSION *X509_CRL_delete_ext(X509_CRL *x, int loc);
 int            X509_CRL_add_ext(X509_CRL *x, X509_EXTENSION *ex, int loc);
+void   *       X509_CRL_get_ext_d2i(X509_CRL *x, int nid, int *crit, int *idx);
 
 int            X509_REVOKED_get_ext_count(X509_REVOKED *x);
 int            X509_REVOKED_get_ext_by_NID(X509_REVOKED *x, int nid, int lastpos);
@@ -1027,6 +1029,7 @@ int               X509_REVOKED_get_ext_by_critical(X509_REVOKED *x, int crit, int lastpos);
 X509_EXTENSION *X509_REVOKED_get_ext(X509_REVOKED *x, int loc);
 X509_EXTENSION *X509_REVOKED_delete_ext(X509_REVOKED *x, int loc);
 int            X509_REVOKED_add_ext(X509_REVOKED *x, X509_EXTENSION *ex, int loc);
+void   *       X509_REVOKED_get_ext_d2i(X509_REVOKED *x, int nid, int *crit, int *idx);
 
 X509_EXTENSION *X509_EXTENSION_create_by_NID(X509_EXTENSION **ex,
                        int nid, int crit, ASN1_OCTET_STRING *data);
@@ -1047,15 +1050,15 @@ int X509at_get_attr_by_OBJ(const STACK_OF(X509_ATTRIBUTE) *sk, ASN1_OBJECT *obj,
                          int lastpos);
 X509_ATTRIBUTE *X509at_get_attr(const STACK_OF(X509_ATTRIBUTE) *x, int loc);
 X509_ATTRIBUTE *X509at_delete_attr(STACK_OF(X509_ATTRIBUTE) *x, int loc);
-STACK_OF(X509_ATTRIBUTE) *X509at_radd_attr(STACK_OF(X509_ATTRIBUTE) **x,
+STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr(STACK_OF(X509_ATTRIBUTE) **x,
                                         X509_ATTRIBUTE *attr);
-STACK_OF(X509_ATTRIBUTE) *X509at_radd_attr_by_OBJ(STACK_OF(X509_ATTRIBUTE) **x,
+STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_OBJ(STACK_OF(X509_ATTRIBUTE) **x,
                        ASN1_OBJECT *obj, int type,
                        unsigned char *bytes, int len);
-STACK_OF(X509_ATTRIBUTE) *X509at_radd_attr_by_NID(STACK_OF(X509_ATTRIBUTE) **x,
+STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_NID(STACK_OF(X509_ATTRIBUTE) **x,
                        int nid, int type,
                        unsigned char *bytes, int len);
-STACK_OF(X509_ATTRIBUTE) *X509at_radd_attr_by_txt(STACK_OF(X509_ATTRIBUTE) **x,
+STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_txt(STACK_OF(X509_ATTRIBUTE) **x,
                        char *attrname, int type,
                        unsigned char *bytes, int len);
 X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_NID(X509_ATTRIBUTE **attr, int nid,
@@ -1064,13 +1067,13 @@ X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_OBJ(X509_ATTRIBUTE **attr,
             ASN1_OBJECT *obj, int atrtype, void *data, int len);
 X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_txt(X509_ATTRIBUTE **attr,
                char *atrname, int type, unsigned char *bytes, int len);
-int X509_ATTRIBUTE_rset_object(X509_ATTRIBUTE *attr, ASN1_OBJECT *obj);
-int X509_ATTRIBUTE_rset_data(X509_ATTRIBUTE *attr, int attrtype, void *data, int len);
-void *X509_ATTRIBUTE_iget_data(X509_ATTRIBUTE *attr, int idx,
+int X509_ATTRIBUTE_set1_object(X509_ATTRIBUTE *attr, ASN1_OBJECT *obj);
+int X509_ATTRIBUTE_set1_data(X509_ATTRIBUTE *attr, int attrtype, void *data, int len);
+void *X509_ATTRIBUTE_get0_data(X509_ATTRIBUTE *attr, int idx,
                                        int atrtype, void *data);
 int X509_ATTRIBUTE_count(X509_ATTRIBUTE *attr);
-ASN1_OBJECT *X509_ATTRIBUTE_iget_object(X509_ATTRIBUTE *attr);
-ASN1_TYPE *X509_ATTRIBUTE_iget_type(X509_ATTRIBUTE *attr, int idx);
+ASN1_OBJECT *X509_ATTRIBUTE_get0_object(X509_ATTRIBUTE *attr);
+ASN1_TYPE *X509_ATTRIBUTE_get0_type(X509_ATTRIBUTE *attr, int idx);
 
 int            X509_verify_cert(X509_STORE_CTX *ctx);
 
@@ -1112,13 +1115,13 @@ PKCS8_PRIV_KEY_INFO *PKCS8_set_broken(PKCS8_PRIV_KEY_INFO *p8, int broken);
 
 int X509_check_trust(X509 *x, int id, int flags);
 int X509_TRUST_get_count(void);
-X509_TRUST * X509_TRUST_iget(int idx);
+X509_TRUST * X509_TRUST_get0(int idx);
 int X509_TRUST_get_by_id(int id);
 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);
 int X509_TRUST_get_flags(X509_TRUST *xp);
-char *X509_TRUST_iget_name(X509_TRUST *xp);
+char *X509_TRUST_get0_name(X509_TRUST *xp);
 int X509_TRUST_get_trust(X509_TRUST *xp);
 
 /* BEGIN ERROR CODES */
@@ -1140,8 +1143,8 @@ int X509_TRUST_get_trust(X509_TRUST *xp);
 #define X509_F_X509_ATTRIBUTE_CREATE_BY_NID             136
 #define X509_F_X509_ATTRIBUTE_CREATE_BY_OBJ             137
 #define X509_F_X509_ATTRIBUTE_CREATE_BY_TXT             140
-#define X509_F_X509_ATTRIBUTE_IGET_DATA                         139
-#define X509_F_X509_ATTRIBUTE_RSET_DATA                         138
+#define X509_F_X509_ATTRIBUTE_GET0_DATA                         139
+#define X509_F_X509_ATTRIBUTE_SET1_DATA                         138
 #define X509_F_X509_CHECK_PRIVATE_KEY                   128
 #define X509_F_X509_EXTENSION_CREATE_BY_NID             108
 #define X509_F_X509_EXTENSION_CREATE_BY_OBJ             109