From c4091943a8d4e1fd4f7d2553621966623a226dcf Mon Sep 17 00:00:00 2001 From: eryajf Date: Mon, 18 Nov 2024 22:02:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=A4=9A=E5=9F=9F?= =?UTF-8?q?=E5=90=8D=E6=97=B6=E8=AF=81=E4=B9=A6=E5=8C=B9=E9=85=8D=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/export/record_cert.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/export/record_cert.go b/pkg/export/record_cert.go index 4e118d8..4b841d1 100644 --- a/pkg/export/record_cert.go +++ b/pkg/export/record_cert.go @@ -92,7 +92,8 @@ func GetCertInfo(record provider.GetRecordCertReq) (certInfo provider.RecordCert cert := certs[0] certInfo.SubjectCommonName = cert.Subject.CommonName - if strings.Contains(certInfo.SubjectCommonName, record.DomainName) { + certInfo.IssuerCommonName = cert.Issuer.CommonName + if strings.Contains(certInfo.SubjectCommonName, record.DomainName) || strings.Contains(certInfo.IssuerCommonName, record.DomainName) { certInfo.CertMatched = true } else { certInfo.CertMatched = false @@ -104,8 +105,6 @@ func GetCertInfo(record provider.GetRecordCertReq) (certInfo provider.RecordCert if len(cert.Subject.OrganizationalUnit) > 0 { certInfo.SubjectOrganizationalUnit = cert.Subject.OrganizationalUnit[0] } - // 从证书中提取颁发者信息 - certInfo.IssuerCommonName = cert.Issuer.CommonName if len(cert.Issuer.Organization) > 0 { certInfo.IssuerOrganization = cert.Issuer.Organization[0] }