From 480c1f602005c8b8ae31165e5edd93ad31443164 Mon Sep 17 00:00:00 2001 From: tb <> Date: Mon, 27 Jun 2022 12:30:28 +0000 Subject: Prepare to provide RSA_security_bits() ok beck jsing --- src/lib/libcrypto/rsa/rsa_lib.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/lib/libcrypto/rsa/rsa_lib.c') diff --git a/src/lib/libcrypto/rsa/rsa_lib.c b/src/lib/libcrypto/rsa/rsa_lib.c index ddf3f1ba75..570bb6c05e 100644 --- a/src/lib/libcrypto/rsa/rsa_lib.c +++ b/src/lib/libcrypto/rsa/rsa_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rsa_lib.c,v 1.42 2022/01/07 09:55:32 tb Exp $ */ +/* $OpenBSD: rsa_lib.c,v 1.43 2022/06/27 12:30:28 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -241,6 +241,12 @@ RSA_get_ex_data(const RSA *r, int idx) return CRYPTO_get_ex_data(&r->ex_data, idx); } +int +RSA_security_bits(const RSA *rsa) +{ + return BN_security_bits(RSA_bits(rsa), -1); +} + void RSA_get0_key(const RSA *r, const BIGNUM **n, const BIGNUM **e, const BIGNUM **d) { -- cgit v1.2.3-55-g6feb