summaryrefslogtreecommitdiff
path: root/src/authAlgo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/authAlgo.cpp')
-rw-r--r--src/authAlgo.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/authAlgo.cpp b/src/authAlgo.cpp
index 6b1c9ec..4657ddc 100644
--- a/src/authAlgo.cpp
+++ b/src/authAlgo.cpp
@@ -73,8 +73,10 @@ void Sha1AuthAlgo::setKey(Buffer& key)
return;
gcry_error_t err = gcry_md_setkey( ctx_, key.getBuf(), key.getLength() );
- if( err )
- cLog.msg(Log::PRIO_ERR) << "Sha1AuthAlgo::setKey: Failed to set cipher key: " << gpg_strerror( err );
+ if( err ) {
+ char buf[NL_TEXTMAX];
+ cLog.msg(Log::PRIO_ERR) << "Sha1AuthAlgo::setKey: Failed to set cipher key: " << gpg_strerror_r(err, buf, NL_TEXTMAX);
+ }
}
void Sha1AuthAlgo::generate(EncryptedPacket& packet)