mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-08-30 12:12:40 +08:00
+28
-28
@@ -38,32 +38,33 @@ import (
|
|||||||
|
|
||||||
// SignatureVerifyReport 签名验证报告
|
// SignatureVerifyReport 签名验证报告
|
||||||
type SignatureVerifyReport struct {
|
type SignatureVerifyReport struct {
|
||||||
ID string
|
ID string
|
||||||
BaseLoc string
|
BaseLoc string
|
||||||
Type SignType
|
Type SignType
|
||||||
Provider SignatureProvider
|
Provider SignatureProvider
|
||||||
Signer string
|
Signer string
|
||||||
SignCert SignatureCertInfo
|
SignCert SignatureCertInfo
|
||||||
SealCert SignatureCertInfo
|
SealCert SignatureCertInfo
|
||||||
SealType string
|
SealType string
|
||||||
SignatureMethod string
|
SignatureMethod string
|
||||||
SignatureDateTime string
|
SignatureDateTime string
|
||||||
DigestMethod string
|
DigestMethod string
|
||||||
References []SignatureReferenceVerify
|
References []SignatureReferenceVerify
|
||||||
Stamps []SignatureStamp
|
Stamps []SignatureStamp
|
||||||
StampPositions []SignatureStampPosition
|
StampPositions []SignatureStampPosition
|
||||||
DigestOK bool
|
StampPositionError string
|
||||||
DataHashOK bool
|
DigestOK bool
|
||||||
SignedValueOK bool
|
DataHashOK bool
|
||||||
SealOK bool
|
SignedValueOK bool
|
||||||
SealMatchOK bool
|
SealOK bool
|
||||||
CertOK bool
|
SealMatchOK bool
|
||||||
CertTimeChecked bool
|
CertOK bool
|
||||||
CertTimeOK bool
|
CertTimeChecked bool
|
||||||
CertTrustChecked bool
|
CertTimeOK bool
|
||||||
CertTrustOK bool
|
CertTrustChecked bool
|
||||||
Valid bool
|
CertTrustOK bool
|
||||||
Error string
|
Valid bool
|
||||||
|
Error string
|
||||||
}
|
}
|
||||||
|
|
||||||
// SignatureCertInfo 签名证书信息
|
// SignatureCertInfo 签名证书信息
|
||||||
@@ -235,8 +236,7 @@ func (r *Reader) verifySignature(sigListPath string, sigRef Signature, options *
|
|||||||
report.Stamps = append(report.Stamps, sigFile.SignedInfo.StampAnnot...)
|
report.Stamps = append(report.Stamps, sigFile.SignedInfo.StampAnnot...)
|
||||||
report.StampPositions, err = r.SignatureStampPositions(report.Stamps)
|
report.StampPositions, err = r.SignatureStampPositions(report.Stamps)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
report.Error = err.Error()
|
report.StampPositionError = err.Error()
|
||||||
return report
|
|
||||||
}
|
}
|
||||||
report.DigestOK = referencesOK(report.References)
|
report.DigestOK = referencesOK(report.References)
|
||||||
signedValuePath := signatureRefPath(sigPath, sigFile.SignedValue)
|
signedValuePath := signatureRefPath(sigPath, sigFile.SignedValue)
|
||||||
|
|||||||
Reference in New Issue
Block a user