Constify some ASN1_OBJECT *obj input parameters

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
FdaSilvaYY 2016-07-31 19:38:09 +02:00 committed by Richard Levitte
parent cfc5e0aa73
commit c47ba4e96c
21 changed files with 80 additions and 73 deletions

View File

@ -26,7 +26,7 @@ int CMS_signed_get_attr_by_NID(const CMS_SignerInfo *si, int nid, int lastpos)
return X509at_get_attr_by_NID(si->signedAttrs, nid, lastpos); return X509at_get_attr_by_NID(si->signedAttrs, nid, lastpos);
} }
int CMS_signed_get_attr_by_OBJ(const CMS_SignerInfo *si, ASN1_OBJECT *obj, int CMS_signed_get_attr_by_OBJ(const CMS_SignerInfo *si, const ASN1_OBJECT *obj,
int lastpos) int lastpos)
{ {
return X509at_get_attr_by_OBJ(si->signedAttrs, obj, lastpos); return X509at_get_attr_by_OBJ(si->signedAttrs, obj, lastpos);
@ -75,7 +75,7 @@ int CMS_signed_add1_attr_by_txt(CMS_SignerInfo *si,
return 0; return 0;
} }
void *CMS_signed_get0_data_by_OBJ(CMS_SignerInfo *si, ASN1_OBJECT *oid, void *CMS_signed_get0_data_by_OBJ(CMS_SignerInfo *si, const ASN1_OBJECT *oid,
int lastpos, int type) int lastpos, int type)
{ {
return X509at_get0_data_by_OBJ(si->signedAttrs, oid, lastpos, type); return X509at_get0_data_by_OBJ(si->signedAttrs, oid, lastpos, type);
@ -92,8 +92,8 @@ int CMS_unsigned_get_attr_by_NID(const CMS_SignerInfo *si, int nid,
return X509at_get_attr_by_NID(si->unsignedAttrs, nid, lastpos); return X509at_get_attr_by_NID(si->unsignedAttrs, nid, lastpos);
} }
int CMS_unsigned_get_attr_by_OBJ(const CMS_SignerInfo *si, ASN1_OBJECT *obj, int CMS_unsigned_get_attr_by_OBJ(const CMS_SignerInfo *si,
int lastpos) const ASN1_OBJECT *obj, int lastpos)
{ {
return X509at_get_attr_by_OBJ(si->unsignedAttrs, obj, lastpos); return X509at_get_attr_by_OBJ(si->unsignedAttrs, obj, lastpos);
} }

View File

@ -99,7 +99,7 @@ int EVP_PKEY_get_attr_by_NID(const EVP_PKEY *key, int nid, int lastpos)
return X509at_get_attr_by_NID(key->attributes, nid, lastpos); return X509at_get_attr_by_NID(key->attributes, nid, lastpos);
} }
int EVP_PKEY_get_attr_by_OBJ(const EVP_PKEY *key, ASN1_OBJECT *obj, int EVP_PKEY_get_attr_by_OBJ(const EVP_PKEY *key, const ASN1_OBJECT *obj,
int lastpos) int lastpos)
{ {
return X509at_get_attr_by_OBJ(key->attributes, obj, lastpos); return X509at_get_attr_by_OBJ(key->attributes, obj, lastpos);

View File

@ -31,7 +31,7 @@ int OCSP_REQUEST_get_ext_by_NID(OCSP_REQUEST *x, int nid, int lastpos)
(x->tbsRequest.requestExtensions, nid, lastpos)); (x->tbsRequest.requestExtensions, nid, lastpos));
} }
int OCSP_REQUEST_get_ext_by_OBJ(OCSP_REQUEST *x, ASN1_OBJECT *obj, int OCSP_REQUEST_get_ext_by_OBJ(OCSP_REQUEST *x, const ASN1_OBJECT *obj,
int lastpos) int lastpos)
{ {
return (X509v3_get_ext_by_OBJ return (X509v3_get_ext_by_OBJ
@ -84,7 +84,8 @@ int OCSP_ONEREQ_get_ext_by_NID(OCSP_ONEREQ *x, int nid, int lastpos)
return (X509v3_get_ext_by_NID(x->singleRequestExtensions, nid, lastpos)); return (X509v3_get_ext_by_NID(x->singleRequestExtensions, nid, lastpos));
} }
int OCSP_ONEREQ_get_ext_by_OBJ(OCSP_ONEREQ *x, ASN1_OBJECT *obj, int lastpos) int OCSP_ONEREQ_get_ext_by_OBJ(OCSP_ONEREQ *x, const ASN1_OBJECT *obj,
int lastpos)
{ {
return (X509v3_get_ext_by_OBJ(x->singleRequestExtensions, obj, lastpos)); return (X509v3_get_ext_by_OBJ(x->singleRequestExtensions, obj, lastpos));
} }
@ -135,7 +136,7 @@ int OCSP_BASICRESP_get_ext_by_NID(OCSP_BASICRESP *x, int nid, int lastpos)
(x->tbsResponseData.responseExtensions, nid, lastpos)); (x->tbsResponseData.responseExtensions, nid, lastpos));
} }
int OCSP_BASICRESP_get_ext_by_OBJ(OCSP_BASICRESP *x, ASN1_OBJECT *obj, int OCSP_BASICRESP_get_ext_by_OBJ(OCSP_BASICRESP *x, const ASN1_OBJECT *obj,
int lastpos) int lastpos)
{ {
return (X509v3_get_ext_by_OBJ return (X509v3_get_ext_by_OBJ
@ -191,7 +192,7 @@ int OCSP_SINGLERESP_get_ext_by_NID(OCSP_SINGLERESP *x, int nid, int lastpos)
return (X509v3_get_ext_by_NID(x->singleExtensions, nid, lastpos)); return (X509v3_get_ext_by_NID(x->singleExtensions, nid, lastpos));
} }
int OCSP_SINGLERESP_get_ext_by_OBJ(OCSP_SINGLERESP *x, ASN1_OBJECT *obj, int OCSP_SINGLERESP_get_ext_by_OBJ(OCSP_SINGLERESP *x, const ASN1_OBJECT *obj,
int lastpos) int lastpos)
{ {
return (X509v3_get_ext_by_OBJ(x->singleExtensions, obj, lastpos)); return (X509v3_get_ext_by_OBJ(x->singleExtensions, obj, lastpos));

View File

@ -76,7 +76,7 @@ ASN1_OCTET_STRING *TS_MSG_IMPRINT_get_msg(TS_MSG_IMPRINT *a)
return a->hashed_msg; return a->hashed_msg;
} }
int TS_REQ_set_policy_id(TS_REQ *a, ASN1_OBJECT *policy) int TS_REQ_set_policy_id(TS_REQ *a, const ASN1_OBJECT *policy)
{ {
ASN1_OBJECT *new_policy; ASN1_OBJECT *new_policy;
@ -152,7 +152,7 @@ int TS_REQ_get_ext_by_NID(TS_REQ *a, int nid, int lastpos)
return X509v3_get_ext_by_NID(a->extensions, nid, lastpos); return X509v3_get_ext_by_NID(a->extensions, nid, lastpos);
} }
int TS_REQ_get_ext_by_OBJ(TS_REQ *a, ASN1_OBJECT *obj, int lastpos) int TS_REQ_get_ext_by_OBJ(TS_REQ *a, const ASN1_OBJECT *obj, int lastpos)
{ {
return X509v3_get_ext_by_OBJ(a->extensions, obj, lastpos); return X509v3_get_ext_by_OBJ(a->extensions, obj, lastpos);
} }

View File

@ -173,7 +173,7 @@ int TS_RESP_CTX_set_signer_digest(TS_RESP_CTX *ctx, const EVP_MD *md)
return 1; return 1;
} }
int TS_RESP_CTX_set_def_policy(TS_RESP_CTX *ctx, ASN1_OBJECT *def_policy) int TS_RESP_CTX_set_def_policy(TS_RESP_CTX *ctx, const ASN1_OBJECT *def_policy)
{ {
ASN1_OBJECT_free(ctx->default_policy); ASN1_OBJECT_free(ctx->default_policy);
if ((ctx->default_policy = OBJ_dup(def_policy)) == NULL) if ((ctx->default_policy = OBJ_dup(def_policy)) == NULL)
@ -199,7 +199,7 @@ int TS_RESP_CTX_set_certs(TS_RESP_CTX *ctx, STACK_OF(X509) *certs)
return 1; return 1;
} }
int TS_RESP_CTX_add_policy(TS_RESP_CTX *ctx, ASN1_OBJECT *policy) int TS_RESP_CTX_add_policy(TS_RESP_CTX *ctx, const ASN1_OBJECT *policy)
{ {
ASN1_OBJECT *copy = NULL; ASN1_OBJECT *copy = NULL;

View File

@ -313,7 +313,7 @@ int TS_TST_INFO_get_ext_by_NID(TS_TST_INFO *a, int nid, int lastpos)
return X509v3_get_ext_by_NID(a->extensions, nid, lastpos); return X509v3_get_ext_by_NID(a->extensions, nid, lastpos);
} }
int TS_TST_INFO_get_ext_by_OBJ(TS_TST_INFO *a, ASN1_OBJECT *obj, int lastpos) int TS_TST_INFO_get_ext_by_OBJ(TS_TST_INFO *a, const ASN1_OBJECT *obj, int lastpos)
{ {
return X509v3_get_ext_by_OBJ(a->extensions, obj, lastpos); return X509v3_get_ext_by_OBJ(a->extensions, obj, lastpos);
} }

