Keep PK layer context in the PK layer

Previously we kept the ecdsa context created by the PK layer for ECDSA
operations on ECKEY in the ecdsa_restart_ctx structure, which was wrong, and
caused by the fact that we didn't have a proper handling of restart
sub-contexts in the PK layer.
This commit is contained in:
Manuel Pégourié-Gonnard 2017-08-18 17:04:07 +02:00
parent 0bbc66cc76
commit fe6877034d
3 changed files with 82 additions and 104 deletions

View file

@ -91,9 +91,6 @@ typedef struct
#if defined(MBEDTLS_ECDSA_DETERMINISTIC)
mbedtls_ecdsa_restart_det_ctx *det; /*!< ecdsa_sign_det() sub-context */
#endif
#if defined(MBEDTLS_PK_C)
mbedtls_ecdsa_context *ecdsa; /*!< used by the PK layer */
#endif
} mbedtls_ecdsa_restart_ctx;
#else /* MBEDTLS_ECP_RESTARTABLE */