diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2018-02-18 12:52:14 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2018-02-18 12:52:14 +0000 |
commit | 2787ecbd158905f983fd0e36f271186fbe5c4cc0 (patch) | |
tree | 0618d142fca32bb91bf4449915eb49ac8c471c3d /lib/libcrypto | |
parent | aee7aa5d24fbd263cafbeacad12495143db45b82 (diff) |
Provide RSA_bits()
ok jsing
Diffstat (limited to 'lib/libcrypto')
-rw-r--r-- | lib/libcrypto/Symbols.list | 1 | ||||
-rw-r--r-- | lib/libcrypto/rsa/rsa.h | 3 | ||||
-rw-r--r-- | lib/libcrypto/rsa/rsa_crpt.c | 8 |
3 files changed, 10 insertions, 2 deletions
diff --git a/lib/libcrypto/Symbols.list b/lib/libcrypto/Symbols.list index ab4c8593d7e..8f18580b559 100644 --- a/lib/libcrypto/Symbols.list +++ b/lib/libcrypto/Symbols.list @@ -2203,6 +2203,7 @@ RSA_PSS_PARAMS_free RSA_PSS_PARAMS_it RSA_PSS_PARAMS_new RSA_X931_hash_id +RSA_bits RSA_blinding_off RSA_blinding_on RSA_check_key diff --git a/lib/libcrypto/rsa/rsa.h b/lib/libcrypto/rsa/rsa.h index 7d4bd838c50..7e28a8766c6 100644 --- a/lib/libcrypto/rsa/rsa.h +++ b/lib/libcrypto/rsa/rsa.h @@ -1,4 +1,4 @@ -/* $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. * @@ -256,6 +256,7 @@ struct rsa_st { RSA *RSA_new(void); RSA *RSA_new_method(ENGINE *engine); +int RSA_bits(const RSA *rsa); int RSA_size(const RSA *rsa); /* Deprecated version */ diff --git a/lib/libcrypto/rsa/rsa_crpt.c b/lib/libcrypto/rsa/rsa_crpt.c index f0c925602f7..a646ded4a73 100644 --- a/lib/libcrypto/rsa/rsa_crpt.c +++ b/lib/libcrypto/rsa/rsa_crpt.c @@ -1,4 +1,4 @@ -/* $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. * @@ -73,6 +73,12 @@ #endif int +RSA_bits(const RSA *r) +{ + return BN_num_bits(r->n); +} + +int RSA_size(const RSA *r) { return BN_num_bytes(r->n); |