mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-03-20 19:21:09 +01:00
Add support for x509 SAN RCF822 and DirectoryName for csr generation
Unify the code with the x509 crt counterpart. Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
This commit is contained in:
@@ -288,6 +288,11 @@ int mbedtls_x509write_crt_set_subject_alternative_name(mbedtls_x509write_cert *c
|
||||
buf + buflen - len,
|
||||
len);
|
||||
|
||||
/* If we exceeded the allocated buffer it means that maximum size of the SubjectAltName list
|
||||
* was incorrectly calculated and memory is corrupted. */
|
||||
if (p < buf) {
|
||||
ret = MBEDTLS_ERR_ASN1_LENGTH_MISMATCH;
|
||||
}
|
||||
cleanup:
|
||||
mbedtls_free(buf);
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user