Permit multiple certs with same common name

This is needed to support Cloudflare interop.
This commit is contained in:
Justine Tunney 2022-09-27 18:07:21 -07:00
parent 87708c5d6e
commit b46f763ee7
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
4 changed files with 2 additions and 13 deletions

View file

@ -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)) {