diff --git a/library/pkparse.c b/library/pkparse.c index dbef18a3e..fce5ad70a 100644 --- a/library/pkparse.c +++ b/library/pkparse.c @@ -978,7 +978,14 @@ static int pk_parse_key_sec1_der( mbedtls_uecc_keypair *keypair, } } - //TODO: Do we need to support derived public keys with uecc? + if( !pubkey_done ) + { + ret = uECC_compute_public_key( keypair->private_key, + keypair->public_key, + uECC_secp256r1() ); + if( ret == 0 ) + return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT ); + } return( 0 ); }