File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed
subsys/net/lib/nrf_provisioning/src
tests/subsys/net/lib/nrf_provisioning/src Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -436,16 +436,16 @@ static int response_code_to_error(int code)
436436{
437437 switch (code ) {
438438 case COAP_RESPONSE_CODE_UNAUTHORIZED :
439- LOG_ERR ("Device didn't send auth credentials " );
439+ LOG_ERR ("Device not authorized " );
440440 return - EACCES ;
441441 case COAP_RESPONSE_CODE_FORBIDDEN :
442442 LOG_ERR ("Device provided wrong auth credentials" );
443- return - EACCES ;
443+ return - EPERM ;
444444 case COAP_RESPONSE_CODE_BAD_REQUEST :
445445 LOG_ERR ("Bad request" );
446446 return - EINVAL ;
447447 case COAP_RESPONSE_CODE_NOT_ACCEPTABLE :
448- LOG_ERR ("Not acceptable " );
448+ LOG_ERR ("Invalid Accept Headers " );
449449 return - EINVAL ;
450450 case COAP_RESPONSE_CODE_NOT_FOUND :
451451 LOG_ERR ("Resource not found" );
Original file line number Diff line number Diff line change @@ -309,11 +309,11 @@ static int status_code_to_error(int status_code)
309309 LOG_ERR ("Bad request" );
310310 return - EINVAL ;
311311 case NRF_PROVISIONING_HTTP_STATUS_UNAUTH :
312- LOG_ERR ("Device didn't send auth credentials " );
312+ LOG_ERR ("Device not authorized " );
313313 return - EACCES ;
314314 case NRF_PROVISIONING_HTTP_STATUS_FORBIDDEN :
315315 LOG_ERR ("Device provided wrong auth credentials" );
316- return - EACCES ;
316+ return - EPERM ;
317317 case NRF_PROVISIONING_HTTP_STATUS_UNS_MEDIA_TYPE :
318318 LOG_ERR ("Unsupported content format" );
319319 return - ENOMSG ;
Original file line number Diff line number Diff line change @@ -484,7 +484,7 @@ void test_coap_auth_failed(void)
484484
485485 int ret = nrf_provisioning_coap_req (& coap_ctx );
486486
487- TEST_ASSERT_EQUAL_INT (- EACCES , ret );
487+ TEST_ASSERT_EQUAL_INT (- EPERM , ret );
488488}
489489
490490/*
Original file line number Diff line number Diff line change @@ -168,7 +168,7 @@ static int rest_client_request_not_found_cb(struct rest_client_req_context *req_
168168 struct rest_client_resp_context * resp_ctx ,
169169 int cmock_num_calls )
170170{
171- resp_ctx -> http_status_code = NRF_PROVISIONING_HTTP_STATUS_FORBIDDEN ;
171+ resp_ctx -> http_status_code = NRF_PROVISIONING_HTTP_STATUS_UNAUTH ;
172172 return 0 ;
173173}
174174
@@ -265,7 +265,7 @@ void test_provisioning_init_should_start_provisioning(void)
265265 wait_for_provisioning_event (NRF_PROVISIONING_EVENT_START );
266266
267267 /* Test different scenarios in rotation */
268- int scenario = i % 6 ;
268+ int scenario = i % 7 ;
269269
270270 switch (scenario ) {
271271 case 0 : /* No commands from server */
You can’t perform that action at this time.
0 commit comments