summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/auth_algo.c6
-rw-r--r--src/cipher.c10
-rw-r--r--src/key_derivation.c10
-rw-r--r--src/uanytun.c4
4 files changed, 15 insertions, 15 deletions
diff --git a/src/auth_algo.c b/src/auth_algo.c
index 31a92bf..19422e0 100644
--- a/src/auth_algo.c
+++ b/src/auth_algo.c
@@ -134,7 +134,7 @@ int auth_algo_sha1_init(auth_algo_t* aa)
gcry_error_t err = gcry_md_open(&aa->handle_, GCRY_MD_SHA1, GCRY_MD_FLAG_HMAC);
if(err) {
- log_printf(ERR, "failed to open message digest algo: %s/%s", gcry_strerror(err), gcry_strsource(err));
+ log_printf(ERR, "failed to open message digest algo: %s", gcry_strerror(err));
return -1;
}
@@ -168,7 +168,7 @@ void auth_algo_sha1_generate(auth_algo_t* aa, key_derivation_t* kd, encrypted_pa
if(ret) { // a new key got generated
gcry_error_t err = gcry_md_setkey(aa->handle_, aa->key_.buf_, aa->key_.length_);
if(err) {
- log_printf(ERR, "failed to set hmac key: %s/%s", gcry_strerror(err), gcry_strsource(err));
+ log_printf(ERR, "failed to set hmac key: %s", gcry_strerror(err));
return;
}
}
@@ -207,7 +207,7 @@ int auth_algo_sha1_check_tag(auth_algo_t* aa, key_derivation_t* kd, encrypted_pa
if(ret) { // a new key got generated
gcry_error_t err = gcry_md_setkey(aa->handle_, aa->key_.buf_, aa->key_.length_);
if(err) {
- log_printf(ERR, "failed to set hmac key: %s/%s", gcry_strerror(err), gcry_strsource(err));
+ log_printf(ERR, "failed to set hmac key: %s", gcry_strerror(err));
return;
}
}
diff --git a/src/cipher.c b/src/cipher.c
index e35e4db..a90c267 100644
--- a/src/cipher.c
+++ b/src/cipher.c
@@ -224,7 +224,7 @@ int cipher_aesctr_init(cipher_t* c)
gcry_error_t err = gcry_cipher_open(&params->handle_, algo, GCRY_CIPHER_MODE_CTR, 0);
if(err) {
- log_printf(ERR, "failed to open cipher: %s/%s", gcry_strerror(err), gcry_strsource(err));
+ log_printf(ERR, "failed to open cipher: %s", gcry_strerror(err));
return -1;
}
@@ -301,14 +301,14 @@ int32_t cipher_aesctr_crypt(cipher_t* c, key_derivation_t* kd, u_int8_t* in, u_i
if(ret) { // a new key got generated
err = gcry_cipher_setkey(params->handle_, c->key_.buf_, c->key_.length_);
if(err) {
- log_printf(ERR, "failed to set cipher key: %s/%s", gcry_strerror(err), gcry_strsource(err));
+ log_printf(ERR, "failed to set cipher key: %s", gcry_strerror(err));
return -1;
}
} // no new key got generated
else {
err = gcry_cipher_reset(params->handle_);
if(err) {
- log_printf(ERR, "failed to reset cipher: %s/%s", gcry_strerror(err), gcry_strsource(err));
+ log_printf(ERR, "failed to reset cipher: %s", gcry_strerror(err));
return -1;
}
}
@@ -321,13 +321,13 @@ int32_t cipher_aesctr_crypt(cipher_t* c, key_derivation_t* kd, u_int8_t* in, u_i
err = gcry_cipher_setctr(params->handle_, params->ctr_.buf_, C_AESCTR_CTR_LENGTH);
if(err) {
- log_printf(ERR, "failed to set cipher CTR: %s/%s", gcry_strerror(err), gcry_strsource(err));
+ log_printf(ERR, "failed to set cipher CTR: %s", gcry_strerror(err));
return -1;
}
err = gcry_cipher_encrypt(params->handle_, out, olen, in, ilen);
if(err) {
- log_printf(ERR, "failed to de/encrypt packet: %s/%s", gcry_strerror(err), gcry_strsource(err));
+ log_printf(ERR, "failed to de/encrypt packet: %s", gcry_strerror(err));
return -1;
}
diff --git a/src/key_derivation.c b/src/key_derivation.c
index 19cd1b1..51431dd 100644
--- a/src/key_derivation.c
+++ b/src/key_derivation.c
@@ -185,13 +185,13 @@ int key_derivation_aesctr_init(key_derivation_t* kd)
gcry_error_t err = gcry_cipher_open(&params->handle_, algo, GCRY_CIPHER_MODE_CTR, 0);
if(err) {
- log_printf(ERR, "failed to open key derivation cipher: %s/%s", gcry_strerror(err), gcry_strsource(err));
+ log_printf(ERR, "failed to open key derivation cipher: %s", gcry_strerror(err));
return -1;
}
err = gcry_cipher_setkey(params->handle_, kd->master_key_.buf_, kd->master_key_.length_);
if(err) {
- log_printf(ERR, "failed to set key derivation key: %s/%s", gcry_strerror(err), gcry_strsource(err));
+ log_printf(ERR, "failed to set key derivation key: %s", gcry_strerror(err));
return -1;
}
@@ -281,21 +281,21 @@ int key_derivation_aesctr_generate(key_derivation_t* kd, satp_prf_label_t label,
gcry_error_t err = gcry_cipher_reset(params->handle_);
if(err) {
- log_printf(ERR, "failed to reset key derivation cipher: %s/%s", gcry_strerror(err), gcry_strsource(err));
+ log_printf(ERR, "failed to reset key derivation cipher: %s", gcry_strerror(err));
return -1;
}
err = gcry_cipher_setctr(params->handle_, params->ctr_.buf_, KD_AESCTR_CTR_LENGTH);
if(err) {
- log_printf(ERR, "failed to set key derivation CTR: %s/%s", gcry_strerror(err), gcry_strsource(err));
+ log_printf(ERR, "failed to set key derivation CTR: %s", gcry_strerror(err));
return -1;
}
memset(key, 0, len);
err = gcry_cipher_encrypt(params->handle_, key, len, NULL, 0);
if(err) {
- log_printf(ERR, "failed to generate key derivation bitstream: %s/%s", gcry_strerror(err), gcry_strsource(err));
+ log_printf(ERR, "failed to generate key derivation bitstream: %s", gcry_strerror(err));
return -1;
}
diff --git a/src/uanytun.c b/src/uanytun.c
index 14e0ab5..1181689 100644
--- a/src/uanytun.c
+++ b/src/uanytun.c
@@ -76,13 +76,13 @@ int init_libgcrypt()
gcry_error_t err = gcry_control(GCRYCTL_DISABLE_SECMEM, 0);
if(err) {
- log_printf(ERR, "failed to disable secure memory: %s/%s", gcry_strerror(err), gcry_strsource(err));
+ log_printf(ERR, "failed to disable secure memory: %s", gcry_strerror(err));
return -1;
}
err = gcry_control(GCRYCTL_INITIALIZATION_FINISHED);
if(err) {
- log_printf(ERR, "failed to finish libgcrypt initialization: %s/%s", gcry_strerror(err), gcry_strsource(err));
+ log_printf(ERR, "failed to finish libgcrypt initialization: %s", gcry_strerror(err));
return -1;
}