From 71b84f550c74bc6d65d0887fb3bdeb1b8bb4df51 Mon Sep 17 00:00:00 2001 From: Jon Shallow Date: Thu, 15 Jun 2023 18:52:33 +0100 Subject: [PATCH] OSCORE: Fix logging entries --- src/coap_oscore.c | 4 ++-- src/oscore/oscore_context.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/coap_oscore.c b/src/coap_oscore.c index 588c7bca..6b35ff1d 100644 --- a/src/coap_oscore.c +++ b/src/coap_oscore.c @@ -1213,7 +1213,7 @@ coap_oscore_decrypt_pdu(coap_session_t *session, cose_encrypt0_set_nonce(cose, &nonce); } #ifdef OSCORE_EXTRA_DEBUG - dump_cose(cose, "!req post nonce"); + dump_cose(cose, "!req post set nonce"); #endif /* OSCORE_EXTRA_DEBUG */ /* * 8.4 Step 3. @@ -1265,7 +1265,7 @@ coap_oscore_decrypt_pdu(coap_session_t *session, assert(aad.length < AAD_BUF_LEN); cose_encrypt0_set_aad(cose, &aad); #ifdef OSCORE_EXTRA_DEBUG - dump_cose(cose, "!req pre nonce"); + dump_cose(cose, "!req post set aad"); #endif /* OSCORE_EXTRA_DEBUG */ } diff --git a/src/oscore/oscore_context.c b/src/oscore/oscore_context.c index 7f2d8e70..ddd41a2a 100644 --- a/src/oscore/oscore_context.c +++ b/src/oscore/oscore_context.c @@ -339,10 +339,10 @@ oscore_build_key(oscore_ctx_t *osc_ctx, static void oscore_log_context(oscore_ctx_t *osc_ctx, const char *heading) { -#if COAP_MAX_LOG_LEVEL < _COAP_LOG_OSCORE +#if COAP_MAX_LOGGING_LEVEL < _COAP_LOG_OSCORE (void)osc_ctx; (void)heading; -#else /* COAP_MAX_LOG_LEVEL >= _COAP_LOG_OSCORE */ +#else /* COAP_MAX_LOGGING_LEVEL >= _COAP_LOG_OSCORE */ if (coap_get_log_level() >= COAP_LOG_OSCORE) { char buffer[30]; oscore_recipient_ctx_t *next = osc_ctx->recipient_chain; @@ -380,7 +380,7 @@ oscore_log_context(oscore_ctx_t *osc_ctx, const char *heading) { next = next->next_recipient; } } -#endif /* COAP_MAX_LOG_LEVEL >= _COAP_LOG_OSCORE */ +#endif /* COAP_MAX_LOGGING_LEVEL >= _COAP_LOG_OSCORE */ } void