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 )
diff --git a/library/x509parse.c b/library/x509parse.c
index 9e05f98..6239698 100644
--- a/library/x509parse.c
+++ b/library/x509parse.c
@@ -637,7 +637,9 @@
     switch( pk_alg )
     {
         case POLARSSL_PK_NONE:
-            ret = POLARSSL_ERR_X509_UNKNOWN_PK_ALG;
+        case POLARSSL_PK_ECDSA:
+            /* Should never happen */
+            ret = POLARSSL_ERR_X509_CERT_INVALID_ALG;
             break;
 
         case POLARSSL_PK_RSA: