Add 3DES support.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos 2024-03-25 13:25:29 +01:00
parent c0652ba1f7
commit 3d0a27c834
No known key found for this signature in database
GPG key ID: C0095B7870A4CCD3
3 changed files with 10 additions and 10 deletions

View file

@ -2247,7 +2247,7 @@
* \warning DES is considered a weak cipher and its use constitutes a * \warning DES is considered a weak cipher and its use constitutes a
* security risk. We recommend considering stronger ciphers instead. * security risk. We recommend considering stronger ciphers instead.
*/ */
//#define MBEDTLS_DES_C #define MBEDTLS_DES_C
/** /**
* \def MBEDTLS_DHM_C * \def MBEDTLS_DHM_C

View file

@ -119,6 +119,7 @@ set(EXTERNAL_SOURCES
${CMAKE_CURRENT_LIST_DIR}/mbedtls/library/chacha20.c ${CMAKE_CURRENT_LIST_DIR}/mbedtls/library/chacha20.c
${CMAKE_CURRENT_LIST_DIR}/mbedtls/library/poly1305.c ${CMAKE_CURRENT_LIST_DIR}/mbedtls/library/poly1305.c
${CMAKE_CURRENT_LIST_DIR}/mbedtls/library/ripemd160.c ${CMAKE_CURRENT_LIST_DIR}/mbedtls/library/ripemd160.c
${CMAKE_CURRENT_LIST_DIR}/mbedtls/library/des.c
) )
set(SOURCES ${SOURCES} set(SOURCES ${SOURCES}
@ -208,7 +209,7 @@ if (ENABLE_EMULATION)
) )
endif() endif()
add_definitions(-DENABLE_EMULATION) add_definitions(-DENABLE_EMULATION)
set(SOURCES ${SOURCES} set(SOURCES ${SOURCES}
${CMAKE_CURRENT_LIST_DIR}/src/usb/emulation/emulation.c ${CMAKE_CURRENT_LIST_DIR}/src/usb/emulation/emulation.c
) )
set(EXTERNAL_SOURCES ${EXTERNAL_SOURCES} set(EXTERNAL_SOURCES ${EXTERNAL_SOURCES}
@ -238,7 +239,7 @@ else()
) )
endif() endif()
if (MSVC) if (MSVC)
target_compile_options(pico_hsm PUBLIC target_compile_options(pico_hsm PUBLIC
-wd4820 -wd4820
-wd4255 -wd4255
-wd5045 -wd5045
@ -246,14 +247,14 @@ if (MSVC)
-wd4061 -wd4061
-wd5105 -wd5105
) )
add_compile_definitions(_CRT_SECURE_NO_WARNINGS add_compile_definitions(_CRT_SECURE_NO_WARNINGS
__STDC_WANT_SECURE_LIB__=0 __STDC_WANT_SECURE_LIB__=0
_WIN32_WINNT_WIN10_TH2=0 _WIN32_WINNT_WIN10_TH2=0
_WIN32_WINNT_WIN10_RS1=0 _WIN32_WINNT_WIN10_RS1=0
_WIN32_WINNT_WIN10_RS2=0 _WIN32_WINNT_WIN10_RS2=0
_WIN32_WINNT_WIN10_RS3=0 _WIN32_WINNT_WIN10_RS3=0
_WIN32_WINNT_WIN10_RS4=0 _WIN32_WINNT_WIN10_RS4=0
_WIN32_WINNT_WIN10_RS5=0 _WIN32_WINNT_WIN10_RS5=0
_STRALIGN_USE_SECURE_CRT=0 _STRALIGN_USE_SECURE_CRT=0
NTDDI_WIN10_CU=0) NTDDI_WIN10_CU=0)
set_source_files_properties( set_source_files_properties(

View file

@ -240,7 +240,6 @@ bool driver_mounted_ccid(uint8_t itf) {
void driver_exec_timeout_ccid(uint8_t itf) { void driver_exec_timeout_ccid(uint8_t itf) {
ccid_header[itf] = (struct ccid_header *) usb_get_rx(itf); ccid_header[itf] = (struct ccid_header *) usb_get_rx(itf);
ccid_response[itf] = (struct ccid_header *) (usb_get_tx(itf)); ccid_response[itf] = (struct ccid_header *) (usb_get_tx(itf));
printf("CCUD_RESPONSE [itf=%d] %p %p\n", itf, ccid_response[itf], usb_get_tx(itf));
ccid_response[itf]->bMessageType = CCID_DATA_BLOCK_RET; ccid_response[itf]->bMessageType = CCID_DATA_BLOCK_RET;
ccid_response[itf]->dwLength = 0; ccid_response[itf]->dwLength = 0;
ccid_response[itf]->bSlot = 0; ccid_response[itf]->bSlot = 0;