View File

@ -25,12 +25,13 @@ static int int_ts_RESP_verify_token(TS_VERIFY_CTX *ctx,
PKCS7 *token, TS_TST_INFO *tst_info); PKCS7 *token, TS_TST_INFO *tst_info);
static int ts_check_status_info(TS_RESP *response); static int ts_check_status_info(TS_RESP *response);
static char *ts_get_status_text(STACK_OF(ASN1_UTF8STRING) *text); static char *ts_get_status_text(STACK_OF(ASN1_UTF8STRING) *text);
static int ts_check_policy(ASN1_OBJECT *req_oid, TS_TST_INFO *tst_info); static int ts_check_policy(const ASN1_OBJECT *req_oid,
const TS_TST_INFO *tst_info);
static int ts_compute_imprint(BIO *data, TS_TST_INFO *tst_info, static int ts_compute_imprint(BIO *data, TS_TST_INFO *tst_info,
X509_ALGOR **md_alg, X509_ALGOR **md_alg,
unsigned char **imprint, unsigned *imprint_len); unsigned char **imprint, unsigned *imprint_len);
static int ts_check_imprints(X509_ALGOR *algor_a, static int ts_check_imprints(X509_ALGOR *algor_a,
unsigned char *imprint_a, unsigned len_a, const unsigned char *imprint_a, unsigned len_a,
TS_TST_INFO *tst_info); TS_TST_INFO *tst_info);
static int ts_check_nonces(const ASN1_INTEGER *a, TS_TST_INFO *tst_info); static int ts_check_nonces(const ASN1_INTEGER *a, TS_TST_INFO *tst_info);
static int ts_check_signer_name(GENERAL_NAME *tsa_name, X509 *signer); static int ts_check_signer_name(GENERAL_NAME *tsa_name, X509 *signer);
@ -477,9 +478,10 @@ static char *ts_get_status_text(STACK_OF(ASN1_UTF8STRING) *text)
return result; return result;
} }
static int ts_check_policy(ASN1_OBJECT *req_oid, TS_TST_INFO *tst_info) static int ts_check_policy(const ASN1_OBJECT *req_oid,
const TS_TST_INFO *tst_info)
{ {
ASN1_OBJECT *resp_oid = tst_info->policy_id; const ASN1_OBJECT *resp_oid = tst_info->policy_id;
if (OBJ_cmp(req_oid, resp_oid) != 0) { if (OBJ_cmp(req_oid, resp_oid) != 0) {
TSerr(TS_F_TS_CHECK_POLICY, TS_R_POLICY_MISMATCH); TSerr(TS_F_TS_CHECK_POLICY, TS_R_POLICY_MISMATCH);
@ -544,7 +546,7 @@ static int ts_compute_imprint(BIO *data, TS_TST_INFO *tst_info,
} }
static int ts_check_imprints(X509_ALGOR *algor_a, static int ts_check_imprints(X509_ALGOR *algor_a,
unsigned char *imprint_a, unsigned len_a, const unsigned char *imprint_a, unsigned len_a,
TS_TST_INFO *tst_info) TS_TST_INFO *tst_info)
{ {
TS_MSG_IMPRINT *b = tst_info->msg_imprint; TS_MSG_IMPRINT *b = tst_info->msg_imprint;

View File

@ -25,16 +25,15 @@ int X509at_get_attr_count(const STACK_OF(X509_ATTRIBUTE) *x)
int X509at_get_attr_by_NID(const STACK_OF(X509_ATTRIBUTE) *x, int nid, int X509at_get_attr_by_NID(const STACK_OF(X509_ATTRIBUTE) *x, int nid,
int lastpos) int lastpos)
{ {
ASN1_OBJECT *obj; const ASN1_OBJECT *obj = OBJ_nid2obj(nid);
obj = OBJ_nid2obj(nid);
if (obj == NULL) if (obj == NULL)
return (-2); return (-2);
return (X509at_get_attr_by_OBJ(x, obj, lastpos)); return (X509at_get_attr_by_OBJ(x, obj, lastpos));
} }
int X509at_get_attr_by_OBJ(const STACK_OF(X509_ATTRIBUTE) *sk, int X509at_get_attr_by_OBJ(const STACK_OF(X509_ATTRIBUTE) *sk,
ASN1_OBJECT *obj, int lastpos) const ASN1_OBJECT *obj, int lastpos)
{ {
int n; int n;
X509_ATTRIBUTE *ex; X509_ATTRIBUTE *ex;
@ -151,7 +150,7 @@ STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_txt(STACK_OF(X509_ATTRIBUTE)
} }
void *X509at_get0_data_by_OBJ(STACK_OF(X509_ATTRIBUTE) *x, void *X509at_get0_data_by_OBJ(STACK_OF(X509_ATTRIBUTE) *x,
ASN1_OBJECT *obj, int lastpos, int type) const ASN1_OBJECT *obj, int lastpos, int type)
{ {
int i; int i;
X509_ATTRIBUTE *at; X509_ATTRIBUTE *at;

View File

@ -27,7 +27,8 @@ int X509_CRL_get_ext_by_NID(const X509_CRL *x, int nid, int lastpos)
return (X509v3_get_ext_by_NID(x->crl.extensions, nid, lastpos)); return (X509v3_get_ext_by_NID(x->crl.extensions, nid, lastpos));
} }
int X509_CRL_get_ext_by_OBJ(const X509_CRL *x, ASN1_OBJECT *obj, int lastpos) int X509_CRL_get_ext_by_OBJ(const X509_CRL *x, const ASN1_OBJECT *obj,
int lastpos)
{ {
return (X509v3_get_ext_by_OBJ(x->crl.extensions, obj, lastpos)); return (X509v3_get_ext_by_OBJ(x->crl.extensions, obj, lastpos));
} }
@ -73,7 +74,7 @@ int X509_get_ext_by_NID(const X509 *x, int nid, int lastpos)
return (X509v3_get_ext_by_NID(x->cert_info.extensions, nid, lastpos)); return (X509v3_get_ext_by_NID(x->cert_info.extensions, nid, lastpos));
} }
int X509_get_ext_by_OBJ(const X509 *x, ASN1_OBJECT *obj, int lastpos) int X509_get_ext_by_OBJ(const X509 *x, const ASN1_OBJECT *obj, int lastpos)
{ {
return (X509v3_get_ext_by_OBJ(x->cert_info.extensions, obj, lastpos)); return (X509v3_get_ext_by_OBJ(x->cert_info.extensions, obj, lastpos));
} }
@ -121,7 +122,7 @@ int X509_REVOKED_get_ext_by_NID(const X509_REVOKED *x, int nid, int lastpos)
return (X509v3_get_ext_by_NID(x->extensions, nid, lastpos)); return (X509v3_get_ext_by_NID(x->extensions, nid, lastpos));
} }
int X509_REVOKED_get_ext_by_OBJ(const X509_REVOKED *x, ASN1_OBJECT *obj, int X509_REVOKED_get_ext_by_OBJ(const X509_REVOKED *x, const ASN1_OBJECT *obj,
int lastpos) int lastpos)
{ {
return (X509v3_get_ext_by_OBJ(x->extensions, obj, lastpos)); return (X509v3_get_ext_by_OBJ(x->extensions, obj, lastpos));

View File

@ -214,7 +214,7 @@ 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); 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 X509_REQ_get_attr_by_OBJ(const X509_REQ *req, const ASN1_OBJECT *obj,
int lastpos) int lastpos)
{ {
return X509at_get_attr_by_OBJ(req->req_info.attributes, obj, lastpos); return X509at_get_attr_by_OBJ(req->req_info.attributes, obj, lastpos);

View File

@ -36,7 +36,7 @@ int X509v3_get_ext_by_NID(const STACK_OF(X509_EXTENSION) *x, int nid,
} }
int X509v3_get_ext_by_OBJ(const STACK_OF(X509_EXTENSION) *sk, int X509v3_get_ext_by_OBJ(const STACK_OF(X509_EXTENSION) *sk,
ASN1_OBJECT *obj, int lastpos) const ASN1_OBJECT *obj, int lastpos)
{ {
int n; int n;
X509_EXTENSION *ex; X509_EXTENSION *ex;
@ -151,7 +151,7 @@ X509_EXTENSION *X509_EXTENSION_create_by_NID(X509_EXTENSION **ex, int nid,
} }
X509_EXTENSION *X509_EXTENSION_create_by_OBJ(X509_EXTENSION **ex, X509_EXTENSION *X509_EXTENSION_create_by_OBJ(X509_EXTENSION **ex,
ASN1_OBJECT *obj, int crit, const ASN1_OBJECT *obj, int crit,
ASN1_OCTET_STRING *data) ASN1_OCTET_STRING *data)
{ {
X509_EXTENSION *ret; X509_EXTENSION *ret;
@ -181,7 +181,7 @@ X509_EXTENSION *X509_EXTENSION_create_by_OBJ(X509_EXTENSION **ex,
return (NULL); return (NULL);
} }
int X509_EXTENSION_set_object(X509_EXTENSION *ex, ASN1_OBJECT *obj) int X509_EXTENSION_set_object(X509_EXTENSION *ex, const ASN1_OBJECT *obj)
{ {
if ((ex == NULL) || (obj == NULL)) if ((ex == NULL) || (obj == NULL))
return (0); return (0);

View File

@ -26,7 +26,7 @@ int X509_NAME_get_text_by_NID(X509_NAME *name, int nid, char *buf, int len)
return (X509_NAME_get_text_by_OBJ(name, obj, buf, len)); return (X509_NAME_get_text_by_OBJ(name, obj, buf, len));
} }
int X509_NAME_get_text_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj, char *buf, int X509_NAME_get_text_by_OBJ(X509_NAME *name, const ASN1_OBJECT *obj, char *buf,
int len) int len)
{ {
int i; int i;
@ -62,7 +62,7 @@ int X509_NAME_get_index_by_NID(X509_NAME *name, int nid, int lastpos)
} }
/* NOTE: you should be passing -1, not 0 as lastpos */ /* NOTE: you should be passing -1, not 0 as lastpos */
int X509_NAME_get_index_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj, int lastpos) int X509_NAME_get_index_by_OBJ(X509_NAME *name, const ASN1_OBJECT *obj, int lastpos)
{ {
int n; int n;
X509_NAME_ENTRY *ne; X509_NAME_ENTRY *ne;

View File

@ -100,7 +100,7 @@ unsigned char *X509_keyid_get0(X509 *x, int *len)
return x->aux->keyid->data; return x->aux->keyid->data;
} }
int X509_add1_trust_object(X509 *x, ASN1_OBJECT *obj) int X509_add1_trust_object(X509 *x, const ASN1_OBJECT *obj)
{ {
X509_CERT_AUX *aux; X509_CERT_AUX *aux;
ASN1_OBJECT *objtmp = NULL; ASN1_OBJECT *objtmp = NULL;
@ -121,7 +121,7 @@ int X509_add1_trust_object(X509 *x, ASN1_OBJECT *obj)
return 0; return 0;
} }
int X509_add1_reject_object(X509 *x, ASN1_OBJECT *obj) int X509_add1_reject_object(X509 *x, const ASN1_OBJECT *obj)
{ {
X509_CERT_AUX *aux; X509_CERT_AUX *aux;
ASN1_OBJECT *objtmp; ASN1_OBJECT *objtmp;

View File

@ -10,7 +10,7 @@ functions
=head1 SYNOPSIS =head1 SYNOPSIS
int X509_EXTENSION_set_object(X509_EXTENSION *ex, ASN1_OBJECT *obj); int X509_EXTENSION_set_object(X509_EXTENSION *ex, const ASN1_OBJECT *obj);
int X509_EXTENSION_set_critical(X509_EXTENSION *ex, int crit); int X509_EXTENSION_set_critical(X509_EXTENSION *ex, int crit);
int X509_EXTENSION_set_data(X509_EXTENSION *ex, ASN1_OCTET_STRING *data); int X509_EXTENSION_set_data(X509_EXTENSION *ex, ASN1_OCTET_STRING *data);
@ -18,7 +18,7 @@ functions
int nid, int crit, int nid, int crit,
ASN1_OCTET_STRING *data); ASN1_OCTET_STRING *data);
X509_EXTENSION *X509_EXTENSION_create_by_OBJ(X509_EXTENSION **ex, X509_EXTENSION *X509_EXTENSION_create_by_OBJ(X509_EXTENSION **ex,
ASN1_OBJECT *obj, int crit, const ASN1_OBJECT *obj, int crit,
ASN1_OCTET_STRING *data); ASN1_OCTET_STRING *data);
ASN1_OBJECT *X509_EXTENSION_get_object(X509_EXTENSION *ex); ASN1_OBJECT *X509_EXTENSION_get_object(X509_EXTENSION *ex);

View File

@ -11,13 +11,13 @@ X509_NAME lookup and enumeration functions
#include <openssl/x509.h> #include <openssl/x509.h>
int X509_NAME_get_index_by_NID(X509_NAME *name, int nid, int lastpos); int X509_NAME_get_index_by_NID(X509_NAME *name, int nid, int lastpos);
int X509_NAME_get_index_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj, int lastpos); int X509_NAME_get_index_by_OBJ(X509_NAME *name, const ASN1_OBJECT *obj, int lastpos);
int X509_NAME_entry_count(const X509_NAME *name); int X509_NAME_entry_count(const X509_NAME *name);
X509_NAME_ENTRY *X509_NAME_get_entry(X509_NAME *name, int loc); X509_NAME_ENTRY *X509_NAME_get_entry(X509_NAME *name, int loc);
int X509_NAME_get_text_by_NID(X509_NAME *name, int nid, char *buf, int len); int X509_NAME_get_text_by_NID(X509_NAME *name, int nid, char *buf, int len);
int X509_NAME_get_text_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj, char *buf, int len); int X509_NAME_get_text_by_OBJ(X509_NAME *name, const ASN1_OBJECT *obj, char *buf, int len);
=head1 DESCRIPTION =head1 DESCRIPTION

View File

@ -23,7 +23,7 @@ X509_REVOKED_add_ext - extension stack utility functions
int X509v3_get_ext_by_NID(const STACK_OF(X509_EXTENSION) *x, int X509v3_get_ext_by_NID(const STACK_OF(X509_EXTENSION) *x,
int nid, int lastpos); int nid, int lastpos);
int X509v3_get_ext_by_OBJ(const STACK_OF(X509_EXTENSION) *x, int X509v3_get_ext_by_OBJ(const STACK_OF(X509_EXTENSION) *x,
ASN1_OBJECT *obj, int lastpos); const ASN1_OBJECT *obj, int lastpos);
int X509v3_get_ext_by_critical(const STACK_OF(X509_EXTENSION) *x, int X509v3_get_ext_by_critical(const STACK_OF(X509_EXTENSION) *x,
int crit, int lastpos); int crit, int lastpos);
X509_EXTENSION *X509v3_delete_ext(STACK_OF(X509_EXTENSION) *x, int loc); X509_EXTENSION *X509v3_delete_ext(STACK_OF(X509_EXTENSION) *x, int loc);
@ -33,7 +33,7 @@ X509_REVOKED_add_ext - extension stack utility functions
int X509_get_ext_count(const X509 *x); int X509_get_ext_count(const X509 *x);
X509_EXTENSION *X509_get_ext(const X509 *x, int loc); X509_EXTENSION *X509_get_ext(const X509 *x, int loc);
int X509_get_ext_by_NID(const X509 *x, int nid, int lastpos); int X509_get_ext_by_NID(const X509 *x, int nid, int lastpos);
int X509_get_ext_by_OBJ(const X509 *x, ASN1_OBJECT *obj, int lastpos); int X509_get_ext_by_OBJ(const X509 *x, const ASN1_OBJECT *obj, int lastpos);
int X509_get_ext_by_critical(const X509 *x, int crit, int lastpos); int X509_get_ext_by_critical(const X509 *x, int crit, int lastpos);
X509_EXTENSION *X509_delete_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); int X509_add_ext(X509 *x, X509_EXTENSION *ex, int loc);
@ -41,7 +41,7 @@ X509_REVOKED_add_ext - extension stack utility functions
int X509_CRL_get_ext_count(const X509_CRL *x); int X509_CRL_get_ext_count(const X509_CRL *x);
X509_EXTENSION *X509_CRL_get_ext(const X509_CRL *x, int loc); X509_EXTENSION *X509_CRL_get_ext(const X509_CRL *x, int loc);
int X509_CRL_get_ext_by_NID(const X509_CRL *x, int nid, int lastpos); int X509_CRL_get_ext_by_NID(const X509_CRL *x, int nid, int lastpos);
int X509_CRL_get_ext_by_OBJ(const X509_CRL *x, ASN1_OBJECT *obj, int lastpos); int X509_CRL_get_ext_by_OBJ(const X509_CRL *x, const ASN1_OBJECT *obj, int lastpos);
int X509_CRL_get_ext_by_critical(const X509_CRL *x, int crit, int lastpos); int X509_CRL_get_ext_by_critical(const X509_CRL *x, int crit, int lastpos);
X509_EXTENSION *X509_CRL_delete_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); int X509_CRL_add_ext(X509_CRL *x, X509_EXTENSION *ex, int loc);
@ -49,7 +49,7 @@ X509_REVOKED_add_ext - extension stack utility functions
int X509_REVOKED_get_ext_count(const X509_REVOKED *x); int X509_REVOKED_get_ext_count(const X509_REVOKED *x);
X509_EXTENSION *X509_REVOKED_get_ext(const X509_REVOKED *x, int loc); X509_EXTENSION *X509_REVOKED_get_ext(const X509_REVOKED *x, int loc);
int X509_REVOKED_get_ext_by_NID(const X509_REVOKED *x, int nid, int lastpos); int X509_REVOKED_get_ext_by_NID(const X509_REVOKED *x, int nid, int lastpos);
int X509_REVOKED_get_ext_by_OBJ(const X509_REVOKED *x, ASN1_OBJECT *obj, int X509_REVOKED_get_ext_by_OBJ(const X509_REVOKED *x, const ASN1_OBJECT *obj,
int lastpos); int lastpos);
int X509_REVOKED_get_ext_by_critical(const X509_REVOKED *x, int crit, int lastpos); int X509_REVOKED_get_ext_by_critical(const X509_REVOKED *x, int crit, int lastpos);
X509_EXTENSION *X509_REVOKED_delete_ext(X509_REVOKED *x, int loc); X509_EXTENSION *X509_REVOKED_delete_ext(X509_REVOKED *x, int loc);

View File

@ -32,7 +32,7 @@ Some of the newer functions follow a naming convention using the numbers
B<0> and B<1>. For example the functions: B<0> and B<1>. For example the functions:
int X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev); int X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev);
int X509_add1_trust_object(X509 *x, ASN1_OBJECT *obj); int X509_add1_trust_object(X509 *x, const ASN1_OBJECT *obj);
The B<0> version uses the supplied structure pointer directly The B<0> version uses the supplied structure pointer directly
in the parent and it will be freed up when the parent is freed. in the parent and it will be freed up when the parent is freed.

View File

@ -246,7 +246,7 @@ int CMS_add_standard_smimecap(STACK_OF(X509_ALGOR) **smcap);
int CMS_signed_get_attr_count(const CMS_SignerInfo *si); int CMS_signed_get_attr_count(const CMS_SignerInfo *si);
int CMS_signed_get_attr_by_NID(const CMS_SignerInfo *si, int nid, int CMS_signed_get_attr_by_NID(const CMS_SignerInfo *si, int nid,
int lastpos); int lastpos);
int CMS_signed_get_attr_by_OBJ(const CMS_SignerInfo *si, ASN1_OBJECT *obj, int CMS_signed_get_attr_by_OBJ(const CMS_SignerInfo *si, const ASN1_OBJECT *obj,
int lastpos); int lastpos);
X509_ATTRIBUTE *CMS_signed_get_attr(const CMS_SignerInfo *si, int loc); X509_ATTRIBUTE *CMS_signed_get_attr(const CMS_SignerInfo *si, int loc);
X509_ATTRIBUTE *CMS_signed_delete_attr(CMS_SignerInfo *si, int loc); X509_ATTRIBUTE *CMS_signed_delete_attr(CMS_SignerInfo *si, int loc);
@ -260,14 +260,14 @@ int CMS_signed_add1_attr_by_NID(CMS_SignerInfo *si,
int CMS_signed_add1_attr_by_txt(CMS_SignerInfo *si, int CMS_signed_add1_attr_by_txt(CMS_SignerInfo *si,
const char *attrname, int type, const char *attrname, int type,
const void *bytes, int len); const void *bytes, int len);
void *CMS_signed_get0_data_by_OBJ(CMS_SignerInfo *si, ASN1_OBJECT *oid, void *CMS_signed_get0_data_by_OBJ(CMS_SignerInfo *si, const ASN1_OBJECT *oid,
int lastpos, int type); int lastpos, int type);
int CMS_unsigned_get_attr_count(const CMS_SignerInfo *si); int CMS_unsigned_get_attr_count(const CMS_SignerInfo *si);
int CMS_unsigned_get_attr_by_NID(const CMS_SignerInfo *si, int nid, int CMS_unsigned_get_attr_by_NID(const CMS_SignerInfo *si, int nid,
int lastpos); int lastpos);
int CMS_unsigned_get_attr_by_OBJ(const CMS_SignerInfo *si, ASN1_OBJECT *obj, int CMS_unsigned_get_attr_by_OBJ(const CMS_SignerInfo *si,
int lastpos); const ASN1_OBJECT *obj, int lastpos);
X509_ATTRIBUTE *CMS_unsigned_get_attr(const CMS_SignerInfo *si, int loc); X509_ATTRIBUTE *CMS_unsigned_get_attr(const CMS_SignerInfo *si, int loc);
X509_ATTRIBUTE *CMS_unsigned_delete_attr(CMS_SignerInfo *si, int loc); X509_ATTRIBUTE *CMS_unsigned_delete_attr(CMS_SignerInfo *si, int loc);
int CMS_unsigned_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr); int CMS_unsigned_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr);

