Do not throw from destructors, fatal_assert() instead.

This commit is contained in:
John Hood
2016-02-24 20:29:41 -05:00
parent 49a4106ae4
commit c964d40dd8
2 changed files with 3 additions and 6 deletions
+2 -3
View File
@@ -41,6 +41,7 @@
#include "byteorder.h"
#include "crypto.h"
#include "base64.h"
#include "fatal_assert.h"
#include "prng.h"
using namespace std;
@@ -171,9 +172,7 @@ Session::Session( Base64Key s_key )
Session::~Session()
{
if ( ae_clear( ctx ) != AE_SUCCESS ) {
throw CryptoException( "Could not clear AES-OCB context." );
}
fatal_assert( ae_clear( ctx ) == AE_SUCCESS );
}
Nonce::Nonce( uint64_t val )