Merge branch 'development' into convert_NO_SHA384_to_positive
Conflicts: * configs/config-psa-crypto.h: modified here, removed in development * tests/suites/test_suite_x509parse.data: all conflicts are in depends_on lines where development made a change unrelated to MBEDTLS_SHAxxx and our branch either changed `MBEDTLS_SHA256_C` to `MBEDTLS_SHA224_C` or `MBEDTLS_SHA512_C:!MBEDTLS_SHA512_NO_SHA384` to ``MBEDTLS_SHA384_C`, with no change to what the test does. Pick the other branch's dependency changes then apply our SHA dpeendency change.
This commit is contained in:
commit
4228f895c0
169 changed files with 4060 additions and 6751 deletions
|
@ -307,3 +307,41 @@ int ssl_sig_hashes_for_test[] = {
|
|||
MBEDTLS_MD_NONE
|
||||
};
|
||||
#endif /* MBEDTLS_X509_CRT_PARSE_C */
|
||||
|
||||
#if defined(MBEDTLS_X509_CRT_PARSE_C)
|
||||
/** Functionally equivalent to mbedtls_x509_crt_verify_info, see that function
|
||||
* for more info.
|
||||
*/
|
||||
int x509_crt_verify_info( char *buf, size_t size, const char *prefix,
|
||||
uint32_t flags )
|
||||
{
|
||||
#if !defined(MBEDTLS_X509_REMOVE_INFO)
|
||||
return( mbedtls_x509_crt_verify_info( buf, size, prefix, flags ) );
|
||||
|
||||
#else /* !MBEDTLS_X509_REMOVE_INFO */
|
||||
int ret;
|
||||
char *p = buf;
|
||||
size_t n = size;
|
||||
|
||||
#define X509_CRT_ERROR_INFO( err, err_str, info ) \
|
||||
if( ( flags & err ) != 0 ) \
|
||||
{ \
|
||||
ret = mbedtls_snprintf( p, n, "%s%s\n", prefix, info ); \
|
||||
MBEDTLS_X509_SAFE_SNPRINTF; \
|
||||
flags ^= err; \
|
||||
}
|
||||
|
||||
MBEDTLS_X509_CRT_ERROR_INFO_LIST
|
||||
#undef X509_CRT_ERROR_INFO
|
||||
|
||||
if( flags != 0 )
|
||||
{
|
||||
ret = mbedtls_snprintf( p, n, "%sUnknown reason "
|
||||
"(this should not happen)\n", prefix );
|
||||
MBEDTLS_X509_SAFE_SNPRINTF;
|
||||
}
|
||||
|
||||
return( (int) ( size - n ) );
|
||||
#endif /* MBEDTLS_X509_REMOVE_INFO */
|
||||
}
|
||||
#endif /* MBEDTLS_X509_CRT_PARSE_C */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue