Update corePKCS11 submodule pointer (#1208)

* Update corePKCS11 submodule pointer
* Fix corePKCS11 MQTT mutual authenticated demo
* Sync with other demo to wait for network up.
* Fix compiler warning.
This commit is contained in:
chinglee-iot
2024-04-16 14:11:57 +08:00
committed by GitHub
parent e6b4e8288f
commit 66b0b0a5a0
7 changed files with 30 additions and 14 deletions

View File

@@ -849,7 +849,7 @@ static int p11_ecdsa_check_pair( const void * pvPub,
};
unsigned char pucTestSignature[ MBEDTLS_ECDSA_MAX_SIG_LEN( 256 ) ] = { 0 };
size_t uxSigLen = 0;
lResult = p11_ecdsa_sign( pxMbedtlsPkCtx, MBEDTLS_MD_SHA256,
lResult = p11_ecdsa_sign( ( mbedtls_pk_context * ) pxMbedtlsPkCtx, MBEDTLS_MD_SHA256,
pucTestHash, sizeof( pucTestHash ),
pucTestSignature, sizeof( pucTestSignature ), &uxSigLen,
NULL, NULL );
@@ -883,7 +883,7 @@ static size_t p11_rsa_get_bitlen( const mbedtls_pk_context * pxMbedtlsPkCtx )
configASSERT( mbedtls_rsa_info.get_bitlen );
return mbedtls_rsa_info.get_bitlen( pxMbedtlsPkCtx );
return mbedtls_rsa_info.get_bitlen( ( mbedtls_pk_context * ) pxMbedtlsPkCtx );
}
/*-----------------------------------------------------------*/
@@ -1009,8 +1009,8 @@ static int p11_rsa_check_pair( const void * pvPub,
{
configASSERT( mbedtls_rsa_info.check_pair_func );
return mbedtls_rsa_info.check_pair_func( pvPub,
pxMbedtlsPkCtx,
return mbedtls_rsa_info.check_pair_func( ( void * ) pvPub,
( mbedtls_pk_context * ) pxMbedtlsPkCtx,
lFRng,
pvPRng );
}
@@ -1112,7 +1112,7 @@ static void p11_rsa_debug( const mbedtls_pk_context * pxMbedtlsPkCtx,
{
configASSERT( mbedtls_rsa_info.debug_func );
mbedtls_rsa_info.debug_func( pxMbedtlsPkCtx, pxItems );
mbedtls_rsa_info.debug_func( ( mbedtls_pk_context * ) pxMbedtlsPkCtx, pxItems );
}
/*-----------------------------------------------------------*/

View File

@@ -569,7 +569,7 @@ static CK_RV readCertificateIntoContext( SSLContext_t * pSslContext,
/* Get the handle of the certificate. */
xResult = xFindObjectWithLabelAndClass( pSslContext->xP11Session,
pcLabelName,
( char * ) pcLabelName,
strnlen( pcLabelName,
pkcs11configMAX_LABEL_LENGTH ),
xClass,
@@ -643,7 +643,6 @@ static CK_RV initializeClientKeys( SSLContext_t * pxCtx,
CK_RV xResult = CKR_OK;
CK_SLOT_ID * pxSlotIds = NULL;
CK_ULONG xCount = 0;
CK_ATTRIBUTE xTemplate[ 2 ];
mbedtls_pk_type_t xKeyAlgo = ( mbedtls_pk_type_t ) ~0;
/* Get the PKCS #11 module/token slot count. */
@@ -686,7 +685,7 @@ static CK_RV initializeClientKeys( SSLContext_t * pxCtx,
{
/* Get the handle of the device private key. */
xResult = xFindObjectWithLabelAndClass( pxCtx->xP11Session,
pcLabelName,
( char * ) pcLabelName,
strnlen( pcLabelName,
pkcs11configMAX_LABEL_LENGTH ),
CKO_PRIVATE_KEY,