mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2026-02-19 00:39:46 +00:00
x509_crt_parse() did not increase total_failed on PEM error
Result was that PEM errors in files with multiple certificates were not detectable by the user.
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include <polarssl/x509_csr.h>
|
||||
#include <polarssl/pem.h>
|
||||
#include <polarssl/oid.h>
|
||||
#include <polarssl/base64.h>
|
||||
|
||||
int verify_none( void *data, x509_crt *crt, int certificate_depth, int *flags )
|
||||
{
|
||||
@@ -216,6 +217,20 @@ exit:
|
||||
}
|
||||
/* END_CASE */
|
||||
|
||||
/* BEGIN_CASE depends_on:POLARSSL_X509_CRT_PARSE_C:POLARSSL_FS_IO */
|
||||
void x509parse_crt_file( char *crt_file, int result )
|
||||
{
|
||||
x509_crt crt;
|
||||
|
||||
x509_crt_init( &crt );
|
||||
|
||||
TEST_ASSERT( x509_crt_parse_file( &crt, crt_file ) == result );
|
||||
|
||||
exit:
|
||||
x509_crt_free( &crt );
|
||||
}
|
||||
/* END_CASE */
|
||||
|
||||
/* BEGIN_CASE depends_on:POLARSSL_X509_CRT_PARSE_C */
|
||||
void x509parse_crt( char *crt_data, char *result_str, int result )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user