diff options
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/dh/dh_lib.c | 5 | ||||
-rw-r--r-- | crypto/rsa/rsa_crpt.c | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/crypto/dh/dh_lib.c b/crypto/dh/dh_lib.c index 4a37adc9f8..cce2514bbf 100644 --- a/crypto/dh/dh_lib.c +++ b/crypto/dh/dh_lib.c @@ -237,6 +237,11 @@ void *DH_get_ex_data(DH *d, int idx) return (CRYPTO_get_ex_data(&d->ex_data, idx)); } +int DH_bits(const DH *dh) +{ + return BN_num_bits(dh->p); +} + int DH_size(const DH *dh) { return (BN_num_bytes(dh->p)); diff --git a/crypto/rsa/rsa_crpt.c b/crypto/rsa/rsa_crpt.c index 5220b7d068..3c4fd67714 100644 --- a/crypto/rsa/rsa_crpt.c +++ b/crypto/rsa/rsa_crpt.c @@ -64,6 +64,11 @@ #include <openssl/rsa.h> #include <openssl/rand.h> +int RSA_bits(const RSA *r) +{ + return (BN_num_bits(r->n)); +} + int RSA_size(const RSA *r) { return (BN_num_bytes(r->n)); |