diff options
author | Jack Lloyd <[email protected]> | 2016-10-13 14:50:43 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-10-13 14:50:43 -0400 |
commit | c1cf6accca667bac002e12ce7343e42295a3e451 (patch) | |
tree | 0652d1bd1a89cc7e12b4277ddc43e32e8b130336 | |
parent | 79ea2dc44c2b0957b3cb262b46ed976d4ccc95a5 (diff) |
ffi: Avoid deprecated PK constructors.
The system rng is already a hard requirement for FFI anyway.
-rw-r--r-- | src/lib/ffi/ffi.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/ffi/ffi.cpp b/src/lib/ffi/ffi.cpp index e8df51fec..cc27f485a 100644 --- a/src/lib/ffi/ffi.cpp +++ b/src/lib/ffi/ffi.cpp @@ -985,7 +985,7 @@ int botan_pk_op_encrypt_create(botan_pk_op_encrypt_t* op, if(flags != 0) return BOTAN_FFI_ERROR_BAD_FLAG; - std::unique_ptr<Botan::PK_Encryptor> pk(new Botan::PK_Encryptor_EME(safe_get(key_obj), padding)); + std::unique_ptr<Botan::PK_Encryptor> pk(new Botan::PK_Encryptor_EME(safe_get(key_obj), Botan::system_rng(), padding)); *op = new botan_pk_op_encrypt_struct(pk.release()); return 0; } @@ -1030,7 +1030,7 @@ int botan_pk_op_decrypt_create(botan_pk_op_decrypt_t* op, if(flags != 0) return BOTAN_FFI_ERROR_BAD_FLAG; - std::unique_ptr<Botan::PK_Decryptor> pk(new Botan::PK_Decryptor_EME(safe_get(key_obj), padding)); + std::unique_ptr<Botan::PK_Decryptor> pk(new Botan::PK_Decryptor_EME(safe_get(key_obj), Botan::system_rng(), padding)); *op = new botan_pk_op_decrypt_struct(pk.release()); return 0; } @@ -1074,7 +1074,7 @@ int botan_pk_op_sign_create(botan_pk_op_sign_t* op, if(flags != 0) return BOTAN_FFI_ERROR_BAD_FLAG; - std::unique_ptr<Botan::PK_Signer> pk(new Botan::PK_Signer(safe_get(key_obj), hash)); + std::unique_ptr<Botan::PK_Signer> pk(new Botan::PK_Signer(safe_get(key_obj),Botan::system_rng(), hash)); *op = new botan_pk_op_sign_struct(pk.release()); return 0; } @@ -1165,7 +1165,7 @@ int botan_pk_op_key_agreement_create(botan_pk_op_ka_t* op, if(flags != 0) return BOTAN_FFI_ERROR_BAD_FLAG; - std::unique_ptr<Botan::PK_Key_Agreement> pk(new Botan::PK_Key_Agreement(safe_get(key_obj), kdf)); + std::unique_ptr<Botan::PK_Key_Agreement> pk(new Botan::PK_Key_Agreement(safe_get(key_obj), Botan::system_rng(), kdf)); *op = new botan_pk_op_ka_struct(pk.release()); return 0; } |