Make PK EC sign/verify actually restartable
diff --git a/library/ecdsa.c b/library/ecdsa.c
index e137a00..6730762 100644
--- a/library/ecdsa.c
+++ b/library/ecdsa.c
@@ -779,6 +779,9 @@
#if defined(MBEDTLS_ECDSA_DETERMINISTIC)
ctx->det = NULL;
#endif
+#if defined(MBEDTLS_PK_C)
+ ctx->ecdsa = NULL;
+#endif
}
/*
@@ -801,6 +804,12 @@
mbedtls_free( ctx->det );
ctx->det = NULL;
#endif
+
+#if defined(MBEDTLS_PK_C)
+ mbedtls_ecdsa_free( ctx->ecdsa );
+ mbedtls_free( ctx->ecdsa );
+ ctx->ecdsa = NULL;
+#endif
}
#endif /* MBEDTLS_ECP_RESTARTABLE */