aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/test_pubkey.h
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2021-04-04 16:47:11 -0400
committerJack Lloyd <[email protected]>2021-04-05 10:08:21 -0400
commitec8b0aa05cf08aa356ab0631903597bf178480fd (patch)
tree164e449557b12c45fd7a0007517a505ea4d29bac /src/tests/test_pubkey.h
parent262681832f7b58287b17a3d33754f5dc4699b660 (diff)
More raw pointer removal
Diffstat (limited to 'src/tests/test_pubkey.h')
-rw-r--r--src/tests/test_pubkey.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tests/test_pubkey.h b/src/tests/test_pubkey.h
index ad859abbc..8d6cbe75a 100644
--- a/src/tests/test_pubkey.h
+++ b/src/tests/test_pubkey.h
@@ -58,9 +58,9 @@ class PK_Signature_Generation_Test : public PK_Test
virtual std::unique_ptr<Botan::Private_Key> load_private_key(const VarMap& vars) = 0;
- virtual Botan::RandomNumberGenerator* test_rng(const std::vector<uint8_t>& nonce) const
+ virtual std::unique_ptr<Botan::RandomNumberGenerator> test_rng(const std::vector<uint8_t>& nonce) const
{
- return new Fixed_Output_RNG(nonce);
+ return std::make_unique<Fixed_Output_RNG>(nonce);
}
private:
@@ -146,9 +146,9 @@ class PK_Encryption_Decryption_Test : public PK_Test
return "Raw";
}
- virtual Botan::RandomNumberGenerator* test_rng(const std::vector<uint8_t>& nonce) const
+ virtual std::unique_ptr<Botan::RandomNumberGenerator> test_rng(const std::vector<uint8_t>& nonce) const
{
- return new Fixed_Output_RNG(nonce);
+ return std::make_unique<Fixed_Output_RNG>(nonce);
}
private: