mirror of
https://github.com/openssl/openssl.git
synced 2025-01-30 14:01:55 +08:00
constify X509_REQ_add_extensions() and X509_REQ_add_extensions_nid()
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13711)
This commit is contained in:
parent
b24cfd6bf4
commit
743975c7e5
@ -164,15 +164,15 @@ STACK_OF(X509_EXTENSION) *X509_REQ_get_extensions(X509_REQ *req)
|
||||
* Add a STACK_OF extensions to a certificate request: allow alternative OIDs
|
||||
* in case we want to create a non standard one.
|
||||
*/
|
||||
|
||||
int X509_REQ_add_extensions_nid(X509_REQ *req, STACK_OF(X509_EXTENSION) *exts,
|
||||
int nid)
|
||||
int X509_REQ_add_extensions_nid(X509_REQ *req,
|
||||
const STACK_OF(X509_EXTENSION) *exts, int nid)
|
||||
{
|
||||
int extlen;
|
||||
int rv = 0;
|
||||
unsigned char *ext = NULL;
|
||||
|
||||
/* Generate encoding of extensions */
|
||||
extlen = ASN1_item_i2d((ASN1_VALUE *)exts, &ext,
|
||||
extlen = ASN1_item_i2d((const ASN1_VALUE *)exts, &ext,
|
||||
ASN1_ITEM_rptr(X509_EXTENSIONS));
|
||||
if (extlen <= 0)
|
||||
return 0;
|
||||
@ -182,7 +182,7 @@ int X509_REQ_add_extensions_nid(X509_REQ *req, STACK_OF(X509_EXTENSION) *exts,
|
||||
}
|
||||
|
||||
/* This is the normal usage: use the "official" OID */
|
||||
int X509_REQ_add_extensions(X509_REQ *req, STACK_OF(X509_EXTENSION) *exts)
|
||||
int X509_REQ_add_extensions(X509_REQ *req, const STACK_OF(X509_EXTENSION) *exts)
|
||||
{
|
||||
return X509_REQ_add_extensions_nid(req, exts, NID_ext_req);
|
||||
}
|
||||
|
@ -734,9 +734,9 @@ int X509_REQ_extension_nid(int nid);
|
||||
int *X509_REQ_get_extension_nids(void);
|
||||
void X509_REQ_set_extension_nids(int *nids);
|
||||
STACK_OF(X509_EXTENSION) *X509_REQ_get_extensions(X509_REQ *req);
|
||||
int X509_REQ_add_extensions_nid(X509_REQ *req, STACK_OF(X509_EXTENSION) *exts,
|
||||
int nid);
|
||||
int X509_REQ_add_extensions(X509_REQ *req, STACK_OF(X509_EXTENSION) *exts);
|
||||
int X509_REQ_add_extensions_nid(X509_REQ *req,
|
||||
const STACK_OF(X509_EXTENSION) *exts, int nid);
|
||||
int X509_REQ_add_extensions(X509_REQ *req, const STACK_OF(X509_EXTENSION) *ext);
|
||||
int X509_REQ_get_attr_count(const X509_REQ *req);
|
||||
int X509_REQ_get_attr_by_NID(const X509_REQ *req, int nid, int lastpos);
|
||||
int X509_REQ_get_attr_by_OBJ(const X509_REQ *req, const ASN1_OBJECT *obj,
|
||||
|
Loading…
Reference in New Issue
Block a user