diff options
Diffstat (limited to 'src/lib/libcrypto/evp/p_lib.c')
-rw-r--r-- | src/lib/libcrypto/evp/p_lib.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/lib/libcrypto/evp/p_lib.c b/src/lib/libcrypto/evp/p_lib.c index cdd38e4e30..b6cef5a14c 100644 --- a/src/lib/libcrypto/evp/p_lib.c +++ b/src/lib/libcrypto/evp/p_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: p_lib.c,v 1.28 2022/01/20 11:06:24 inoguchi Exp $ */ | 1 | /* $OpenBSD: p_lib.c,v 1.29 2022/06/27 12:36:05 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 | * |
@@ -95,6 +95,17 @@ EVP_PKEY_bits(const EVP_PKEY *pkey) | |||
95 | } | 95 | } |
96 | 96 | ||
97 | int | 97 | int |
98 | EVP_PKEY_security_bits(const EVP_PKEY *pkey) | ||
99 | { | ||
100 | if (pkey == NULL) | ||
101 | return 0; | ||
102 | if (pkey->ameth == NULL || pkey->ameth->pkey_security_bits == NULL) | ||
103 | return -2; | ||
104 | |||
105 | return pkey->ameth->pkey_security_bits(pkey); | ||
106 | } | ||
107 | |||
108 | int | ||
98 | EVP_PKEY_size(const EVP_PKEY *pkey) | 109 | EVP_PKEY_size(const EVP_PKEY *pkey) |
99 | { | 110 | { |
100 | if (pkey && pkey->ameth && pkey->ameth->pkey_size) | 111 | if (pkey && pkey->ameth && pkey->ameth->pkey_size) |