Rename X509_STORE ptr stored in opaque struct X509_STORE_CTX

Change name from 'ctx' to 'store' to remove ctx->ctx from code.

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9405)
This commit is contained in:
Shane Lontis 2019-07-31 20:56:34 +10:00
parent e870791a4d
commit faa9dcd4d4
3 changed files with 8 additions and 8 deletions

View file

@ -197,7 +197,7 @@ struct x509_st {
* kept and passed around.
*/
struct x509_store_ctx_st { /* X509_STORE_CTX */
X509_STORE *ctx;
X509_STORE *store;
/* The following are set by the caller */
/* The cert to check */
X509 *cert;

View file

@ -289,7 +289,7 @@ X509_OBJECT *X509_STORE_CTX_get_obj_by_subject(X509_STORE_CTX *vs,
int X509_STORE_CTX_get_by_subject(X509_STORE_CTX *vs, X509_LOOKUP_TYPE type,
X509_NAME *name, X509_OBJECT *ret)
{
X509_STORE *store = vs->ctx;
X509_STORE *store = vs->store;
X509_LOOKUP *lu;
X509_OBJECT stmp, *tmp;
int i, j;
@ -533,7 +533,7 @@ STACK_OF(X509) *X509_STORE_CTX_get1_certs(X509_STORE_CTX *ctx, X509_NAME *nm)
STACK_OF(X509) *sk = NULL;
X509 *x;
X509_OBJECT *obj;
X509_STORE *store = ctx->ctx;
X509_STORE *store = ctx->store;
if (store == NULL)
return NULL;
@ -586,7 +586,7 @@ STACK_OF(X509_CRL) *X509_STORE_CTX_get1_crls(X509_STORE_CTX *ctx, X509_NAME *nm)
STACK_OF(X509_CRL) *sk = sk_X509_CRL_new_null();
X509_CRL *x;
X509_OBJECT *obj, *xobj = X509_OBJECT_new();
X509_STORE *store = ctx->ctx;
X509_STORE *store = ctx->store;
/* Always do lookup to possibly add new CRLs to cache */
if (sk == NULL
@ -665,7 +665,7 @@ int X509_STORE_CTX_get1_issuer(X509 **issuer, X509_STORE_CTX *ctx, X509 *x)
{
X509_NAME *xn;
X509_OBJECT *obj = X509_OBJECT_new(), *pobj = NULL;
X509_STORE *store = ctx->ctx;
X509_STORE *store = ctx->store;
int i, ok, idx, ret;
if (obj == NULL)
@ -900,5 +900,5 @@ void *X509_STORE_get_ex_data(X509_STORE *ctx, int idx)
X509_STORE *X509_STORE_CTX_get0_store(X509_STORE_CTX *ctx)
{
return ctx->ctx;
return ctx->store;
}

View file

@ -1276,7 +1276,7 @@ static int check_crl_path(X509_STORE_CTX *ctx, X509 *x)
/* Don't allow recursive CRL path validation */
if (ctx->parent)
return 0;
if (!X509_STORE_CTX_init(&crl_ctx, ctx->ctx, x, ctx->untrusted))
if (!X509_STORE_CTX_init(&crl_ctx, ctx->store, x, ctx->untrusted))
return -1;
crl_ctx.crls = ctx->crls;
@ -2201,7 +2201,7 @@ int X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, X509 *x509,
{
int ret = 1;
ctx->ctx = store;
ctx->store = store;
ctx->cert = x509;
ctx->untrusted = chain;
ctx->crls = NULL;