diff options
author | tb <> | 2023-05-14 20:20:40 +0000 |
---|---|---|
committer | tb <> | 2023-05-14 20:20:40 +0000 |
commit | 9037f6734c65246c06fe4e9d15ead755e103101d (patch) | |
tree | ebad2a2bf79fd204064284fc621f0384ead01ee9 /src/lib | |
parent | aa9d3cda02275359ed09de1489478a13b7f096ec (diff) | |
download | openbsd-9037f6734c65246c06fe4e9d15ead755e103101d.tar.gz openbsd-9037f6734c65246c06fe4e9d15ead755e103101d.tar.bz2 openbsd-9037f6734c65246c06fe4e9d15ead755e103101d.zip |
Rename arguments of X509_STORE_CTX_init()
It is higly confusing to call the list of untrusted certs chain, when
you're later going to call X509_STORE_CTX_get0_chain() to get a completely
unrelated chain by the verifier. Other X509_STORE_CTX APIs call this list
of certs 'untrusted', so go with that. At the same time, rename the x509
into leaf, which is more explicit.
suggested by/ok jsing
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/x509/x509_vfy.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/libcrypto/x509/x509_vfy.c b/src/lib/libcrypto/x509/x509_vfy.c index 2410d39b86..6bc06187e1 100644 --- a/src/lib/libcrypto/x509/x509_vfy.c +++ b/src/lib/libcrypto/x509/x509_vfy.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x509_vfy.c,v 1.122 2023/05/08 14:51:00 tb Exp $ */ | 1 | /* $OpenBSD: x509_vfy.c,v 1.123 2023/05/14 20:20:40 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 | * |
@@ -2308,8 +2308,8 @@ X509_STORE_CTX_free(X509_STORE_CTX *ctx) | |||
2308 | LCRYPTO_ALIAS(X509_STORE_CTX_free); | 2308 | LCRYPTO_ALIAS(X509_STORE_CTX_free); |
2309 | 2309 | ||
2310 | int | 2310 | int |
2311 | X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, X509 *x509, | 2311 | X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, X509 *leaf, |
2312 | STACK_OF(X509) *chain) | 2312 | STACK_OF(X509) *untrusted) |
2313 | { | 2313 | { |
2314 | int param_ret = 1; | 2314 | int param_ret = 1; |
2315 | 2315 | ||
@@ -2337,8 +2337,8 @@ X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, X509 *x509, | |||
2337 | * possible even on early exits. | 2337 | * possible even on early exits. |
2338 | */ | 2338 | */ |
2339 | ctx->store = store; | 2339 | ctx->store = store; |
2340 | ctx->cert = x509; | 2340 | ctx->cert = leaf; |
2341 | ctx->untrusted = chain; | 2341 | ctx->untrusted = untrusted; |
2342 | 2342 | ||
2343 | if (store && store->verify) | 2343 | if (store && store->verify) |
2344 | ctx->verify = store->verify; | 2344 | ctx->verify = store->verify; |