summaryrefslogtreecommitdiff
path: root/src/cipher.cpp
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2009-02-22 16:00:00 +0000
committerChristian Pointner <equinox@anytun.org>2009-02-22 16:00:00 +0000
commitbb33710e45c6e3b4f6594b8c35c79e17c6e5466a (patch)
tree7ca1400100c4848b519698e81f21c743f8a2275b /src/cipher.cpp
parentfixed default log level @ anytun-controld (diff)
remove useless log priorities CRIT,EMERG,ALERT
Diffstat (limited to 'src/cipher.cpp')
-rw-r--r--src/cipher.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/cipher.cpp b/src/cipher.cpp
index 52dd908..3524052 100644
--- a/src/cipher.cpp
+++ b/src/cipher.cpp
@@ -105,14 +105,14 @@ void AesIcmCipher::init(u_int16_t key_length)
case 192: algo = GCRY_CIPHER_AES192; break;
case 256: algo = GCRY_CIPHER_AES256; break;
default: {
- cLog.msg(Log::PRIO_CRIT) << "AesIcmCipher::AesIcmCipher: cipher key length of " << key_length << " Bits is not supported";
+ cLog.msg(Log::PRIO_ERROR) << "AesIcmCipher::AesIcmCipher: cipher key length of " << key_length << " Bits is not supported";
return;
}
}
gcry_error_t err = gcry_cipher_open(&handle_, algo, GCRY_CIPHER_MODE_CTR, 0);
if( err ) {
- cLog.msg(Log::PRIO_CRIT) << "AesIcmCipher::AesIcmCipher: Failed to open cipher" << AnytunGpgError(err);
+ cLog.msg(Log::PRIO_ERROR) << "AesIcmCipher::AesIcmCipher: Failed to open cipher" << AnytunGpgError(err);
}
#endif
}
@@ -168,13 +168,13 @@ void AesIcmCipher::calc(KeyDerivation& kd, u_int8_t* in, u_int32_t ilen, u_int8_
#ifdef USE_SSL_CRYPTO
int ret = AES_set_encrypt_key(key_.getBuf(), key_.getLength()*8, &aes_key_);
if(ret) {
- cLog.msg(Log::PRIO_ERR) << "AesIcmCipher: Failed to set cipher ssl key (code: " << ret << ")";
+ cLog.msg(Log::PRIO_ERROR) << "AesIcmCipher: Failed to set cipher ssl key (code: " << ret << ")";
return;
}
#else
gcry_error_t err = gcry_cipher_setkey(handle_, key_.getBuf(), key_.getLength());
if(err) {
- cLog.msg(Log::PRIO_ERR) << "AesIcmCipher: Failed to set cipher key: " << AnytunGpgError(err);
+ cLog.msg(Log::PRIO_ERROR) << "AesIcmCipher: Failed to set cipher key: " << AnytunGpgError(err);
return;
}
#endif
@@ -184,18 +184,18 @@ void AesIcmCipher::calc(KeyDerivation& kd, u_int8_t* in, u_int32_t ilen, u_int8_
#ifndef USE_SSL_CRYPTO
err = gcry_cipher_setctr(handle_, ctr_.buf_, CTR_LENGTH);
if(err) {
- cLog.msg(Log::PRIO_ERR) << "AesIcmCipher: Failed to set cipher CTR: " << AnytunGpgError(err);
+ cLog.msg(Log::PRIO_ERROR) << "AesIcmCipher: Failed to set cipher CTR: " << AnytunGpgError(err);
return;
}
err = gcry_cipher_encrypt(handle_, out, olen, in, ilen);
if(err) {
- cLog.msg(Log::PRIO_ERR) << "AesIcmCipher: Failed to de/encrypt packet: " << AnytunGpgError(err);
+ cLog.msg(Log::PRIO_ERROR) << "AesIcmCipher: Failed to de/encrypt packet: " << AnytunGpgError(err);
return;
}
#else
if(CTR_LENGTH != AES_BLOCK_SIZE) {
- cLog.msg(Log::PRIO_ERR) << "AesIcmCipher: Failed to set cipher CTR: size don't fits";
+ cLog.msg(Log::PRIO_ERROR) << "AesIcmCipher: Failed to set cipher CTR: size don't fits";
return;
}
unsigned int num = 0;