summaryrefslogtreecommitdiffstats
path: root/src/plugins/ikev2/ikev2_crypto.c
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2019-10-20 10:38:13 +0000
committerDamjan Marion <dmarion@me.com>2020-02-10 11:57:37 +0000
commit8ebcb7a99d7b73a1ee5874780b4efdc69d32c82f (patch)
treef8f70ca32bf025dce498f88d1ec904790e0f86f4 /src/plugins/ikev2/ikev2_crypto.c
parent14b804898a5e5b9ec5029d3466621178b85af925 (diff)
ikev2: better logging
Type: refactor Change-Id: Iedcb24684c54f4d78583ab3aa3db1097e73df248 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'src/plugins/ikev2/ikev2_crypto.c')
-rw-r--r--src/plugins/ikev2/ikev2_crypto.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/plugins/ikev2/ikev2_crypto.c b/src/plugins/ikev2/ikev2_crypto.c
index 49629a5dab5..26ff43387e7 100644
--- a/src/plugins/ikev2/ikev2_crypto.c
+++ b/src/plugins/ikev2/ikev2_crypto.c
@@ -342,11 +342,11 @@ ikev2_calc_integr (ikev2_sa_transform_t * tr, v8 * key, u8 * data, int len)
if (tr->md == EVP_sha1 ())
{
- clib_warning ("integrity checking with sha1");
+ ikev2_elog_debug ("integrity checking with sha1");
}
else if (tr->md == EVP_sha256 ())
{
- clib_warning ("integrity checking with sha256");
+ ikev2_elog_debug ("integrity checking with sha256");
}
/* verify integrity of data */
@@ -389,7 +389,7 @@ ikev2_decrypt_data (ikev2_sa_t * sa, u8 * data, int len)
/* check if data is multiplier of cipher block size */
if (len % block_size)
{
- clib_warning ("wrong data length");
+ ikev2_elog_error ("wrong data length");
return 0;
}
@@ -772,7 +772,7 @@ ikev2_load_cert_file (u8 * file)
fp = fopen ((char *) file, "r");
if (!fp)
{
- clib_warning ("open %s failed", file);
+ ikev2_log_error ("open %s failed", file);
goto end;
}
@@ -780,13 +780,13 @@ ikev2_load_cert_file (u8 * file)
fclose (fp);
if (x509 == NULL)
{
- clib_warning ("read cert %s failed", file);
+ ikev2_log_error ("read cert %s failed", file);
goto end;
}
pkey = X509_get_pubkey (x509);
if (pkey == NULL)
- clib_warning ("get pubkey %s failed", file);
+ ikev2_log_error ("get pubkey %s failed", file);
end:
return pkey;
@@ -801,14 +801,14 @@ ikev2_load_key_file (u8 * file)
fp = fopen ((char *) file, "r");
if (!fp)
{
- clib_warning ("open %s failed", file);
+ ikev2_log_error ("open %s failed", file);
goto end;
}
pkey = PEM_read_PrivateKey (fp, NULL, NULL, NULL);
fclose (fp);
if (pkey == NULL)
- clib_warning ("read %s failed", file);
+ ikev2_log_error ("read %s failed", file);
end:
return pkey;