aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto/c_src
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2013-04-09 10:36:29 +0200
committerIngela Anderton Andin <[email protected]>2013-05-08 10:39:18 +0200
commit07ba72cdef3d9b62b5be23611cfe869ec343cb87 (patch)
tree63e9c46044092bdba41446504248c77321568a43 /lib/crypto/c_src
parentff58cc8976efe77f92510011d9ed7b0f242e235e (diff)
downloadotp-07ba72cdef3d9b62b5be23611cfe869ec343cb87.tar.gz
otp-07ba72cdef3d9b62b5be23611cfe869ec343cb87.tar.bz2
otp-07ba72cdef3d9b62b5be23611cfe869ec343cb87.zip
crypto: Allow integer keys for rsa_private/public_en/decrypt
as well as mpint's for backward compatibility.
Diffstat (limited to 'lib/crypto/c_src')
-rw-r--r--lib/crypto/c_src/crypto.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c
index dae48898ce..a8027bb079 100644
--- a/lib/crypto/c_src/crypto.c
+++ b/lib/crypto/c_src/crypto.c
@@ -2339,9 +2339,9 @@ static ERL_NIF_TERM rsa_public_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TER
if (!enif_inspect_binary(env, argv[0], &data_bin)
|| !enif_get_list_cell(env, argv[1], &head, &tail)
- || !get_bn_from_mpint(env, head, &rsa->e)
+ || !get_bn_from_bin(env, head, &rsa->e)
|| !enif_get_list_cell(env, tail, &head, &tail)
- || !get_bn_from_mpint(env, head, &rsa->n)
+ || !get_bn_from_bin(env, head, &rsa->n)
|| !enif_is_empty_list(env,tail)
|| !rsa_pad(argv[2], &padding)) {