mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-08-30 12:12:40 +08:00
@@ -1555,19 +1555,19 @@ function renderSignatures() {
|
|||||||
appendSignatureCheck(row, "原文", signature.dataHashOK);
|
appendSignatureCheck(row, "原文", signature.dataHashOK);
|
||||||
appendSignatureCheck(row, "签名", signature.signedValueOK);
|
appendSignatureCheck(row, "签名", signature.signedValueOK);
|
||||||
if (signature.type !== "Sign") {
|
if (signature.type !== "Sign") {
|
||||||
appendSignatureCheck(row, "印章", signature.sealOK && signature.sealMatchOK);
|
appendSignatureCheck(row, "章验", signature.sealOK);
|
||||||
appendSignatureCheck(row, "匹配", signature.sealMatchOK);
|
appendSignatureCheck(row, "一致", signature.sealMatchOK);
|
||||||
}
|
}
|
||||||
appendSignatureCheck(row, "证书", signature.certOK);
|
appendSignatureCheck(row, "证书", signature.certOK);
|
||||||
appendSignaturePolicy(row, "时效", signature.certTimeChecked, signature.certTimeOK);
|
appendSignaturePolicy(row, "时效", signature.certTimeChecked, signature.certTimeOK);
|
||||||
appendSignaturePolicy(row, "信任", signature.certTrustChecked, signature.certTrustOK);
|
appendSignaturePolicy(row, "信任", signature.certTrustChecked, signature.certTrustOK);
|
||||||
appendSignatureLine(row, "保护", signatureReferenceText(signature), signatureReferenceStatus(signature));
|
|
||||||
appendSignatureLine(row, "序号", signature.signSerial);
|
appendSignatureLine(row, "序号", signature.signSerial);
|
||||||
appendSignatureLine(row, "算法", signature.signatureMethod);
|
appendSignatureLine(row, "算法", signature.signatureMethod);
|
||||||
appendSignatureLine(row, "散列", signature.digestMethod);
|
appendSignatureLine(row, "散列", signature.digestMethod);
|
||||||
appendSignatureLine(row, "主体", signature.signSubject && signature.signSubject !== signature.signer ? signature.signSubject : "");
|
appendSignatureLine(row, "主体", signature.signSubject && signature.signSubject !== signature.signer ? signature.signSubject : "");
|
||||||
appendSignatureLine(row, "颁发", signature.signIssuer);
|
appendSignatureLine(row, "颁发", signature.signIssuer);
|
||||||
appendSignatureLine(row, "章证", signature.sealSubject);
|
appendSignatureLine(row, "章证", signature.sealSubject);
|
||||||
|
appendSignatureLine(row, "保护", signatureReferenceText(signature), signatureReferenceStatus(signature));
|
||||||
appendSignatureLine(row, "错误", signature.error, "fail");
|
appendSignatureLine(row, "错误", signature.error, "fail");
|
||||||
fragment.append(row);
|
fragment.append(row);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,14 +59,14 @@ type SignatureInfo struct {
|
|||||||
CertTimeOK bool `json:"certTimeOK,omitempty"`
|
CertTimeOK bool `json:"certTimeOK,omitempty"`
|
||||||
CertTrustChecked bool `json:"certTrustChecked,omitempty"`
|
CertTrustChecked bool `json:"certTrustChecked,omitempty"`
|
||||||
CertTrustOK bool `json:"certTrustOK,omitempty"`
|
CertTrustOK bool `json:"certTrustOK,omitempty"`
|
||||||
ReferenceCount int `json:"referenceCount"`
|
|
||||||
ReferencePassed int `json:"referencePassed"`
|
|
||||||
SignSerial string `json:"signSerial,omitempty"`
|
SignSerial string `json:"signSerial,omitempty"`
|
||||||
SignatureMethod string `json:"signatureMethod,omitempty"`
|
SignatureMethod string `json:"signatureMethod,omitempty"`
|
||||||
DigestMethod string `json:"digestMethod,omitempty"`
|
DigestMethod string `json:"digestMethod,omitempty"`
|
||||||
SignSubject string `json:"signSubject,omitempty"`
|
SignSubject string `json:"signSubject,omitempty"`
|
||||||
SignIssuer string `json:"signIssuer,omitempty"`
|
SignIssuer string `json:"signIssuer,omitempty"`
|
||||||
SealSubject string `json:"sealSubject,omitempty"`
|
SealSubject string `json:"sealSubject,omitempty"`
|
||||||
|
ReferenceCount int `json:"referenceCount"`
|
||||||
|
ReferencePassed int `json:"referencePassed"`
|
||||||
Stamps []SignatureStampInfo `json:"stamps,omitempty"`
|
Stamps []SignatureStampInfo `json:"stamps,omitempty"`
|
||||||
Error string `json:"error,omitempty"`
|
Error string `json:"error,omitempty"`
|
||||||
}
|
}
|
||||||
@@ -347,14 +347,14 @@ func signatureInfo(report ofdgo.SignatureVerifyReport) SignatureInfo {
|
|||||||
CertTimeOK: report.CertTimeOK,
|
CertTimeOK: report.CertTimeOK,
|
||||||
CertTrustChecked: report.CertTrustChecked,
|
CertTrustChecked: report.CertTrustChecked,
|
||||||
CertTrustOK: report.CertTrustOK,
|
CertTrustOK: report.CertTrustOK,
|
||||||
ReferenceCount: len(report.References),
|
|
||||||
ReferencePassed: signatureReferencePassed(report.References),
|
|
||||||
SignSerial: report.SignCert.SerialNumber,
|
SignSerial: report.SignCert.SerialNumber,
|
||||||
SignatureMethod: report.SignatureMethod,
|
SignatureMethod: report.SignatureMethod,
|
||||||
DigestMethod: report.DigestMethod,
|
DigestMethod: report.DigestMethod,
|
||||||
SignSubject: report.SignCert.Subject,
|
SignSubject: report.SignCert.Subject,
|
||||||
SignIssuer: report.SignCert.Issuer,
|
SignIssuer: report.SignCert.Issuer,
|
||||||
SealSubject: report.SealCert.Subject,
|
SealSubject: report.SealCert.Subject,
|
||||||
|
ReferenceCount: len(report.References),
|
||||||
|
ReferencePassed: signatureReferencePassed(report.References),
|
||||||
Stamps: signatureStampInfos(report.StampPositions),
|
Stamps: signatureStampInfos(report.StampPositions),
|
||||||
Error: signatureReportError(report),
|
Error: signatureReportError(report),
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user