View File

@ -269,7 +269,7 @@ X509_EXTENSION *OCSP_url_svcloc_new(X509_NAME *issuer, char **urls);
int OCSP_REQUEST_get_ext_count(OCSP_REQUEST *x); int OCSP_REQUEST_get_ext_count(OCSP_REQUEST *x);
int OCSP_REQUEST_get_ext_by_NID(OCSP_REQUEST *x, int nid, int lastpos); int OCSP_REQUEST_get_ext_by_NID(OCSP_REQUEST *x, int nid, int lastpos);
int OCSP_REQUEST_get_ext_by_OBJ(OCSP_REQUEST *x, ASN1_OBJECT *obj, int OCSP_REQUEST_get_ext_by_OBJ(OCSP_REQUEST *x, const ASN1_OBJECT *obj,
int lastpos); int lastpos);
int OCSP_REQUEST_get_ext_by_critical(OCSP_REQUEST *x, int crit, int lastpos); int OCSP_REQUEST_get_ext_by_critical(OCSP_REQUEST *x, int crit, int lastpos);
X509_EXTENSION *OCSP_REQUEST_get_ext(OCSP_REQUEST *x, int loc); X509_EXTENSION *OCSP_REQUEST_get_ext(OCSP_REQUEST *x, int loc);
@ -282,7 +282,7 @@ int OCSP_REQUEST_add_ext(OCSP_REQUEST *x, X509_EXTENSION *ex, int loc);
int OCSP_ONEREQ_get_ext_count(OCSP_ONEREQ *x); int OCSP_ONEREQ_get_ext_count(OCSP_ONEREQ *x);
int OCSP_ONEREQ_get_ext_by_NID(OCSP_ONEREQ *x, int nid, int lastpos); int OCSP_ONEREQ_get_ext_by_NID(OCSP_ONEREQ *x, int nid, int lastpos);
int OCSP_ONEREQ_get_ext_by_OBJ(OCSP_ONEREQ *x, ASN1_OBJECT *obj, int lastpos); int OCSP_ONEREQ_get_ext_by_OBJ(OCSP_ONEREQ *x, const ASN1_OBJECT *obj, int lastpos);
int OCSP_ONEREQ_get_ext_by_critical(OCSP_ONEREQ *x, int crit, int lastpos); int OCSP_ONEREQ_get_ext_by_critical(OCSP_ONEREQ *x, int crit, int lastpos);
X509_EXTENSION *OCSP_ONEREQ_get_ext(OCSP_ONEREQ *x, int loc); X509_EXTENSION *OCSP_ONEREQ_get_ext(OCSP_ONEREQ *x, int loc);
X509_EXTENSION *OCSP_ONEREQ_delete_ext(OCSP_ONEREQ *x, int loc); X509_EXTENSION *OCSP_ONEREQ_delete_ext(OCSP_ONEREQ *x, int loc);
@ -293,7 +293,7 @@ int OCSP_ONEREQ_add_ext(OCSP_ONEREQ *x, X509_EXTENSION *ex, int loc);
int OCSP_BASICRESP_get_ext_count(OCSP_BASICRESP *x); int OCSP_BASICRESP_get_ext_count(OCSP_BASICRESP *x);
int OCSP_BASICRESP_get_ext_by_NID(OCSP_BASICRESP *x, int nid, int lastpos); int OCSP_BASICRESP_get_ext_by_NID(OCSP_BASICRESP *x, int nid, int lastpos);
int OCSP_BASICRESP_get_ext_by_OBJ(OCSP_BASICRESP *x, ASN1_OBJECT *obj, int OCSP_BASICRESP_get_ext_by_OBJ(OCSP_BASICRESP *x, const ASN1_OBJECT *obj,
int lastpos); int lastpos);
int OCSP_BASICRESP_get_ext_by_critical(OCSP_BASICRESP *x, int crit, int OCSP_BASICRESP_get_ext_by_critical(OCSP_BASICRESP *x, int crit,
int lastpos); int lastpos);
@ -307,7 +307,7 @@ int OCSP_BASICRESP_add_ext(OCSP_BASICRESP *x, X509_EXTENSION *ex, int loc);
int OCSP_SINGLERESP_get_ext_count(OCSP_SINGLERESP *x); int OCSP_SINGLERESP_get_ext_count(OCSP_SINGLERESP *x);
int OCSP_SINGLERESP_get_ext_by_NID(OCSP_SINGLERESP *x, int nid, int lastpos); int OCSP_SINGLERESP_get_ext_by_NID(OCSP_SINGLERESP *x, int nid, int lastpos);
int OCSP_SINGLERESP_get_ext_by_OBJ(OCSP_SINGLERESP *x, ASN1_OBJECT *obj, int OCSP_SINGLERESP_get_ext_by_OBJ(OCSP_SINGLERESP *x, const ASN1_OBJECT *obj,
int lastpos); int lastpos);
int OCSP_SINGLERESP_get_ext_by_critical(OCSP_SINGLERESP *x, int crit, int OCSP_SINGLERESP_get_ext_by_critical(OCSP_SINGLERESP *x, int crit,
int lastpos); int lastpos);

