aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-05-14 08:21:40 -0400
committerJack Lloyd <[email protected]>2017-05-14 08:21:40 -0400
commit2f53dc937f33816445c7646b88e0ad826d197482 (patch)
tree52952ac829308dc8a94fda89953200b54ccf2559 /src
parent2c5919cd5aa3d7723919f729cab9938df1cc4f94 (diff)
parent42de5d71f61cdbacaf522ce898f915ceb12db099 (diff)
Merge GH #1045 Fix botan_privkey_load_rsa misleading parameter name
Diffstat (limited to 'src')
-rw-r--r--src/lib/ffi/ffi.cpp6
-rw-r--r--src/lib/ffi/ffi.h2
-rw-r--r--src/tests/test_ffi.cpp2
3 files changed, 5 insertions, 5 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);
diff --git a/src/tests/test_ffi.cpp b/src/tests/test_ffi.cpp
index 966691b7f..45c4c8a5b 100644
--- a/src/tests/test_ffi.cpp
+++ b/src/tests/test_ffi.cpp
@@ -969,7 +969,7 @@ class FFI_Unit_Tests : public Test
TEST_FFI_RC(-1, botan_privkey_check_key, (loaded_privkey, rng, 0));
botan_privkey_destroy(loaded_privkey);
- TEST_FFI_OK(botan_privkey_load_rsa, (&loaded_privkey, p, q, d));
+ TEST_FFI_OK(botan_privkey_load_rsa, (&loaded_privkey, p, q, e));
TEST_FFI_OK(botan_privkey_check_key, (loaded_privkey, rng, 0));
botan_pubkey_t loaded_pubkey;