pk_set_type() cannot be used to reset key type

This commit is contained in:
Manuel Pégourié-Gonnard 2013-07-09 10:21:34 +02:00 committed by Paul Bakker
parent 0a64e8f1fd
commit 374e4b87d4
4 changed files with 24 additions and 2 deletions

View file

@ -250,6 +250,8 @@ void polarssl_strerror( int ret, char *buf, size_t buflen )
#if defined(POLARSSL_PK_C)
if( use_ret == -(POLARSSL_ERR_PK_MALLOC_FAILED) )
snprintf( buf, buflen, "PK - Memory alloation failed" );
if( use_ret == -(POLARSSL_ERR_PK_TYPE_MISMATCH) )
snprintf( buf, buflen, "PK - Type mismatch, eg attempt to use a RSA key as EC, or to modify key type" );
#endif /* POLARSSL_PK_C */
#if defined(POLARSSL_PKCS12_C)