Skip to content

Commit

Permalink
[mbedts] revert previous changes
Browse files Browse the repository at this point in the history
TBD..

Signed-off-by: Łukasz Duda <[email protected]>
  • Loading branch information
LuDuda committed May 21, 2024
1 parent 07a9495 commit b1d04bb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions third_party/mbedtls/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ if(UNIFDEF_EXE)
endif()
find_program(SED_EXE sed)

#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-but-set-variable")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-but-set-variable")

string(REPLACE "-Wconversion" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
string(REPLACE "-Wconversion" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
Expand Down Expand Up @@ -92,7 +92,7 @@ else()
configure_file(psa-crypto-config.h openthread-psa-crypto-config.h COPYONLY)
endif()

target_include_directories(ot-config
target_include_directories(ot-config SYSTEM
INTERFACE
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/repo/include)
Expand Down
2 changes: 1 addition & 1 deletion third_party/mbedtls/repo/include/psa/crypto_struct.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ static inline struct psa_key_derivation_s psa_key_derivation_operation_init(
struct psa_key_production_parameters_s {
/* Future versions may add other fields in this structure. */
uint32_t flags;
uint8_t *data;
uint8_t data[];
};

/** The default production parameters for key generation or key derivation.
Expand Down
5 changes: 1 addition & 4 deletions third_party/mbedtls/repo/library/pk.c
Original file line number Diff line number Diff line change
Expand Up @@ -868,9 +868,7 @@ static int copy_from_psa(mbedtls_svc_key_id_t key_id,
psa_status_t status;
psa_key_attributes_t key_attr = PSA_KEY_ATTRIBUTES_INIT;
psa_key_type_t key_type;
#if defined(MBEDTLS_RSA_C)
psa_algorithm_t alg_type;
#endif
size_t key_bits;
/* Use a buffer size large enough to contain either a key pair or public key. */
unsigned char exp_key[PSA_EXPORT_KEY_PAIR_OR_PUBLIC_MAX_SIZE];
Expand Down Expand Up @@ -901,10 +899,9 @@ static int copy_from_psa(mbedtls_svc_key_id_t key_id,
key_type = PSA_KEY_TYPE_PUBLIC_KEY_OF_KEY_PAIR(key_type);
}
key_bits = psa_get_key_bits(&key_attr);

#if defined(MBEDTLS_RSA_C)
alg_type = psa_get_key_algorithm(&key_attr);

#if defined(MBEDTLS_RSA_C)
if ((key_type == PSA_KEY_TYPE_RSA_KEY_PAIR) ||
(key_type == PSA_KEY_TYPE_RSA_PUBLIC_KEY)) {

Expand Down

0 comments on commit b1d04bb

Please sign in to comment.