mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-08-30 12:12:40 +08:00
@@ -32,7 +32,6 @@ type digitalVerifyResult struct {
|
|||||||
DataHashOK bool
|
DataHashOK bool
|
||||||
SignedOK bool
|
SignedOK bool
|
||||||
CertOK bool
|
CertOK bool
|
||||||
Cert []byte
|
|
||||||
SignerCerts [][]byte
|
SignerCerts [][]byte
|
||||||
Certs [][]byte
|
Certs [][]byte
|
||||||
CertInfo SignatureCertInfo
|
CertInfo SignatureCertInfo
|
||||||
@@ -93,7 +92,6 @@ func verifyRawDigitalSignature(signedValue, signedData []byte, options *signatur
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
result.CertOK = true
|
result.CertOK = true
|
||||||
result.Cert = cert
|
|
||||||
result.SignerCerts = [][]byte{cert}
|
result.SignerCerts = [][]byte{cert}
|
||||||
result.CertInfo = signatureCertInfo(cert)
|
result.CertInfo = signatureCertInfo(cert)
|
||||||
if sm2VerifySignature(pub, nil, signedData, signedValue) {
|
if sm2VerifySignature(pub, nil, signedData, signedValue) {
|
||||||
@@ -121,7 +119,6 @@ func verifyRawPublicKeySignature(method, digestMethod string, signedValue, signe
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
result.CertOK = true
|
result.CertOK = true
|
||||||
result.Cert = cert
|
|
||||||
result.SignerCerts = [][]byte{cert}
|
result.SignerCerts = [][]byte{cert}
|
||||||
result.CertInfo = signatureCertInfo(cert)
|
result.CertInfo = signatureCertInfo(cert)
|
||||||
if ok {
|
if ok {
|
||||||
@@ -175,7 +172,6 @@ func verifyGBT35275SignedData(signedValue, signedData []byte, options *signature
|
|||||||
result.CertOK = false
|
result.CertOK = false
|
||||||
return result, nil
|
return result, nil
|
||||||
}
|
}
|
||||||
result.Cert = cert.Raw
|
|
||||||
result.SignerCerts = append(result.SignerCerts, cert.Raw)
|
result.SignerCerts = append(result.SignerCerts, cert.Raw)
|
||||||
result.CertInfo = signatureCertInfo(cert.Raw)
|
result.CertInfo = signatureCertInfo(cert.Raw)
|
||||||
if isSM2SignatureMethod(signer.SignatureAlg) {
|
if isSM2SignatureMethod(signer.SignatureAlg) {
|
||||||
|
|||||||
Reference in New Issue
Block a user