summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/evp/evp_locl.h
diff options
context:
space:
mode:
authortb <>2022-01-10 12:10:26 +0000
committertb <>2022-01-10 12:10:26 +0000
commit6b5741e4f43381bf67a7a82640e37e6bb4ac4d68 (patch)
treeba8a46237cda314ddd3da47248b453e7613bb73a /src/lib/libcrypto/evp/evp_locl.h
parent66fc1114c3900ed41771dba70d33a853a0a925f4 (diff)
downloadopenbsd-6b5741e4f43381bf67a7a82640e37e6bb4ac4d68.tar.gz
openbsd-6b5741e4f43381bf67a7a82640e37e6bb4ac4d68.tar.bz2
openbsd-6b5741e4f43381bf67a7a82640e37e6bb4ac4d68.zip
Prepare to provide EVP_PKEY_{public,param}_check
This implements checking of a public key and of key generation parameters for DH and EC keys. With the same logic and setters and const quirks as for EVP_PKEY_check(). There are a couple of quirks: For DH no default EVP_PKEY_check() is implemented, instead EVP_PKEY_param_check() calls DH_check_ex() even though DH_param_check_ex() was added for this purpose. EVP_PKEY_public_check() for EC curves also checks the private key if present. ok inoguchi jsing
Diffstat (limited to 'src/lib/libcrypto/evp/evp_locl.h')
-rw-r--r--src/lib/libcrypto/evp/evp_locl.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/libcrypto/evp/evp_locl.h b/src/lib/libcrypto/evp/evp_locl.h
index 3ff8e8ad99..44e2d5cadb 100644
--- a/src/lib/libcrypto/evp/evp_locl.h
+++ b/src/lib/libcrypto/evp/evp_locl.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: evp_locl.h,v 1.19 2022/01/10 11:52:43 tb Exp $ */ 1/* $OpenBSD: evp_locl.h,v 1.20 2022/01/10 12:10:26 tb Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
@@ -349,6 +349,8 @@ struct evp_pkey_method_st {
349 int (*ctrl_str)(EVP_PKEY_CTX *ctx, const char *type, const char *value); 349 int (*ctrl_str)(EVP_PKEY_CTX *ctx, const char *type, const char *value);
350 350
351 int (*check)(EVP_PKEY *pkey); 351 int (*check)(EVP_PKEY *pkey);
352 int (*public_check)(EVP_PKEY *pkey);
353 int (*param_check)(EVP_PKEY *pkey);
352} /* EVP_PKEY_METHOD */; 354} /* EVP_PKEY_METHOD */;
353 355
354void evp_pkey_set_cb_translate(BN_GENCB *cb, EVP_PKEY_CTX *ctx); 356void evp_pkey_set_cb_translate(BN_GENCB *cb, EVP_PKEY_CTX *ctx);