Skip to content

Commit 24ae9c7

Browse files
do not force AES-CCM with FREERTOS and handle unsupported fsl algo
1 parent 5dabeb5 commit 24ae9c7

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

wolfcrypt/src/port/caam/wolfcaam_fsl_nxp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -849,8 +849,8 @@ int SynchronousSendRequest(int type, unsigned int args[4], CAAM_BUFFER *buf,
849849
#endif
850850

851851
default:
852-
WOLFSSL_MSG("Unknown/unsupported type");
853-
return -1;
852+
WOLFSSL_MSG("Unknown/unsupported type. Returning unavailable");
853+
return CRYPTOCB_UNAVAILABLE;
854854
}
855855

856856
if (ret != 0) {

wolfcrypt/src/port/caam/wolfcaam_init.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,11 @@ int wc_caamAddAndWait(CAAM_BUFFER* buf, int sz, word32 arg[4], word32 type)
501501
return RAN_BLOCK_E;
502502
}
503503

504+
if (ret == CRYPTOCB_UNAVAILABLE) {
505+
WOLFSSL_MSG("Driver does not support requested operation");
506+
return ret;
507+
}
508+
504509
if (ret == ResourceNotAvailable) {
505510
WOLFSSL_MSG("Waiting on CAAM driver");
506511
return WC_HW_WAIT_E;

wolfssl/wolfcrypt/settings.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1863,8 +1863,6 @@ extern void uITRON4_free(void *p) ;
18631863
#define HAVE_ECC
18641864
#endif
18651865
#ifndef NO_AES
1866-
#undef HAVE_AESCCM
1867-
#define HAVE_AESCCM
18681866
#undef HAVE_AESGCM
18691867
#define HAVE_AESGCM
18701868
#undef WOLFSSL_AES_COUNTER

0 commit comments

Comments
 (0)