Add ability to test flags value in vrfy callback

So far there was no test ensuring that the flags passed to the vrfy callback
are correct (ie the flags for the current certificate, not including those of
the parent).

Actual tests case making use of that test function will be added in the next
commit.
This commit is contained in:
Manuel Pégourié-Gonnard 2017-06-26 12:29:29 +02:00
parent 329e78c7fa
commit ffa42efa1c
2 changed files with 13 additions and 13 deletions

View file

@ -145,7 +145,7 @@ int verify_print( void *data, mbedtls_x509_crt *crt, int certificate_depth, uint
ret = mbedtls_x509_dn_gets( p, n, &crt->subject );
MBEDTLS_X509_SAFE_SNPRINTF;
ret = mbedtls_snprintf( p, n, "\n" );
ret = mbedtls_snprintf( p, n, " - flags 0x%04x\n", *flags );
MBEDTLS_X509_SAFE_SNPRINTF;
ctx->p = p;