Skip to content

Commit

Permalink
Update for primary commit #10 (to be squashed later)
Browse files Browse the repository at this point in the history
Update LOG_ to COAP__LOG_
  • Loading branch information
mrdeep1 committed Dec 17, 2022
1 parent 703ffbf commit 1a16f28
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions man/coap_oscore.txt.in
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ setup_client_session (struct in_addr ip_address) {
/* Try creating it */
oscore_seq_num_fp = fopen(oscore_seq_save_file, "w+");
if (oscore_seq_num_fp == NULL) {
coap_log(LOG_ERR, "OSCORE save restart info file error: %s\n",
coap_log(COAP_LOG_ERR, "OSCORE save restart info file error: %s\n",
oscore_seq_save_file);
return NULL;
}
Expand Down Expand Up @@ -349,7 +349,7 @@ setup_context (void) {
/* Try creating it */
oscore_seq_num_fp = fopen(oscore_seq_save_file, "w+");
if (oscore_seq_num_fp == NULL) {
coap_log(LOG_ERR, "OSCORE save restart info file error: %s\n",
coap_log(COAP_LOG_ERR, "OSCORE save restart info file error: %s\n",
oscore_seq_save_file);
return 0;
}
Expand Down
4 changes: 2 additions & 2 deletions src/coap_oscore.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ coap_oscore_new_pdu_encrypted(coap_session_t *session,
doing_observe = 1;

coap_log_debug("PDU to encrypt\n");
coap_show_pdu(LOG_DEBUG, pdu);
coap_show_pdu(COAP_LOG_DEBUG, pdu);
osc_pdu = coap_pdu_init(pdu->type == COAP_MESSAGE_NON &&
session->b_2_step != COAP_OSCORE_B_2_NONE ?
COAP_MESSAGE_CON : pdu->type,
Expand Down Expand Up @@ -1548,7 +1548,7 @@ coap_oscore_decrypt_pdu(coap_session_t *session,
if (sent_pdu) {
coap_send_ack(session, pdu);
coap_log_debug("PDU requesting re-transmit\n");
coap_show_pdu(LOG_DEBUG, decrypt_pdu);
coap_show_pdu(COAP_LOG_DEBUG, decrypt_pdu);
coap_log_oscore("RFC9175 retransmit pdu\n");
if (coap_retransmit_oscore_pdu(session, sent_pdu, opt) ==
COAP_INVALID_MID)
Expand Down
2 changes: 1 addition & 1 deletion src/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -3357,7 +3357,7 @@ coap_dispatch(coap_context_t *context, coap_session_t *session,
pdu = dec_pdu;
}
coap_log_debug("Decrypted PDU\n");
coap_show_pdu(LOG_DEBUG, pdu);
coap_show_pdu(COAP_LOG_DEBUG, pdu);
}
}
#endif /* HAVE_OSCORE */
Expand Down
2 changes: 1 addition & 1 deletion src/oscore/oscore.c
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ oscore_validate_sender_seq(oscore_recipient_ctx_t *ctx, cose_encrypt0_t *cose) {

if (shift > ctx->osc_ctx->replay_window_size || shift > 63) {
coap_log(
LOG_WARNING,
COAP_LOG_WARN,
"OSCORE: Replay protection, SEQ outside of replay window (%lu %lu)\n",
ctx->last_seq,
incoming_seq);
Expand Down

0 comments on commit 1a16f28

Please sign in to comment.