mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-30 01:27:26 +08:00
1 parent
5e0da3da28
commit
ee6c9f6a16
82 files changed
+4316
-4310
No files matched your search
+11
-11
@@ -99,17 +99,6 @@ func WithSignatureTimestamp(options SignatureTimestampOptions) SignatureVerifyOp
|
||||
return func(o *signatureVerifyOptions) { o.Timestamp = &options }
|
||||
}
|
||||
|
||||
// cloneSignatureEvidence 深拷贝离线证据
|
||||
// 入参: values 原证据列表
|
||||
// 返回: [][]byte 独立证据列表
|
||||
func cloneSignatureEvidence(values [][]byte) [][]byte {
|
||||
out := make([][]byte, len(values))
|
||||
for i := range values {
|
||||
out[i] = bytes.Clone(values[i])
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
// VerifySignatureTimestamp 验证RFC3161令牌与原始字节的绑定
|
||||
// 入参: token DER编码TimeStampToken, data 被时间戳保护的原始字节, options 验证选项
|
||||
// 返回: SignatureTimestampReport 验证报告
|
||||
@@ -122,6 +111,17 @@ func VerifySignatureTimestamp(token, data []byte, options SignatureTimestampOpti
|
||||
return report
|
||||
}
|
||||
|
||||
// cloneSignatureEvidence 深拷贝离线证据
|
||||
// 入参: values 原证据列表
|
||||
// 返回: [][]byte 独立证据列表
|
||||
func cloneSignatureEvidence(values [][]byte) [][]byte {
|
||||
out := make([][]byte, len(values))
|
||||
for i := range values {
|
||||
out[i] = bytes.Clone(values[i])
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
// verifySignatureTimestamp 检查令牌绑定、签名与TSA信任
|
||||
// 入参: token 令牌DER, data 原始字节, o 验证选项, report 结果
|
||||
// 返回: error 验证错误
|
||||
|
||||
Reference in new issue
Block a user