diff options
author | tb <> | 2021-11-07 15:52:38 +0000 |
---|---|---|
committer | tb <> | 2021-11-07 15:52:38 +0000 |
commit | 96dd57eb43c913bd5831db883e29231b45d3dc93 (patch) | |
tree | a1e4035d23751a0a69ee548ab29d1266d756095d /src/lib/libcrypto/x509/x509_lu.c | |
parent | 9a03e04c6f0b6f8a87ed2d3598d6890d034dad59 (diff) | |
download | openbsd-96dd57eb43c913bd5831db883e29231b45d3dc93.tar.gz openbsd-96dd57eb43c913bd5831db883e29231b45d3dc93.tar.bz2 openbsd-96dd57eb43c913bd5831db883e29231b45d3dc93.zip |
In X509_STORE_CTX, rename the X509_STORE store rather than ctx.
ok gnezdo jsing
Diffstat (limited to 'src/lib/libcrypto/x509/x509_lu.c')
-rw-r--r-- | src/lib/libcrypto/x509/x509_lu.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/libcrypto/x509/x509_lu.c b/src/lib/libcrypto/x509/x509_lu.c index f9feaa6349..dd048972b4 100644 --- a/src/lib/libcrypto/x509/x509_lu.c +++ b/src/lib/libcrypto/x509/x509_lu.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x509_lu.c,v 1.51 2021/11/06 12:31:40 tb Exp $ */ | 1 | /* $OpenBSD: x509_lu.c,v 1.52 2021/11/07 15:52:38 tb Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -315,7 +315,7 @@ int | |||
315 | X509_STORE_CTX_get_by_subject(X509_STORE_CTX *vs, X509_LOOKUP_TYPE type, | 315 | X509_STORE_CTX_get_by_subject(X509_STORE_CTX *vs, X509_LOOKUP_TYPE type, |
316 | X509_NAME *name, X509_OBJECT *ret) | 316 | X509_NAME *name, X509_OBJECT *ret) |
317 | { | 317 | { |
318 | X509_STORE *ctx = vs->ctx; | 318 | X509_STORE *ctx = vs->store; |
319 | X509_LOOKUP *lu; | 319 | X509_LOOKUP *lu; |
320 | X509_OBJECT stmp, *tmp; | 320 | X509_OBJECT stmp, *tmp; |
321 | int i; | 321 | int i; |
@@ -576,7 +576,7 @@ X509_get1_certs_from_cache(X509_STORE *store, X509_NAME *name) | |||
576 | STACK_OF(X509) * | 576 | STACK_OF(X509) * |
577 | X509_STORE_get1_certs(X509_STORE_CTX *ctx, X509_NAME *name) | 577 | X509_STORE_get1_certs(X509_STORE_CTX *ctx, X509_NAME *name) |
578 | { | 578 | { |
579 | X509_STORE *store = ctx->ctx; | 579 | X509_STORE *store = ctx->store; |
580 | STACK_OF(X509) *sk; | 580 | STACK_OF(X509) *sk; |
581 | X509_OBJECT *obj; | 581 | X509_OBJECT *obj; |
582 | 582 | ||
@@ -598,7 +598,7 @@ X509_STORE_get1_certs(X509_STORE_CTX *ctx, X509_NAME *name) | |||
598 | STACK_OF(X509_CRL) * | 598 | STACK_OF(X509_CRL) * |
599 | X509_STORE_get1_crls(X509_STORE_CTX *ctx, X509_NAME *name) | 599 | X509_STORE_get1_crls(X509_STORE_CTX *ctx, X509_NAME *name) |
600 | { | 600 | { |
601 | X509_STORE *store = ctx->ctx; | 601 | X509_STORE *store = ctx->store; |
602 | STACK_OF(X509_CRL) *sk = NULL; | 602 | STACK_OF(X509_CRL) *sk = NULL; |
603 | X509_CRL *x = NULL; | 603 | X509_CRL *x = NULL; |
604 | X509_OBJECT *obj = NULL; | 604 | X509_OBJECT *obj = NULL; |
@@ -721,16 +721,16 @@ X509_STORE_CTX_get1_issuer(X509 **out_issuer, X509_STORE_CTX *ctx, X509 *x) | |||
721 | X509_OBJECT_free(obj); | 721 | X509_OBJECT_free(obj); |
722 | obj = NULL; | 722 | obj = NULL; |
723 | 723 | ||
724 | if (ctx->ctx == NULL) | 724 | if (ctx->store == NULL) |
725 | return 0; | 725 | return 0; |
726 | 726 | ||
727 | /* Else find index of first cert accepted by 'check_issued' */ | 727 | /* Else find index of first cert accepted by 'check_issued' */ |
728 | CRYPTO_w_lock(CRYPTO_LOCK_X509_STORE); | 728 | CRYPTO_w_lock(CRYPTO_LOCK_X509_STORE); |
729 | idx = X509_OBJECT_idx_by_subject(ctx->ctx->objs, X509_LU_X509, xn); | 729 | idx = X509_OBJECT_idx_by_subject(ctx->store->objs, X509_LU_X509, xn); |
730 | if (idx != -1) /* should be true as we've had at least one match */ { | 730 | if (idx != -1) /* should be true as we've had at least one match */ { |
731 | /* Look through all matching certs for suitable issuer */ | 731 | /* Look through all matching certs for suitable issuer */ |
732 | for (i = idx; i < sk_X509_OBJECT_num(ctx->ctx->objs); i++) { | 732 | for (i = idx; i < sk_X509_OBJECT_num(ctx->store->objs); i++) { |
733 | pobj = sk_X509_OBJECT_value(ctx->ctx->objs, i); | 733 | pobj = sk_X509_OBJECT_value(ctx->store->objs, i); |
734 | /* See if we've run past the matches */ | 734 | /* See if we've run past the matches */ |
735 | if (pobj->type != X509_LU_X509) | 735 | if (pobj->type != X509_LU_X509) |
736 | break; | 736 | break; |