mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-12-24 17:41:01 +03:00
Updated error codes for ECP
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Elliptic curves over GF(p)
|
||||
*
|
||||
* Copyright (C) 2012, Brainspark B.V.
|
||||
* Copyright (C) 2006-2013, Brainspark B.V.
|
||||
*
|
||||
* This file is part of PolarSSL (http://www.polarssl.org)
|
||||
* Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
|
||||
|
||||
@@ -63,6 +63,10 @@
|
||||
#include "polarssl/dhm.h"
|
||||
#endif
|
||||
|
||||
#if defined(POLARSSL_ECP_C)
|
||||
#include "polarssl/ecp.h"
|
||||
#endif
|
||||
|
||||
#if defined(POLARSSL_ENTROPY_C)
|
||||
#include "polarssl/entropy.h"
|
||||
#endif
|
||||
@@ -182,6 +186,13 @@ void error_strerror( int ret, char *buf, size_t buflen )
|
||||
snprintf( buf, buflen, "DHM - Calculation of the DHM secret failed" );
|
||||
#endif /* POLARSSL_DHM_C */
|
||||
|
||||
#if defined(POLARSSL_ECP_C)
|
||||
if( use_ret == -(POLARSSL_ERR_ECP_BAD_INPUT_DATA) )
|
||||
snprintf( buf, buflen, "ECP - Bad input parameters to function" );
|
||||
if( use_ret == -(POLARSSL_ERR_ECP_GENERIC) )
|
||||
snprintf( buf, buflen, "ECP - Generic ECP error" );
|
||||
#endif /* POLARSSL_ECP_C */
|
||||
|
||||
#if defined(POLARSSL_MD_C)
|
||||
if( use_ret == -(POLARSSL_ERR_MD_FEATURE_UNAVAILABLE) )
|
||||
snprintf( buf, buflen, "MD - The selected feature is not available" );
|
||||
|
||||
Reference in New Issue
Block a user