From c1cf6accca667bac002e12ce7343e42295a3e451 Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Thu, 13 Oct 2016 14:50:43 -0400 Subject: ffi: Avoid deprecated PK constructors. The system rng is already a hard requirement for FFI anyway. --- src/lib/ffi/ffi.cpp | 8 ++++---- 1 file 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 pk(new Botan::PK_Encryptor_EME(safe_get(key_obj), padding)); + std::unique_ptr 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 pk(new Botan::PK_Decryptor_EME(safe_get(key_obj), padding)); + std::unique_ptr 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 pk(new Botan::PK_Signer(safe_get(key_obj), hash)); + std::unique_ptr 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 pk(new Botan::PK_Key_Agreement(safe_get(key_obj), kdf)); + std::unique_ptr 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; } -- cgit v1.2.3