mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-08 17:42:09 +03:00
test: x509: add more tests for checking certificate serial
- added 2 new certificates: 1 for testing a serial which is full lenght and another one for a serial which starts with 0x80 - added also proper Makefile and openssl configuration file to generate these 2 new certificates Signed-off-by: Valerio Setti <vsetti@baylibre.com>
This commit is contained in:
@@ -545,7 +545,7 @@ int mbedtls_x509write_crt_der(mbedtls_x509write_cert *ctx,
|
||||
if (c - buf < 1) {
|
||||
return MBEDTLS_ERR_X509_BUFFER_TOO_SMALL;
|
||||
}
|
||||
*(c--) = 0x0;
|
||||
*(--c) = 0x0;
|
||||
len++;
|
||||
MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_len(&c, buf,
|
||||
ctx->serial_len + 1));
|
||||
|
Reference in New Issue
Block a user