Cleaned up ECP error codes
diff --git a/library/ecp.c b/library/ecp.c
index 1a83ed0..d2d2e18 100644
--- a/library/ecp.c
+++ b/library/ecp.c
@@ -604,7 +604,7 @@
#endif /* POLARSSL_ECP_DP_SECP521R1_ENABLED */
}
- return( POLARSSL_ERR_ECP_BAD_INPUT_DATA );
+ return( POLARSSL_ERR_ECP_FEATURE_UNAVAILABLE );
}
/*
diff --git a/library/error.c b/library/error.c
index 833598c..aa0e24e 100644
--- a/library/error.c
+++ b/library/error.c
@@ -207,6 +207,8 @@
snprintf( buf, buflen, "ECP - The buffer is too small to write to" );
if( use_ret == -(POLARSSL_ERR_ECP_GENERIC) )
snprintf( buf, buflen, "ECP - Generic ECP error" );
+ if( use_ret == -(POLARSSL_ERR_ECP_FEATURE_UNAVAILABLE) )
+ snprintf( buf, buflen, "ECP - Requested curve not available" );
#endif /* POLARSSL_ECP_C */
#if defined(POLARSSL_MD_C)