summaryrefslogtreecommitdiff
path: root/src/authAlgo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/authAlgo.cpp')
-rw-r--r--src/authAlgo.cpp10
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;