int (*cert_crl)(X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x);
/* Check policy status of the chain */
int (*check_policy)(X509_STORE_CTX *ctx);
- STACK_OF(X509) *(*lookup_certs)(X509_STORE_CTX *ctx,
+ STACK_OF(X509) *(*lookup_certs)(const X509_STORE_CTX *ctx,
const X509_NAME *nm);
- /* cannot constify 'ctx' param due to lookup_certs_sk() in x509_vfy.c */
STACK_OF(X509_CRL) *(*lookup_crls)(const X509_STORE_CTX *ctx,
const X509_NAME *nm);
int (*cleanup)(X509_STORE_CTX *ctx);
* Collect from |ctx->store| all certs with subject matching |nm|.
* Returns NULL on internal/fatal error, empty stack if not found.
*/
-STACK_OF(X509) *X509_STORE_CTX_get1_certs(X509_STORE_CTX *ctx,
+STACK_OF(X509) *X509_STORE_CTX_get1_certs(const X509_STORE_CTX *ctx,
const X509_NAME *nm)
{
int i, idx = -1, cnt = 0;
* Alternative lookup method: look from a STACK stored in other_ctx.
* Returns NULL on internal/fatal error, empty stack if not found.
*/
-static STACK_OF(X509) *lookup_certs_sk(X509_STORE_CTX *ctx, const X509_NAME *nm)
+static STACK_OF(X509) *lookup_certs_sk(const X509_STORE_CTX *ctx, const X509_NAME *nm)
{
STACK_OF(X509) *sk = sk_X509_new_null();
X509 *x;
if (X509_NAME_cmp(nm, X509_get_subject_name(x)) == 0) {
if (!X509_add_cert(sk, x, X509_ADD_FLAG_UP_REF)) {
OSSL_STACK_OF_X509_free(sk);
- ctx->error = X509_V_ERR_OUT_OF_MEM;
return NULL;
}
}
int (*cert_crl)(X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x);
/* Check policy status of the chain */
int (*check_policy)(X509_STORE_CTX *ctx);
- STACK_OF(X509) *(*lookup_certs)(X509_STORE_CTX *ctx,
+ STACK_OF(X509) *(*lookup_certs)(const X509_STORE_CTX *ctx,
const X509_NAME *nm);
/* cannot constify 'ctx' param due to lookup_certs_sk() in x509_vfy.c */
STACK_OF(X509_CRL) *(*lookup_crls)(const X509_STORE_CTX *ctx,
X509_CRL *crl, X509 *x);
typedef int (*X509_STORE_CTX_check_policy_fn)(X509_STORE_CTX *ctx);
typedef STACK_OF(X509)
- *(*X509_STORE_CTX_lookup_certs_fn)(X509_STORE_CTX *ctx,
+ *(*X509_STORE_CTX_lookup_certs_fn)(const X509_STORE_CTX *ctx,
const X509_NAME *nm);
typedef STACK_OF(X509_CRL)
*(*X509_STORE_CTX_lookup_crls_fn)(const X509_STORE_CTX *ctx,
#endif
STACK_OF(X509_OBJECT) *X509_STORE_get1_objects(X509_STORE *xs);
STACK_OF(X509) *X509_STORE_get1_all_certs(X509_STORE *xs);
-STACK_OF(X509) *X509_STORE_CTX_get1_certs(X509_STORE_CTX *xs,
+STACK_OF(X509) *X509_STORE_CTX_get1_certs(const X509_STORE_CTX *xs,
const X509_NAME *nm);
STACK_OF(X509_CRL) *X509_STORE_CTX_get1_crls(const X509_STORE_CTX *st,
const X509_NAME *nm);