diff options
| author | beck <> | 2021-11-04 23:52:34 +0000 |
|---|---|---|
| committer | beck <> | 2021-11-04 23:52:34 +0000 |
| commit | 87decea9a33c04cfad36679efd6678bbc21363cd (patch) | |
| tree | 3ca9bd91a3930e5f3e28873aa362dffdb8cf6227 /src/lib/libcrypto/x509/x509_internal.h | |
| parent | 427635c8217e5b9c6e458a39dac977cc6818582f (diff) | |
| download | openbsd-87decea9a33c04cfad36679efd6678bbc21363cd.tar.gz openbsd-87decea9a33c04cfad36679efd6678bbc21363cd.tar.bz2 openbsd-87decea9a33c04cfad36679efd6678bbc21363cd.zip | |
Cache sha512 hash and parsed not_before and not_after with X509 cert.
Replace sha1 hash use with sha512 for certificate comparisons internal
to the library. use the cached sha512 for the validator's verification
cache.
Reduces our recomputation of hashes, and heavy use of time1 time
conversion functions noticed bu claudio@ in rpki client.
ok jsing@ tb@
Diffstat (limited to 'src/lib/libcrypto/x509/x509_internal.h')
| -rw-r--r-- | src/lib/libcrypto/x509/x509_internal.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/x509/x509_internal.h b/src/lib/libcrypto/x509/x509_internal.h index 7ca67a853b..a9b584b13e 100644 --- a/src/lib/libcrypto/x509/x509_internal.h +++ b/src/lib/libcrypto/x509/x509_internal.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: x509_internal.h,v 1.14 2021/11/01 20:53:08 tb Exp $ */ | 1 | /* $OpenBSD: x509_internal.h,v 1.15 2021/11/04 23:52:34 beck Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2020 Bob Beck <beck@openbsd.org> | 3 | * Copyright (c) 2020 Bob Beck <beck@openbsd.org> |
| 4 | * | 4 | * |
| @@ -96,8 +96,7 @@ int x509_vfy_callback_indicate_success(X509_STORE_CTX *ctx); | |||
| 96 | void x509v3_cache_extensions(X509 *x); | 96 | void x509v3_cache_extensions(X509 *x); |
| 97 | X509 *x509_vfy_lookup_cert_match(X509_STORE_CTX *ctx, X509 *x); | 97 | X509 *x509_vfy_lookup_cert_match(X509_STORE_CTX *ctx, X509 *x); |
| 98 | 98 | ||
| 99 | int x509_verify_asn1_time_to_tm(const ASN1_TIME *atime, struct tm *tm, | 99 | time_t x509_verify_asn1_time_to_time_t(const ASN1_TIME *atime, int notafter); |
| 100 | int notafter); | ||
| 101 | 100 | ||
| 102 | struct x509_verify_ctx *x509_verify_ctx_new_from_xsc(X509_STORE_CTX *xsc); | 101 | struct x509_verify_ctx *x509_verify_ctx_new_from_xsc(X509_STORE_CTX *xsc); |
| 103 | 102 | ||
| @@ -132,6 +131,7 @@ int x509_constraints_check(struct x509_constraints_names *names, | |||
| 132 | struct x509_constraints_names *excluded, int *error); | 131 | struct x509_constraints_names *excluded, int *error); |
| 133 | int x509_constraints_chain(STACK_OF(X509) *chain, int *error, | 132 | int x509_constraints_chain(STACK_OF(X509) *chain, int *error, |
| 134 | int *depth); | 133 | int *depth); |
| 134 | void x509_verify_cert_info_populate(X509 *cert); | ||
| 135 | 135 | ||
| 136 | __END_HIDDEN_DECLS | 136 | __END_HIDDEN_DECLS |
| 137 | 137 | ||
