mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-25 11:25:40 +01:00
Fixed to the features check
This commit is contained in:
parent
1a9cb81973
commit
790e395729
@ -99,7 +99,9 @@ void version_get_string_full( char *string );
|
|||||||
*
|
*
|
||||||
* \param feature The string for the define to check (e.g. "POLARSSL_AES_C")
|
* \param feature The string for the define to check (e.g. "POLARSSL_AES_C")
|
||||||
*
|
*
|
||||||
* \return 0 if the feature is present, -1 if not.
|
* \return 0 if the feature is present, -1 if the feature is not
|
||||||
|
* present and -2 if support for feature checking as a whole
|
||||||
|
* was not compiled in.
|
||||||
*/
|
*/
|
||||||
int version_check_feature( const char *feature );
|
int version_check_feature( const char *feature );
|
||||||
|
|
||||||
|
@ -41,7 +41,9 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char *features[] = {
|
const char *features[] = {
|
||||||
|
#if defined(POLARSSL_VERSION_FEATURES)
|
||||||
FEATURE_DEFINES
|
FEATURE_DEFINES
|
||||||
|
#endif
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -49,6 +51,9 @@ int version_check_feature( const char *feature )
|
|||||||
{
|
{
|
||||||
const char **idx = features;
|
const char **idx = features;
|
||||||
|
|
||||||
|
if( *idx == NULL )
|
||||||
|
return( -2 );
|
||||||
|
|
||||||
if( feature == NULL )
|
if( feature == NULL )
|
||||||
return( -1 );
|
return( -1 );
|
||||||
|
|
||||||
|
@ -265,6 +265,7 @@
|
|||||||
<ClCompile Include="..\..\library\threading.c" />
|
<ClCompile Include="..\..\library\threading.c" />
|
||||||
<ClCompile Include="..\..\library\timing.c" />
|
<ClCompile Include="..\..\library\timing.c" />
|
||||||
<ClCompile Include="..\..\library\version.c" />
|
<ClCompile Include="..\..\library\version.c" />
|
||||||
|
<ClCompile Include="..\..\library\version_features.c" />
|
||||||
<ClCompile Include="..\..\library\x509.c" />
|
<ClCompile Include="..\..\library\x509.c" />
|
||||||
<ClCompile Include="..\..\library\x509_create.c" />
|
<ClCompile Include="..\..\library\x509_create.c" />
|
||||||
<ClCompile Include="..\..\library\x509_crl.c" />
|
<ClCompile Include="..\..\library\x509_crl.c" />
|
||||||
|
@ -317,6 +317,10 @@ SOURCE=..\..\library\version.c
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\..\library\version_features.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=..\..\library\x509.c
|
SOURCE=..\..\library\x509.c
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
Loading…
Reference in New Issue
Block a user