mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-07-30 16:26:33 +08:00
Merge e31a4f78208feedfdd31b7dbd45be96993b3be03 into 3bb373867917b674265067cbd38b9d252c43d014
This commit is contained in:
commit
1ded028b70
@ -1161,6 +1161,21 @@ static int x509_crt_parse_der_core(mbedtls_x509_crt *crt,
|
||||
mbedtls_x509_crt_free(crt);
|
||||
return ret;
|
||||
}
|
||||
|
||||
{
|
||||
size_t i;
|
||||
int is_serial_zero = 1;
|
||||
for(i = 0; i < crt->serial.len; i++) {
|
||||
if(crt->serial.p[i] != 0) {
|
||||
is_serial_zero = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(is_serial_zero) {
|
||||
mbedtls_x509_crt_free(crt);
|
||||
return MBEDTLS_ERR_X509_INVALID_SERIAL;
|
||||
}
|
||||
}
|
||||
|
||||
if (crt->version < 0 || crt->version > 2) {
|
||||
mbedtls_x509_crt_free(crt);
|
||||
|
||||
@ -3186,6 +3186,9 @@ X509 File parse (RSASSA-PSS, MGF1 hash alg != message hash alg)
|
||||
depends_on:MBEDTLS_PEM_PARSE_C:MBEDTLS_X509_RSASSA_PSS_SUPPORT:PSA_WANT_ALG_SHA_256:PSA_WANT_ALG_SHA_224:PSA_WANT_ALG_SHA_1
|
||||
x509parse_crt_file:"../framework/data_files/server9-bad-mgfhash.crt":MBEDTLS_ERR_X509_INVALID_ALG
|
||||
|
||||
X509 File parse (Certificate serial number is zero, RFC 5280 violation)
|
||||
x509parse_crt_file:"../framework/data_files/parse_input/cert_serial_zero.crt":MBEDTLS_ERR_X509_INVALID_SERIAL
|
||||
|
||||
X509 File parse & read the ca_istrue field (Not Set)
|
||||
depends_on:MBEDTLS_PEM_PARSE_C:PSA_HAVE_ALG_SOME_RSA_VERIFY:MBEDTLS_HAVE_TIME_DATE:PSA_WANT_ALG_SHA_1
|
||||
mbedtls_x509_get_ca_istrue:"../framework/data_files/parse_input/server1.crt":0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user