Skip to content

Commit

Permalink
Support hybrid ECDSA / RSA certificate loading
Browse files Browse the repository at this point in the history
  • Loading branch information
jart committed Jul 10, 2021
1 parent fe88198 commit c002e4b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tool/net/redbean.c
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,9 @@ static void InternCertificate(mbedtls_x509_crt *cert, mbedtls_x509_crt *prev) {
}
for (i = 0; i < certs.n; ++i) {
if (!certs.p[i].cert) continue;
if (!mbedtls_x509_name_cmp(&cert->subject, &certs.p[i].cert->subject)) {
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)) {
WARNF("certificate subject name %`'s is already loaded",
gc(FormatX509Name(&cert->subject)));
return;
Expand Down

0 comments on commit c002e4b

Please sign in to comment.