diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2000-02-26 01:55:33 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2000-02-26 01:55:33 +0000 |
commit | c7cb16a8ffa2a791949044378f278e8f4089d7d6 (patch) | |
tree | cfcea4ea79aeef0cf9867f187805a5c3712a8f49 /crypto/x509 | |
parent | 47c177c7b369ba40aa7f4a56d4b83f4178cf1d9f (diff) | |
download | openssl-c7cb16a8ffa2a791949044378f278e8f4089d7d6.tar.gz |
Rename functions for new convention.
Diffstat (limited to 'crypto/x509')
-rw-r--r-- | crypto/x509/x509.h | 36 | ||||
-rw-r--r-- | crypto/x509/x509_att.c | 36 | ||||
-rw-r--r-- | crypto/x509/x509_err.c | 4 | ||||
-rw-r--r-- | crypto/x509/x509_req.c | 16 | ||||
-rw-r--r-- | crypto/x509/x509_trs.c | 2 | ||||
-rw-r--r-- | crypto/x509/x509_vfy.c | 2 | ||||
-rw-r--r-- | crypto/x509/x509_vfy.h | 2 |
7 files changed, 49 insertions, 49 deletions
diff --git a/crypto/x509/x509.h b/crypto/x509/x509.h index 69a2e35ea9..bd602ce8b1 100644 --- a/crypto/x509/x509.h +++ b/crypto/x509/x509.h @@ -825,8 +825,8 @@ X509_CERT_AUX * d2i_X509_CERT_AUX(X509_CERT_AUX **a,unsigned char **pp, int X509_alias_rset(X509 *x, unsigned char *name, int len); unsigned char * X509_alias_iget(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); @@ -1050,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, @@ -1067,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); @@ -1121,7 +1121,7 @@ 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 */ @@ -1143,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 diff --git a/crypto/x509/x509_att.c b/crypto/x509/x509_att.c index da76f9cd4d..caafde658f 100644 --- a/crypto/x509/x509_att.c +++ b/crypto/x509/x509_att.c @@ -119,7 +119,7 @@ X509_ATTRIBUTE *X509at_delete_attr(STACK_OF(X509_ATTRIBUTE) *x, int loc) return(ret); } -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) { X509_ATTRIBUTE *new_attr=NULL; @@ -148,7 +148,7 @@ err2: return(NULL); } -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) { @@ -156,12 +156,12 @@ STACK_OF(X509_ATTRIBUTE) *X509at_radd_attr_by_OBJ(STACK_OF(X509_ATTRIBUTE) **x, STACK_OF(X509_ATTRIBUTE) *ret; attr = X509_ATTRIBUTE_create_by_OBJ(NULL, obj, type, bytes, len); if(!attr) return 0; - ret = X509at_radd_attr(x, attr); + ret = X509at_add1_attr(x, attr); X509_ATTRIBUTE_free(attr); return ret; } -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) { @@ -169,12 +169,12 @@ STACK_OF(X509_ATTRIBUTE) *X509at_radd_attr_by_NID(STACK_OF(X509_ATTRIBUTE) **x, STACK_OF(X509_ATTRIBUTE) *ret; attr = X509_ATTRIBUTE_create_by_NID(NULL, nid, type, bytes, len); if(!attr) return 0; - ret = X509at_radd_attr(x, attr); + ret = X509at_add1_attr(x, attr); X509_ATTRIBUTE_free(attr); return ret; } -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) { @@ -182,7 +182,7 @@ STACK_OF(X509_ATTRIBUTE) *X509at_radd_attr_by_txt(STACK_OF(X509_ATTRIBUTE) **x, STACK_OF(X509_ATTRIBUTE) *ret; attr = X509_ATTRIBUTE_create_by_txt(NULL, attrname, type, bytes, len); if(!attr) return 0; - ret = X509at_radd_attr(x, attr); + ret = X509at_add1_attr(x, attr); X509_ATTRIBUTE_free(attr); return ret; } @@ -220,9 +220,9 @@ X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_OBJ(X509_ATTRIBUTE **attr, else ret= *attr; - if (!X509_ATTRIBUTE_rset_object(ret,obj)) + if (!X509_ATTRIBUTE_set1_object(ret,obj)) goto err; - if (!X509_ATTRIBUTE_rset_data(ret,atrtype,data,len)) + if (!X509_ATTRIBUTE_set1_data(ret,atrtype,data,len)) goto err; if ((attr != NULL) && (*attr == NULL)) *attr=ret; @@ -252,7 +252,7 @@ X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_txt(X509_ATTRIBUTE **attr, return nattr; } -int X509_ATTRIBUTE_rset_object(X509_ATTRIBUTE *attr, ASN1_OBJECT *obj) +int X509_ATTRIBUTE_set1_object(X509_ATTRIBUTE *attr, ASN1_OBJECT *obj) { if ((attr == NULL) || (obj == NULL)) return(0); @@ -261,7 +261,7 @@ int X509_ATTRIBUTE_rset_object(X509_ATTRIBUTE *attr, ASN1_OBJECT *obj) return(1); } -int X509_ATTRIBUTE_rset_data(X509_ATTRIBUTE *attr, int attrtype, void *data, int len) +int X509_ATTRIBUTE_set1_data(X509_ATTRIBUTE *attr, int attrtype, void *data, int len) { ASN1_TYPE *ttmp; ASN1_STRING *stmp; @@ -271,7 +271,7 @@ int X509_ATTRIBUTE_rset_data(X509_ATTRIBUTE *attr, int attrtype, void *data, int stmp = ASN1_STRING_set_by_NID(NULL, data, len, attrtype, OBJ_obj2nid(attr->object)); if(!stmp) { - X509err(X509_F_X509_ATTRIBUTE_RSET_DATA, ERR_R_ASN1_LIB); + X509err(X509_F_X509_ATTRIBUTE_SET1_DATA, ERR_R_ASN1_LIB); return 0; } atype = stmp->type; @@ -287,7 +287,7 @@ int X509_ATTRIBUTE_rset_data(X509_ATTRIBUTE *attr, int attrtype, void *data, int ASN1_TYPE_set(ttmp, atype, stmp); return 1; err: - X509err(X509_F_X509_ATTRIBUTE_RSET_DATA, ERR_R_MALLOC_FAILURE); + X509err(X509_F_X509_ATTRIBUTE_SET1_DATA, ERR_R_MALLOC_FAILURE); return 0; } @@ -298,26 +298,26 @@ int X509_ATTRIBUTE_count(X509_ATTRIBUTE *attr) return 0; } -ASN1_OBJECT *X509_ATTRIBUTE_iget_object(X509_ATTRIBUTE *attr) +ASN1_OBJECT *X509_ATTRIBUTE_get0_object(X509_ATTRIBUTE *attr) { if (attr == NULL) return(NULL); return(attr->object); } -void *X509_ATTRIBUTE_iget_data(X509_ATTRIBUTE *attr, int idx, +void *X509_ATTRIBUTE_get0_data(X509_ATTRIBUTE *attr, int idx, int atrtype, void *data) { ASN1_TYPE *ttmp; - ttmp = X509_ATTRIBUTE_iget_type(attr, idx); + ttmp = X509_ATTRIBUTE_get0_type(attr, idx); if(!ttmp) return NULL; if(atrtype != ASN1_TYPE_get(ttmp)){ - X509err(X509_F_X509_ATTRIBUTE_IGET_DATA, X509_R_WRONG_TYPE); + X509err(X509_F_X509_ATTRIBUTE_GET0_DATA, X509_R_WRONG_TYPE); return NULL; } return ttmp->value.ptr; } -ASN1_TYPE *X509_ATTRIBUTE_iget_type(X509_ATTRIBUTE *attr, int idx) +ASN1_TYPE *X509_ATTRIBUTE_get0_type(X509_ATTRIBUTE *attr, int idx) { if (attr == NULL) return(NULL); if(idx >= X509_ATTRIBUTE_count(attr)) return NULL; diff --git a/crypto/x509/x509_err.c b/crypto/x509/x509_err.c index a9a81167a7..fdedbdac34 100644 --- a/crypto/x509/x509_err.c +++ b/crypto/x509/x509_err.c @@ -76,8 +76,8 @@ static ERR_STRING_DATA X509_str_functs[]= {ERR_PACK(0,X509_F_X509_ATTRIBUTE_CREATE_BY_NID,0), "X509_ATTRIBUTE_create_by_NID"}, {ERR_PACK(0,X509_F_X509_ATTRIBUTE_CREATE_BY_OBJ,0), "X509_ATTRIBUTE_create_by_OBJ"}, {ERR_PACK(0,X509_F_X509_ATTRIBUTE_CREATE_BY_TXT,0), "X509_ATTRIBUTE_create_by_txt"}, -{ERR_PACK(0,X509_F_X509_ATTRIBUTE_IGET_DATA,0), "X509_ATTRIBUTE_iget_data"}, -{ERR_PACK(0,X509_F_X509_ATTRIBUTE_RSET_DATA,0), "X509_ATTRIBUTE_rset_data"}, +{ERR_PACK(0,X509_F_X509_ATTRIBUTE_GET0_DATA,0), "X509_ATTRIBUTE_get0_data"}, +{ERR_PACK(0,X509_F_X509_ATTRIBUTE_SET1_DATA,0), "X509_ATTRIBUTE_set1_data"}, {ERR_PACK(0,X509_F_X509_CHECK_PRIVATE_KEY,0), "X509_check_private_key"}, {ERR_PACK(0,X509_F_X509_EXTENSION_CREATE_BY_NID,0), "X509_EXTENSION_create_by_NID"}, {ERR_PACK(0,X509_F_X509_EXTENSION_CREATE_BY_OBJ,0), "X509_EXTENSION_create_by_OBJ"}, diff --git a/crypto/x509/x509_req.c b/crypto/x509/x509_req.c index 68b8c2d76f..baef8790eb 100644 --- a/crypto/x509/x509_req.c +++ b/crypto/x509/x509_req.c @@ -244,35 +244,35 @@ X509_ATTRIBUTE *X509_REQ_delete_attr(X509_REQ *req, int loc) return X509at_delete_attr(req->req_info->attributes, loc); } -int X509_REQ_radd_attr(X509_REQ *req, X509_ATTRIBUTE *attr) +int X509_REQ_add1_attr(X509_REQ *req, X509_ATTRIBUTE *attr) { - if(X509at_radd_attr(&req->req_info->attributes, attr)) return 1; + if(X509at_add1_attr(&req->req_info->attributes, attr)) return 1; return 0; } -int X509_REQ_radd_attr_by_OBJ(X509_REQ *req, +int X509_REQ_add1_attr_by_OBJ(X509_REQ *req, ASN1_OBJECT *obj, int type, unsigned char *bytes, int len) { - if(X509at_radd_attr_by_OBJ(&req->req_info->attributes, obj, + if(X509at_add1_attr_by_OBJ(&req->req_info->attributes, obj, type, bytes, len)) return 1; return 0; } -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) { - if(X509at_radd_attr_by_NID(&req->req_info->attributes, nid, + if(X509at_add1_attr_by_NID(&req->req_info->attributes, nid, type, bytes, len)) return 1; return 0; } -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) { - if(X509at_radd_attr_by_txt(&req->req_info->attributes, attrname, + if(X509at_add1_attr_by_txt(&req->req_info->attributes, attrname, type, bytes, len)) return 1; return 0; } diff --git a/crypto/x509/x509_trs.c b/crypto/x509/x509_trs.c index c63920fd92..3f76cd89df 100644 --- a/crypto/x509/x509_trs.c +++ b/crypto/x509/x509_trs.c @@ -214,7 +214,7 @@ int X509_TRUST_get_flags(X509_TRUST *xp) return xp->flags; } -char *X509_TRUST_iget_name(X509_TRUST *xp) +char *X509_TRUST_get0_name(X509_TRUST *xp) { return xp->name; } diff --git a/crypto/x509/x509_vfy.c b/crypto/x509/x509_vfy.c index ec25cf8d85..8de6cc97f3 100644 --- a/crypto/x509/x509_vfy.c +++ b/crypto/x509/x509_vfy.c @@ -717,7 +717,7 @@ STACK_OF(X509) *X509_STORE_CTX_get_chain(X509_STORE_CTX *ctx) return(ctx->chain); } -STACK_OF(X509) *X509_STORE_CTX_rget_chain(X509_STORE_CTX *ctx) +STACK_OF(X509) *X509_STORE_CTX_get1_chain(X509_STORE_CTX *ctx) { int i; X509 *x; diff --git a/crypto/x509/x509_vfy.h b/crypto/x509/x509_vfy.h index 7d064820f9..4637aecedf 100644 --- a/crypto/x509/x509_vfy.h +++ b/crypto/x509/x509_vfy.h @@ -347,7 +347,7 @@ void X509_STORE_CTX_set_error(X509_STORE_CTX *ctx,int s); int X509_STORE_CTX_get_error_depth(X509_STORE_CTX *ctx); X509 * X509_STORE_CTX_get_current_cert(X509_STORE_CTX *ctx); STACK_OF(X509) *X509_STORE_CTX_get_chain(X509_STORE_CTX *ctx); -STACK_OF(X509) *X509_STORE_CTX_rget_chain(X509_STORE_CTX *ctx); +STACK_OF(X509) *X509_STORE_CTX_get1_chain(X509_STORE_CTX *ctx); void X509_STORE_CTX_set_cert(X509_STORE_CTX *c,X509 *x); void X509_STORE_CTX_set_chain(X509_STORE_CTX *c,STACK_OF(X509) *sk); int X509_STORE_CTX_set_purpose(X509_STORE_CTX *ctx, int purpose); |