Skip to content

Commit 6a1ab73

Browse files
authored
Merge pull request #10770 from Patater/update-to-mbedcrypto-1.1.0d1
mbed-crypto: Update to Mbed Crypto 1.1.0d1
2 parents 489bd10 + 9676edd commit 6a1ab73

File tree

4 files changed

+27
-2
lines changed

4 files changed

+27
-2
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
mbedcrypto-1.1.0d0
1+
mbedcrypto-1.1.0d1

features/mbedtls/mbed-crypto/importer/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
# Set the Mbed Crypto release to import (this can/should be edited before
3131
# import)
32-
CRYPTO_RELEASE ?= mbedcrypto-1.1.0d0
32+
CRYPTO_RELEASE ?= mbedcrypto-1.1.0d1
3333
CRYPTO_REPO_URL ?= [email protected]:ARMmbed/mbed-crypto.git
3434

3535
# Translate between Mbed Crypto namespace and Mbed OS namespace

features/mbedtls/mbed-crypto/platform/TARGET_PSA/COMPONENT_PSA_SRV_IMPL/psa_crypto.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4639,6 +4639,15 @@ psa_status_t psa_crypto_init( void )
46394639

46404640
/* Initialize the random generator. */
46414641
global_data.entropy_init( &global_data.entropy );
4642+
#if defined(MBEDTLS_PSA_INJECT_ENTROPY) && \
4643+
defined(MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES)
4644+
/* The PSA entropy injection feature depends on using NV seed as an entropy
4645+
* source. Add NV seed as an entropy source for PSA entropy injection. */
4646+
mbedtls_entropy_add_source( &global_data.entropy,
4647+
mbedtls_nv_seed_poll, NULL,
4648+
MBEDTLS_ENTROPY_BLOCK_SIZE,
4649+
MBEDTLS_ENTROPY_SOURCE_STRONG );
4650+
#endif
46424651
mbedtls_ctr_drbg_init( &global_data.ctr_drbg );
46434652
global_data.rng_state = RNG_INITIALIZED;
46444653
status = mbedtls_to_psa_error(

features/mbedtls/mbed-crypto/src/dhm.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,12 +649,28 @@ int mbedtls_dhm_parse_dhmfile( mbedtls_dhm_context *dhm, const char *path )
649649

650650
#if defined(MBEDTLS_SELF_TEST)
651651

652+
#if defined(MBEDTLS_PEM_PARSE_C)
652653
static const char mbedtls_test_dhm_params[] =
653654
"-----BEGIN DH PARAMETERS-----\r\n"
654655
"MIGHAoGBAJ419DBEOgmQTzo5qXl5fQcN9TN455wkOL7052HzxxRVMyhYmwQcgJvh\r\n"
655656
"1sa18fyfR9OiVEMYglOpkqVoGLN7qd5aQNNi5W7/C+VBdHTBJcGZJyyP5B3qcz32\r\n"
656657
"9mLJKudlVudV0Qxk5qUJaPZ/xupz0NyoVpviuiBOI1gNi8ovSXWzAgEC\r\n"
657658
"-----END DH PARAMETERS-----\r\n";
659+
#else /* MBEDTLS_PEM_PARSE_C */
660+
static const char mbedtls_test_dhm_params[] = {
661+
0x30, 0x81, 0x87, 0x02, 0x81, 0x81, 0x00, 0x9e, 0x35, 0xf4, 0x30, 0x44,
662+
0x3a, 0x09, 0x90, 0x4f, 0x3a, 0x39, 0xa9, 0x79, 0x79, 0x7d, 0x07, 0x0d,
663+
0xf5, 0x33, 0x78, 0xe7, 0x9c, 0x24, 0x38, 0xbe, 0xf4, 0xe7, 0x61, 0xf3,
664+
0xc7, 0x14, 0x55, 0x33, 0x28, 0x58, 0x9b, 0x04, 0x1c, 0x80, 0x9b, 0xe1,
665+
0xd6, 0xc6, 0xb5, 0xf1, 0xfc, 0x9f, 0x47, 0xd3, 0xa2, 0x54, 0x43, 0x18,
666+
0x82, 0x53, 0xa9, 0x92, 0xa5, 0x68, 0x18, 0xb3, 0x7b, 0xa9, 0xde, 0x5a,
667+
0x40, 0xd3, 0x62, 0xe5, 0x6e, 0xff, 0x0b, 0xe5, 0x41, 0x74, 0x74, 0xc1,
668+
0x25, 0xc1, 0x99, 0x27, 0x2c, 0x8f, 0xe4, 0x1d, 0xea, 0x73, 0x3d, 0xf6,
669+
0xf6, 0x62, 0xc9, 0x2a, 0xe7, 0x65, 0x56, 0xe7, 0x55, 0xd1, 0x0c, 0x64,
670+
0xe6, 0xa5, 0x09, 0x68, 0xf6, 0x7f, 0xc6, 0xea, 0x73, 0xd0, 0xdc, 0xa8,
671+
0x56, 0x9b, 0xe2, 0xba, 0x20, 0x4e, 0x23, 0x58, 0x0d, 0x8b, 0xca, 0x2f,
672+
0x49, 0x75, 0xb3, 0x02, 0x01, 0x02 };
673+
#endif /* MBEDTLS_PEM_PARSE_C */
658674

659675
static const size_t mbedtls_test_dhm_params_len = sizeof( mbedtls_test_dhm_params );
660676

0 commit comments

Comments
 (0)