Fix build with GCC 11.2 --- libenctain/botan-1.6/include/base.h +++ libenctain/botan-1.6/include/base.h @@ -27,8 +27,8 @@ class SymmetricAlgorithm virtual std::string name() const = 0; - void set_key(const SymmetricKey&) throw(Invalid_Key_Length); - void set_key(const byte[], u32bit) throw(Invalid_Key_Length); + void set_key(const SymmetricKey&); + void set_key(const byte[], u32bit); bool valid_keylength(u32bit) const; SymmetricAlgorithm(u32bit, u32bit, u32bit); virtual ~SymmetricAlgorithm() {} @@ -156,7 +156,7 @@ class EntropySource class RandomNumberGenerator { public: - virtual void randomize(byte[], u32bit) throw(PRNG_Unseeded) = 0; + virtual void randomize(byte[], u32bit) = 0; virtual bool is_seeded() const { return true; } virtual void clear() throw() {}; --- libenctain/botan-1.6/include/randpool.h +++ libenctain/botan-1.6/include/randpool.h @@ -17,7 +17,7 @@ namespace Botan { class Randpool : public RandomNumberGenerator { public: - void randomize(byte[], u32bit) throw(PRNG_Unseeded); + void randomize(byte[], u32bit); bool is_seeded() const; void clear() throw(); std::string name() const; --- libenctain/botan-1.6/include/x931_rng.h +++ libenctain/botan-1.6/include/x931_rng.h @@ -17,7 +17,7 @@ namespace Botan { class ANSI_X931_RNG : public RandomNumberGenerator { public: - void randomize(byte[], u32bit) throw(PRNG_Unseeded); + void randomize(byte[], u32bit); bool is_seeded() const; void clear() throw(); std::string name() const; --- libenctain/botan-1.6/src/base.cpp +++ libenctain/botan-1.6/src/base.cpp @@ -37,7 +37,6 @@ bool SymmetricAlgorithm::valid_keylength(u32bit length) const * Set the key * *************************************************/ void SymmetricAlgorithm::set_key(const SymmetricKey& algo_key) - throw(Invalid_Key_Length) { set_key(algo_key.begin(), algo_key.length()); } @@ -46,7 +45,6 @@ void SymmetricAlgorithm::set_key(const SymmetricKey& algo_key) * Set the key * *************************************************/ void SymmetricAlgorithm::set_key(const byte algo_key[], u32bit length) - throw(Invalid_Key_Length) { if(!valid_keylength(length)) throw Invalid_Key_Length(name(), length); --- libenctain/botan-1.6/src/randpool.cpp +++ libenctain/botan-1.6/src/randpool.cpp @@ -38,7 +38,7 @@ SecureVector randpool_prf(MessageAuthenticationCode* mac, /************************************************* * Generate a buffer of random bytes * *************************************************/ -void Randpool::randomize(byte out[], u32bit length) throw(PRNG_Unseeded) +void Randpool::randomize(byte out[], u32bit length) { if(!is_seeded()) throw PRNG_Unseeded(name()); --- libenctain/botan-1.6/src/x931_rng.cpp +++ libenctain/botan-1.6/src/x931_rng.cpp @@ -15,7 +15,7 @@ namespace Botan { /************************************************* * Generate a buffer of random bytes * *************************************************/ -void ANSI_X931_RNG::randomize(byte out[], u32bit length) throw(PRNG_Unseeded) +void ANSI_X931_RNG::randomize(byte out[], u32bit length) { if(!is_seeded()) throw PRNG_Unseeded(name());