diff options
author | Christian Pointner <equinox@anytun.org> | 2009-01-15 12:27:06 +0000 |
---|---|---|
committer | Christian Pointner <equinox@anytun.org> | 2009-01-15 12:27:06 +0000 |
commit | 86891c4b1884a53bcd6e6bd021eb2a7b3987ab28 (patch) | |
tree | 828736cf5477351b488b02ad722b2442fbee335e /src/authAlgo.cpp | |
parent | small cleanup (diff) |
small cleanup
Diffstat (limited to 'src/authAlgo.cpp')
-rw-r--r-- | src/authAlgo.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/authAlgo.cpp b/src/authAlgo.cpp index 3088c72..8293d70 100644 --- a/src/authAlgo.cpp +++ b/src/authAlgo.cpp @@ -76,6 +76,11 @@ Sha1AuthAlgo::~Sha1AuthAlgo() void Sha1AuthAlgo::generate(KeyDerivation& kd, kd_dir dir, EncryptedPacket& packet) { +#ifndef USE_SSL_CRYPTO + if(!handle) + return; +#endif + packet.addAuthTag(); if(!packet.getAuthTagLength()) return; @@ -113,6 +118,11 @@ void Sha1AuthAlgo::generate(KeyDerivation& kd, kd_dir dir, EncryptedPacket& pack bool Sha1AuthAlgo::checkTag(KeyDerivation& kd, kd_dir dir, EncryptedPacket& packet) { +#ifndef USE_SSL_CRYPTO + if(!handle) + return false; +#endif + packet.withAuthTag(true); if(!packet.getAuthTagLength()) return true; |