diff options
author | Daniel Wyatt <[email protected]> | 2017-05-13 16:00:22 -0400 |
---|---|---|
committer | Daniel Wyatt <[email protected]> | 2017-05-13 16:00:22 -0400 |
commit | 42de5d71f61cdbacaf522ce898f915ceb12db099 (patch) | |
tree | 52952ac829308dc8a94fda89953200b54ccf2559 /src/lib/ffi | |
parent | 2c5919cd5aa3d7723919f729cab9938df1cc4f94 (diff) |
Fix botan_privkey_load_rsa misleading parameter names.
RSA_PrivateKey's constructor take p,q,e,d,n.
Diffstat (limited to 'src/lib/ffi')
-rw-r--r-- | src/lib/ffi/ffi.cpp | 6 | ||||
-rw-r--r-- | src/lib/ffi/ffi.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/ffi/ffi.cpp b/src/lib/ffi/ffi.cpp index 4d5f67e34..94e83122e 100644 --- a/src/lib/ffi/ffi.cpp +++ b/src/lib/ffi/ffi.cpp @@ -1449,7 +1449,7 @@ int botan_pubkey_load(botan_pubkey_t* key, } int botan_privkey_load_rsa(botan_privkey_t* key, - botan_mp_t p, botan_mp_t q, botan_mp_t d) + botan_mp_t p, botan_mp_t q, botan_mp_t e) { #if defined(BOTAN_HAS_RSA) *key = nullptr; @@ -1457,7 +1457,7 @@ int botan_privkey_load_rsa(botan_privkey_t* key, { *key = new botan_privkey_struct(new Botan::RSA_PrivateKey(safe_get(p), safe_get(q), - safe_get(d))); + safe_get(e))); return 0; } catch(std::exception& e) @@ -1466,7 +1466,7 @@ int botan_privkey_load_rsa(botan_privkey_t* key, } return -1; #else - BOTAN_UNUSED(key, p, q, d); + BOTAN_UNUSED(key, p, q, e); return BOTAN_FFI_ERROR_NOT_IMPLEMENTED; #endif } diff --git a/src/lib/ffi/ffi.h b/src/lib/ffi/ffi.h index 5638810f9..f93265e22 100644 --- a/src/lib/ffi/ffi.h +++ b/src/lib/ffi/ffi.h @@ -755,7 +755,7 @@ BOTAN_DLL int botan_privkey_get_field(botan_mp_t output, BOTAN_DLL int botan_privkey_load_rsa(botan_privkey_t* key, botan_mp_t p, botan_mp_t q, - botan_mp_t d); + botan_mp_t e); BOTAN_DLL int botan_privkey_rsa_get_p(botan_mp_t p, botan_privkey_t rsa_key); BOTAN_DLL int botan_privkey_rsa_get_q(botan_mp_t q, botan_privkey_t rsa_key); |