Fix warnings (enum value missing from switch/case)
diff --git a/library/pk.c b/library/pk.c
index 6762c75..3ea600a 100644
--- a/library/pk.c
+++ b/library/pk.c
@@ -33,6 +33,9 @@
#if defined(POLARSSL_ECP_C)
#include "polarssl/ecp.h"
#endif
+#if defined(POLARSSL_ECDSA_C)
+#include "polarssl/ecdsa.h"
+#endif
#include <stdlib.h>
@@ -74,6 +77,12 @@
ecp_keypair_free( ctx->data );
break;
#endif
+
+#if defined(POLARSSL_ECDSA_C)
+ case POLARSSL_PK_ECDSA:
+ ecdsa_free( ctx->data );
+ break;
+#endif
}
if( ! ctx->dont_free )
@@ -111,8 +120,14 @@
break;
#endif
+#if defined(POLARSSL_ECDSA_C)
+ case POLARSSL_PK_ECDSA:
+ size = sizeof( ecdsa_context );
+ break;
+#endif
+
case POLARSSL_PK_NONE:
- ; /* Cannot happen, but the cmpiler doesn't know */
+ ; /* Cannot happen, but the compiler doesn't know */
}
if( ( ctx->data = malloc( size ) ) == NULL )