-/* $OpenBSD: rsa.h,v 1.55 2022/01/14 08:34:39 tb Exp $ */
+/* $OpenBSD: rsa.h,v 1.56 2022/06/27 12:30:28 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
int RSA_set_ex_data(RSA *r, int idx, void *arg);
void *RSA_get_ex_data(const RSA *r, int idx);
+#ifdef LIBRESSL_INTERNAL
+int RSA_security_bits(const RSA *rsa);
+#endif
+
void RSA_get0_key(const RSA *r, const BIGNUM **n, const BIGNUM **e,
const BIGNUM **d);
int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d);
-/* $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.
*
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)
{