diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2000-01-19 01:02:13 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2000-01-19 01:02:13 +0000 |
commit | 77b47b903684020d07d16519b2a74cc58668fb20 (patch) | |
tree | a9685d9e5667bb0fc0349fd19eb87a7dae499ff3 /crypto/x509/x509_req.c | |
parent | 721b5b2a5c27365685adb59412b4a5d0b168221d (diff) | |
download | openssl-new-77b47b903684020d07d16519b2a74cc58668fb20.tar.gz |
Rename X509_att*() stuff to X509at_*(), add X509_REQ wrappers.
Diffstat (limited to 'crypto/x509/x509_req.c')
-rw-r--r-- | crypto/x509/x509_req.c | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/crypto/x509/x509_req.c b/crypto/x509/x509_req.c index b20305c6ee..849b43766c 100644 --- a/crypto/x509/x509_req.c +++ b/crypto/x509/x509_req.c @@ -214,3 +214,65 @@ int X509_REQ_add_extensions(X509_REQ *req, STACK_OF(X509_EXTENSION) *exts) { return X509_REQ_add_extensions_nid(req, exts, NID_ext_req); } + +/* Request attribute functions */ + +int X509_REQ_get_attr_count(const X509_REQ *req) +{ + return X509at_get_attr_count(req->req_info->attributes); +} + +int X509_REQ_get_attr_by_NID(const X509_REQ *req, int nid, + int lastpos) +{ + return X509at_get_attr_by_NID(req->req_info->attributes, nid, lastpos); +} + +int X509_REQ_get_attr_by_OBJ(const X509_REQ *req, ASN1_OBJECT *obj, + int lastpos) +{ + return X509at_get_attr_by_OBJ(req->req_info->attributes, obj, lastpos); +} + +X509_ATTRIBUTE *X509_REQ_get_attr(const X509_REQ *req, int loc) +{ + return X509at_get_attr(req->req_info->attributes, loc); +} + +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) +{ + if(X509at_radd_attr(&req->req_info->attributes, attr)) return 1; + return 0; +} + +int X509_REQ_radd_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, + type, bytes, len)) return 1; + return 0; +} + +int X509_REQ_radd_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, + type, bytes, len)) return 1; + return 0; +} + +int X509_REQ_radd_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, + type, bytes, len)) return 1; + return 0; +} |