Exit instead of throwing in BERDecoder destructor; remove noexcept() stuff.
This commit is contained in:
parent
77a8152d71
commit
a6612ab3ab
|
@ -81,13 +81,17 @@ BERSequenceDecoder::BERSequenceDecoder(BufferedTransformation &inQueue)
|
|||
definiteLength = BERLengthDecode(inQueue, length);
|
||||
}
|
||||
|
||||
BERSequenceDecoder::~BERSequenceDecoder() NOEXCEPT_FALSE
|
||||
BERSequenceDecoder::~BERSequenceDecoder()
|
||||
{
|
||||
if (!definiteLength)
|
||||
{ // remove end-of-content octects
|
||||
word16 i;
|
||||
if (!inQueue.GetShort(i) || (i!=0))
|
||||
BERDecodeError();
|
||||
{
|
||||
fputs("### Internal Error.\n### Invalid or corrupt key.\n### Exiting...\n\
|
||||
", stderr);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ class BERSequenceDecoder : public BufferedTransformation
|
|||
{
|
||||
public:
|
||||
BERSequenceDecoder(BufferedTransformation &inQueue);
|
||||
~BERSequenceDecoder() NOEXCEPT_FALSE;
|
||||
~BERSequenceDecoder();
|
||||
|
||||
void Put(byte) {}
|
||||
void Put(const byte *, unsigned int) {}
|
||||
|
|
|
@ -10,12 +10,6 @@
|
|||
#include <exception>
|
||||
#include <string>
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# define NOEXCEPT_FALSE noexcept(false)
|
||||
#else
|
||||
# define NOEXCEPT_FALSE
|
||||
#endif
|
||||
|
||||
/// base class for all exceptions thrown by Crypto++
|
||||
class CryptlibException : public std::exception
|
||||
{
|
||||
|
@ -204,7 +198,7 @@ class BufferedTransformation
|
|||
{
|
||||
public:
|
||||
///
|
||||
virtual ~BufferedTransformation() NOEXCEPT_FALSE {}
|
||||
virtual ~BufferedTransformation() {}
|
||||
|
||||
//@Man: INPUT
|
||||
//@{
|
||||
|
|
Loading…
Reference in New Issue