mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 14:58:30 +00:00
Permit multiple certs with same common name
This is needed to support Cloudflare interop.
This commit is contained in:
parent
87708c5d6e
commit
b46f763ee7
4 changed files with 2 additions and 13 deletions
|
@ -686,17 +686,6 @@ static void InternCertificate(mbedtls_x509_crt *cert, mbedtls_x509_crt *prev) {
|
|||
WARNF("(ssl) certificate %`'s is from the future",
|
||||
_gc(FormatX509Name(&cert->subject)));
|
||||
}
|
||||
for (i = 0; i < certs.n; ++i) {
|
||||
if (!certs.p[i].cert) continue;
|
||||
if (mbedtls_pk_get_type(&cert->pk) ==
|
||||
mbedtls_pk_get_type(&certs.p[i].cert->pk) &&
|
||||
!mbedtls_x509_name_cmp(&cert->subject, &certs.p[i].cert->subject)) {
|
||||
VERBOSEF("(ssl) %s %`'s is already loaded",
|
||||
mbedtls_pk_get_name(&cert->pk),
|
||||
_gc(FormatX509Name(&cert->subject)));
|
||||
return;
|
||||
}
|
||||
}
|
||||
for (i = 0; i < certs.n; ++i) {
|
||||
if (!certs.p[i].cert && certs.p[i].key &&
|
||||
!mbedtls_pk_check_pair(&cert->pk, certs.p[i].key)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue