1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-08-01 10:06:53 +03:00

Fix warnings (enum value missing from switch/case)

This commit is contained in:
Manuel Pégourié-Gonnard
2013-07-10 12:29:57 +02:00
committed by Paul Bakker
parent 72ef0b775d
commit 7c5819eb1e
2 changed files with 19 additions and 2 deletions

View File

@ -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 @@ void pk_free( pk_context *ctx )
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 @@ int pk_set_type( pk_context *ctx, pk_type_t type )
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 )