-/* $OpenBSD: rsa.h,v 1.32 2018/02/17 13:47:36 tb Exp $ */
+/* $OpenBSD: rsa.h,v 1.33 2018/02/18 12:52:13 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
RSA *RSA_new(void);
RSA *RSA_new_method(ENGINE *engine);
+int RSA_bits(const RSA *rsa);
int RSA_size(const RSA *rsa);
/* Deprecated version */
-/* $OpenBSD: rsa_crpt.c,v 1.18 2017/01/29 17:49:23 beck Exp $ */
+/* $OpenBSD: rsa_crpt.c,v 1.19 2018/02/18 12:52:13 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
#include <openssl/engine.h>
#endif
+int
+RSA_bits(const RSA *r)
+{
+ return BN_num_bits(r->n);
+}
+
int
RSA_size(const RSA *r)
{