Skip to content

Commit

Permalink
Update for primary commit #2 (to be squashed later)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdeep1 committed Nov 3, 2022
1 parent f7cc91b commit 4c3fb25
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion man/coap_pdu_setup.txt.in
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ See

"https://tools.ietf.org/html/rfc7959[RFC7959: Block-Wise Transfers in the Constrained Application Protocol (CoAP)]"

https://tools.ietf.org/html/rfc8613[RFC8613: Object Security for Constrained RESTful Environments (OSCORE)]"
"https://tools.ietf.org/html/rfc8613[RFC8613: Object Security for Constrained RESTful Environments (OSCORE)]"

"https://tools.ietf.org/html/rfc9175[RFC9175: CoAP: Echo, Request-Tag, and Token Processing]"

Expand Down
5 changes: 2 additions & 3 deletions src/coap_openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -3659,11 +3659,10 @@ coap_crypto_output_errors(const char *prefix) {

while ((e = ERR_get_error()))
coap_log(LOG_WARNING,
"%s: %s at %s:%s\n",
"%s: %s%s\n",
prefix,
ERR_reason_error_string(e),
ERR_lib_error_string(e),
ERR_func_error_string(e));
ssl_function_definition(e));
}

int
Expand Down
9 changes: 6 additions & 3 deletions src/coap_oscore.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,8 @@ coap_oscore_new_pdu_encrypted(coap_session_t *session,
if (coap_check_option(pdu, COAP_OPTION_OBSERVE, &opt_iter))
doing_observe = 1;

coap_show_pdu(COAP_LOG_OSCORE, pdu);
coap_log(LOG_DEBUG, "PDU to encrypt\n");
coap_show_pdu(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 @@ -790,7 +791,8 @@ coap_oscore_decrypt_pdu(coap_session_t *session,
if (opt == NULL)
return NULL;

coap_show_pdu(COAP_LOG_OSCORE, pdu);
coap_log(LOG_DEBUG, "PDU to decrypt\n");
coap_show_pdu(LOG_DEBUG, pdu);
if (session->context->p_osc_ctx == NULL) {
coap_log(LOG_WARNING, "OSCORE: Not enabled\n");
if (!coap_request)
Expand Down Expand Up @@ -1542,7 +1544,8 @@ coap_oscore_decrypt_pdu(coap_session_t *session,
session->con_active--;
if (sent_pdu) {
coap_send_ack(session, pdu);
coap_show_pdu(COAP_LOG_OSCORE, decrypt_pdu);
coap_log(LOG_DEBUG, "PDU requesting re-transmit\n");
coap_show_pdu(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

0 comments on commit 4c3fb25

Please sign in to comment.