Files
palera1n/patches/mbedtls/0001-Allow-empty-x509-cert-issuer.patch
T

35 lines
1.1 KiB
Diff
Raw Normal View History

2023-01-25 01:55:10 +08:00
From 632cdb6de3f1693fb90d60d81552b723e8dd5e84 Mon Sep 17 00:00:00 2001
2023-01-25 01:15:34 +08:00
From: Nick Chan <[email protected]>
2023-01-25 01:55:10 +08:00
Date: Wed, 25 Jan 2023 01:53:00 +0800
2023-01-25 01:15:34 +08:00
Subject: [PATCH] Allow empty x509 cert issuer
---
library/x509_crt.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/library/x509_crt.c b/library/x509_crt.c
2023-01-25 01:55:10 +08:00
index 0eee97cb6..46702f683 100644
2023-01-25 01:15:34 +08:00
--- a/library/x509_crt.c
+++ b/library/x509_crt.c
2023-01-25 01:55:10 +08:00
@@ -1185,14 +1185,14 @@ static int x509_crt_parse_der_core( mbedtls_x509_crt *crt,
if( ( ret = mbedtls_asn1_get_tag( &p, end, &len,
MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE ) ) != 0 )
{
- mbedtls_x509_crt_free( crt );
- return( MBEDTLS_ERROR_ADD( MBEDTLS_ERR_X509_INVALID_FORMAT, ret ) );
+ // mbedtls_x509_crt_free( crt );
+ // return( MBEDTLS_ERROR_ADD( MBEDTLS_ERR_X509_INVALID_FORMAT, ret ) );
2023-01-25 01:15:34 +08:00
}
2023-01-25 01:55:10 +08:00
if( ( ret = mbedtls_x509_get_name( &p, p + len, &crt->issuer ) ) != 0 )
{
- mbedtls_x509_crt_free( crt );
- return( ret );
+ // mbedtls_x509_crt_free( crt );
+ // return( ret );
2023-01-25 01:15:34 +08:00
}
crt->issuer_raw.len = p - crt->issuer_raw.p;
--
2.39.1