View File

@ -175,7 +175,7 @@ X509_ALGOR *TS_MSG_IMPRINT_get_algo(TS_MSG_IMPRINT *a);
int TS_MSG_IMPRINT_set_msg(TS_MSG_IMPRINT *a, unsigned char *d, int len); int TS_MSG_IMPRINT_set_msg(TS_MSG_IMPRINT *a, unsigned char *d, int len);
ASN1_OCTET_STRING *TS_MSG_IMPRINT_get_msg(TS_MSG_IMPRINT *a); ASN1_OCTET_STRING *TS_MSG_IMPRINT_get_msg(TS_MSG_IMPRINT *a);
int TS_REQ_set_policy_id(TS_REQ *a, ASN1_OBJECT *policy); int TS_REQ_set_policy_id(TS_REQ *a, const ASN1_OBJECT *policy);
ASN1_OBJECT *TS_REQ_get_policy_id(TS_REQ *a); ASN1_OBJECT *TS_REQ_get_policy_id(TS_REQ *a);
int TS_REQ_set_nonce(TS_REQ *a, const ASN1_INTEGER *nonce); int TS_REQ_set_nonce(TS_REQ *a, const ASN1_INTEGER *nonce);
@ -188,7 +188,7 @@ STACK_OF(X509_EXTENSION) *TS_REQ_get_exts(TS_REQ *a);
void TS_REQ_ext_free(TS_REQ *a); void TS_REQ_ext_free(TS_REQ *a);
int TS_REQ_get_ext_count(TS_REQ *a); int TS_REQ_get_ext_count(TS_REQ *a);
int TS_REQ_get_ext_by_NID(TS_REQ *a, int nid, int lastpos); int TS_REQ_get_ext_by_NID(TS_REQ *a, int nid, int lastpos);
int TS_REQ_get_ext_by_OBJ(TS_REQ *a, ASN1_OBJECT *obj, int lastpos); int TS_REQ_get_ext_by_OBJ(TS_REQ *a, const ASN1_OBJECT *obj, int lastpos);
int TS_REQ_get_ext_by_critical(TS_REQ *a, int crit, int lastpos); int TS_REQ_get_ext_by_critical(TS_REQ *a, int crit, int lastpos);
X509_EXTENSION *TS_REQ_get_ext(TS_REQ *a, int loc); X509_EXTENSION *TS_REQ_get_ext(TS_REQ *a, int loc);
X509_EXTENSION *TS_REQ_delete_ext(TS_REQ *a, int loc); X509_EXTENSION *TS_REQ_delete_ext(TS_REQ *a, int loc);
@ -249,7 +249,8 @@ STACK_OF(X509_EXTENSION) *TS_TST_INFO_get_exts(TS_TST_INFO *a);
void TS_TST_INFO_ext_free(TS_TST_INFO *a); void TS_TST_INFO_ext_free(TS_TST_INFO *a);
int TS_TST_INFO_get_ext_count(TS_TST_INFO *a); int TS_TST_INFO_get_ext_count(TS_TST_INFO *a);
int TS_TST_INFO_get_ext_by_NID(TS_TST_INFO *a, int nid, int lastpos); int TS_TST_INFO_get_ext_by_NID(TS_TST_INFO *a, int nid, int lastpos);
int TS_TST_INFO_get_ext_by_OBJ(TS_TST_INFO *a, ASN1_OBJECT *obj, int lastpos); int TS_TST_INFO_get_ext_by_OBJ(TS_TST_INFO *a, const ASN1_OBJECT *obj,
int lastpos);
int TS_TST_INFO_get_ext_by_critical(TS_TST_INFO *a, int crit, int lastpos); int TS_TST_INFO_get_ext_by_critical(TS_TST_INFO *a, int crit, int lastpos);
X509_EXTENSION *TS_TST_INFO_get_ext(TS_TST_INFO *a, int loc); X509_EXTENSION *TS_TST_INFO_get_ext(TS_TST_INFO *a, int loc);
X509_EXTENSION *TS_TST_INFO_delete_ext(TS_TST_INFO *a, int loc); X509_EXTENSION *TS_TST_INFO_delete_ext(TS_TST_INFO *a, int loc);
@ -315,7 +316,7 @@ int TS_RESP_CTX_set_signer_digest(TS_RESP_CTX *ctx,
const EVP_MD *signer_digest); const EVP_MD *signer_digest);
/* This parameter must be set. */ /* This parameter must be set. */
int TS_RESP_CTX_set_def_policy(TS_RESP_CTX *ctx, ASN1_OBJECT *def_policy); int TS_RESP_CTX_set_def_policy(TS_RESP_CTX *ctx, const ASN1_OBJECT *def_policy);
/* No additional certs are included in the response by default. */ /* No additional certs are included in the response by default. */
int TS_RESP_CTX_set_certs(TS_RESP_CTX *ctx, STACK_OF(X509) *certs); int TS_RESP_CTX_set_certs(TS_RESP_CTX *ctx, STACK_OF(X509) *certs);
@ -324,7 +325,7 @@ int TS_RESP_CTX_set_certs(TS_RESP_CTX *ctx, STACK_OF(X509) *certs);
* Adds a new acceptable policy, only the default policy is accepted by * Adds a new acceptable policy, only the default policy is accepted by
* default. * default.
*/ */
int TS_RESP_CTX_add_policy(TS_RESP_CTX *ctx, ASN1_OBJECT *policy); int TS_RESP_CTX_add_policy(TS_RESP_CTX *ctx, const ASN1_OBJECT *policy);
/* /*
* Adds a new acceptable message digest. Note that no message digests are * Adds a new acceptable message digest. Note that no message digests are

View File

@ -558,8 +558,8 @@ unsigned char *X509_keyid_get0(X509 *x, int *len);
int (*X509_TRUST_set_default(int (*trust) (int, X509 *, int))) (int, X509 *, int (*X509_TRUST_set_default(int (*trust) (int, X509 *, int))) (int, X509 *,
int); int);
int X509_TRUST_set(int *t, int trust); int X509_TRUST_set(int *t, int trust);
int X509_add1_trust_object(X509 *x, ASN1_OBJECT *obj); int X509_add1_trust_object(X509 *x, const ASN1_OBJECT *obj);
int X509_add1_reject_object(X509 *x, ASN1_OBJECT *obj); int X509_add1_reject_object(X509 *x, const ASN1_OBJECT *obj);
void X509_trust_clear(X509 *x); void X509_trust_clear(X509 *x);
void X509_reject_clear(X509 *x); void X509_reject_clear(X509 *x);
@ -659,7 +659,7 @@ int X509_REQ_add_extensions_nid(X509_REQ *req, STACK_OF(X509_EXTENSION) *exts,
int X509_REQ_add_extensions(X509_REQ *req, STACK_OF(X509_EXTENSION) *exts); int X509_REQ_add_extensions(X509_REQ *req, STACK_OF(X509_EXTENSION) *exts);
int X509_REQ_get_attr_count(const X509_REQ *req); 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_NID(const X509_REQ *req, int nid, int lastpos);
int X509_REQ_get_attr_by_OBJ(const X509_REQ *req, ASN1_OBJECT *obj, int X509_REQ_get_attr_by_OBJ(const X509_REQ *req, const ASN1_OBJECT *obj,
int lastpos); int lastpos);
X509_ATTRIBUTE *X509_REQ_get_attr(const X509_REQ *req, int loc); X509_ATTRIBUTE *X509_REQ_get_attr(const X509_REQ *req, int loc);
X509_ATTRIBUTE *X509_REQ_delete_attr(X509_REQ *req, int loc); X509_ATTRIBUTE *X509_REQ_delete_attr(X509_REQ *req, int loc);
@ -756,7 +756,7 @@ int X509_REQ_print(BIO *bp, X509_REQ *req);
int X509_NAME_entry_count(const X509_NAME *name); int X509_NAME_entry_count(const X509_NAME *name);
int X509_NAME_get_text_by_NID(X509_NAME *name, int nid, char *buf, int len); int X509_NAME_get_text_by_NID(X509_NAME *name, int nid, char *buf, int len);
int X509_NAME_get_text_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj, int X509_NAME_get_text_by_OBJ(X509_NAME *name, const ASN1_OBJECT *obj,
char *buf, int len); char *buf, int len);
/* /*
@ -764,7 +764,7 @@ int X509_NAME_get_text_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj,
* lastpos, search after that position on. * lastpos, search after that position on.
*/ */
int X509_NAME_get_index_by_NID(X509_NAME *name, int nid, int lastpos); int X509_NAME_get_index_by_NID(X509_NAME *name, int nid, int lastpos);
int X509_NAME_get_index_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj, int X509_NAME_get_index_by_OBJ(X509_NAME *name, const ASN1_OBJECT *obj,
int lastpos); int lastpos);
X509_NAME_ENTRY *X509_NAME_get_entry(X509_NAME *name, int loc); X509_NAME_ENTRY *X509_NAME_get_entry(X509_NAME *name, int loc);
X509_NAME_ENTRY *X509_NAME_delete_entry(X509_NAME *name, int loc); X509_NAME_ENTRY *X509_NAME_delete_entry(X509_NAME *name, int loc);
@ -805,7 +805,7 @@ int X509v3_get_ext_count(const STACK_OF(X509_EXTENSION) *x);
int X509v3_get_ext_by_NID(const STACK_OF(X509_EXTENSION) *x, int X509v3_get_ext_by_NID(const STACK_OF(X509_EXTENSION) *x,
int nid, int lastpos); int nid, int lastpos);
int X509v3_get_ext_by_OBJ(const STACK_OF(X509_EXTENSION) *x, int X509v3_get_ext_by_OBJ(const STACK_OF(X509_EXTENSION) *x,
ASN1_OBJECT *obj, int lastpos); const ASN1_OBJECT *obj, int lastpos);
int X509v3_get_ext_by_critical(const STACK_OF(X509_EXTENSION) *x, int X509v3_get_ext_by_critical(const STACK_OF(X509_EXTENSION) *x,
int crit, int lastpos); int crit, int lastpos);
X509_EXTENSION *X509v3_get_ext(const STACK_OF(X509_EXTENSION) *x, int loc); X509_EXTENSION *X509v3_get_ext(const STACK_OF(X509_EXTENSION) *x, int loc);
@ -815,7 +815,7 @@ STACK_OF(X509_EXTENSION) *X509v3_add_ext(STACK_OF(X509_EXTENSION) **x,
int X509_get_ext_count(const X509 *x); int X509_get_ext_count(const X509 *x);
int X509_get_ext_by_NID(const X509 *x, int nid, int lastpos); int X509_get_ext_by_NID(const X509 *x, int nid, int lastpos);
int X509_get_ext_by_OBJ(const X509 *x, ASN1_OBJECT *obj, int lastpos); int X509_get_ext_by_OBJ(const X509 *x, const ASN1_OBJECT *obj, int lastpos);
int X509_get_ext_by_critical(const X509 *x, int crit, int lastpos); int X509_get_ext_by_critical(const X509 *x, int crit, int lastpos);
X509_EXTENSION *X509_get_ext(const X509 *x, int loc); X509_EXTENSION *X509_get_ext(const X509 *x, int loc);
X509_EXTENSION *X509_delete_ext(X509 *x, int loc); X509_EXTENSION *X509_delete_ext(X509 *x, int loc);
@ -826,7 +826,8 @@ int X509_add1_ext_i2d(X509 *x, int nid, void *value, int crit,
int X509_CRL_get_ext_count(const X509_CRL *x); int X509_CRL_get_ext_count(const X509_CRL *x);
int X509_CRL_get_ext_by_NID(const X509_CRL *x, int nid, int lastpos); int X509_CRL_get_ext_by_NID(const X509_CRL *x, int nid, int lastpos);
int X509_CRL_get_ext_by_OBJ(const X509_CRL *x, ASN1_OBJECT *obj, int lastpos); int X509_CRL_get_ext_by_OBJ(const X509_CRL *x, const ASN1_OBJECT *obj,
int lastpos);
int X509_CRL_get_ext_by_critical(const X509_CRL *x, int crit, int lastpos); int X509_CRL_get_ext_by_critical(const X509_CRL *x, int crit, int lastpos);
X509_EXTENSION *X509_CRL_get_ext(const X509_CRL *x, int loc); X509_EXTENSION *X509_CRL_get_ext(const X509_CRL *x, int loc);
X509_EXTENSION *X509_CRL_delete_ext(X509_CRL *x, int loc); X509_EXTENSION *X509_CRL_delete_ext(X509_CRL *x, int loc);
@ -837,13 +838,15 @@ int X509_CRL_add1_ext_i2d(X509_CRL *x, int nid, void *value, int crit,
int X509_REVOKED_get_ext_count(const X509_REVOKED *x); int X509_REVOKED_get_ext_count(const X509_REVOKED *x);
int X509_REVOKED_get_ext_by_NID(const X509_REVOKED *x, int nid, int lastpos); int X509_REVOKED_get_ext_by_NID(const X509_REVOKED *x, int nid, int lastpos);
int X509_REVOKED_get_ext_by_OBJ(const X509_REVOKED *x, ASN1_OBJECT *obj, int X509_REVOKED_get_ext_by_OBJ(const X509_REVOKED *x, const ASN1_OBJECT *obj,
int lastpos);
int X509_REVOKED_get_ext_by_critical(const X509_REVOKED *x, int crit,
int lastpos); int lastpos);
int X509_REVOKED_get_ext_by_critical(const X509_REVOKED *x, int crit, int lastpos);
X509_EXTENSION *X509_REVOKED_get_ext(const X509_REVOKED *x, int loc); X509_EXTENSION *X509_REVOKED_get_ext(const X509_REVOKED *x, int loc);
X509_EXTENSION *X509_REVOKED_delete_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); int X509_REVOKED_add_ext(X509_REVOKED *x, X509_EXTENSION *ex, int loc);
void *X509_REVOKED_get_ext_d2i(const X509_REVOKED *x, int nid, int *crit, int *idx); void *X509_REVOKED_get_ext_d2i(const X509_REVOKED *x, int nid, int *crit,
int *idx);
int X509_REVOKED_add1_ext_i2d(X509_REVOKED *x, int nid, void *value, int crit, int X509_REVOKED_add1_ext_i2d(X509_REVOKED *x, int nid, void *value, int crit,
unsigned long flags); unsigned long flags);
@ -851,9 +854,9 @@ X509_EXTENSION *X509_EXTENSION_create_by_NID(X509_EXTENSION **ex,
int nid, int crit, int nid, int crit,
ASN1_OCTET_STRING *data); ASN1_OCTET_STRING *data);
X509_EXTENSION *X509_EXTENSION_create_by_OBJ(X509_EXTENSION **ex, X509_EXTENSION *X509_EXTENSION_create_by_OBJ(X509_EXTENSION **ex,
ASN1_OBJECT *obj, int crit, const ASN1_OBJECT *obj, int crit,
ASN1_OCTET_STRING *data); ASN1_OCTET_STRING *data);
int X509_EXTENSION_set_object(X509_EXTENSION *ex, ASN1_OBJECT *obj); int X509_EXTENSION_set_object(X509_EXTENSION *ex, const ASN1_OBJECT *obj);
int X509_EXTENSION_set_critical(X509_EXTENSION *ex, int crit); int X509_EXTENSION_set_critical(X509_EXTENSION *ex, int crit);
int X509_EXTENSION_set_data(X509_EXTENSION *ex, ASN1_OCTET_STRING *data); int X509_EXTENSION_set_data(X509_EXTENSION *ex, ASN1_OCTET_STRING *data);
ASN1_OBJECT *X509_EXTENSION_get_object(X509_EXTENSION *ex); ASN1_OBJECT *X509_EXTENSION_get_object(X509_EXTENSION *ex);
@ -864,7 +867,7 @@ int X509at_get_attr_count(const STACK_OF(X509_ATTRIBUTE) *x);
int X509at_get_attr_by_NID(const STACK_OF(X509_ATTRIBUTE) *x, int nid, int X509at_get_attr_by_NID(const STACK_OF(X509_ATTRIBUTE) *x, int nid,
int lastpos); int lastpos);
int X509at_get_attr_by_OBJ(const STACK_OF(X509_ATTRIBUTE) *sk, int X509at_get_attr_by_OBJ(const STACK_OF(X509_ATTRIBUTE) *sk,
ASN1_OBJECT *obj, int lastpos); const ASN1_OBJECT *obj, int lastpos);
X509_ATTRIBUTE *X509at_get_attr(const STACK_OF(X509_ATTRIBUTE) *x, int loc); 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); X509_ATTRIBUTE *X509at_delete_attr(STACK_OF(X509_ATTRIBUTE) *x, int loc);
STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr(STACK_OF(X509_ATTRIBUTE) **x, STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr(STACK_OF(X509_ATTRIBUTE) **x,
@ -883,8 +886,8 @@ STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_txt(STACK_OF(X509_ATTRIBUTE)
int type, int type,
const unsigned char *bytes, const unsigned char *bytes,
int len); int len);
void *X509at_get0_data_by_OBJ(STACK_OF(X509_ATTRIBUTE) *x, ASN1_OBJECT *obj, void *X509at_get0_data_by_OBJ(STACK_OF(X509_ATTRIBUTE) *x,
int lastpos, int type); const ASN1_OBJECT *obj, int lastpos, int type);
X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_NID(X509_ATTRIBUTE **attr, int nid, X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_NID(X509_ATTRIBUTE **attr, int nid,
int atrtype, const void *data, int atrtype, const void *data,
int len); int len);
@ -907,7 +910,7 @@ ASN1_TYPE *X509_ATTRIBUTE_get0_type(X509_ATTRIBUTE *attr, int idx);
int EVP_PKEY_get_attr_count(const EVP_PKEY *key); int EVP_PKEY_get_attr_count(const EVP_PKEY *key);
int EVP_PKEY_get_attr_by_NID(const EVP_PKEY *key, int nid, int lastpos); int EVP_PKEY_get_attr_by_NID(const EVP_PKEY *key, int nid, int lastpos);
int EVP_PKEY_get_attr_by_OBJ(const EVP_PKEY *key, ASN1_OBJECT *obj, int EVP_PKEY_get_attr_by_OBJ(const EVP_PKEY *key, const ASN1_OBJECT *obj,
int lastpos); int lastpos);
X509_ATTRIBUTE *EVP_PKEY_get_attr(const EVP_PKEY *key, int loc); X509_ATTRIBUTE *EVP_PKEY_get_attr(const EVP_PKEY *key, int loc);
X509_ATTRIBUTE *EVP_PKEY_delete_attr(EVP_PKEY *key, int loc); X509_ATTRIBUTE *EVP_PKEY_delete_attr(EVP_PKEY *key, int loc);