From b3b8e0bac0940012a55acdd9d8021c6795f77806 Mon Sep 17 00:00:00 2001 From: xiaoqidun Date: Wed, 8 Jul 2026 13:12:45 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E7=AD=BE=E5=90=8D=E9=AA=8C=E7=AD=BE):=20?= =?UTF-8?q?=E7=BB=A7=E7=BB=AD=E4=BC=98=E5=8C=96=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ofdgo_sign_verify.go | 56 ++++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/ofdgo_sign_verify.go b/ofdgo_sign_verify.go index 5b1ddc8..d335f0f 100644 --- a/ofdgo_sign_verify.go +++ b/ofdgo_sign_verify.go @@ -38,32 +38,33 @@ import ( // SignatureVerifyReport 签名验证报告 type SignatureVerifyReport struct { - ID string - BaseLoc string - Type SignType - Provider SignatureProvider - Signer string - SignCert SignatureCertInfo - SealCert SignatureCertInfo - SealType string - SignatureMethod string - SignatureDateTime string - DigestMethod string - References []SignatureReferenceVerify - Stamps []SignatureStamp - StampPositions []SignatureStampPosition - DigestOK bool - DataHashOK bool - SignedValueOK bool - SealOK bool - SealMatchOK bool - CertOK bool - CertTimeChecked bool - CertTimeOK bool - CertTrustChecked bool - CertTrustOK bool - Valid bool - Error string + ID string + BaseLoc string + Type SignType + Provider SignatureProvider + Signer string + SignCert SignatureCertInfo + SealCert SignatureCertInfo + SealType string + SignatureMethod string + SignatureDateTime string + DigestMethod string + References []SignatureReferenceVerify + Stamps []SignatureStamp + StampPositions []SignatureStampPosition + StampPositionError string + DigestOK bool + DataHashOK bool + SignedValueOK bool + SealOK bool + SealMatchOK bool + CertOK bool + CertTimeChecked bool + CertTimeOK bool + CertTrustChecked bool + CertTrustOK bool + Valid bool + Error string } // SignatureCertInfo 签名证书信息 @@ -235,8 +236,7 @@ func (r *Reader) verifySignature(sigListPath string, sigRef Signature, options * report.Stamps = append(report.Stamps, sigFile.SignedInfo.StampAnnot...) report.StampPositions, err = r.SignatureStampPositions(report.Stamps) if err != nil { - report.Error = err.Error() - return report + report.StampPositionError = err.Error() } report.DigestOK = referencesOK(report.References) signedValuePath := signatureRefPath(sigPath, sigFile.SignedValue)