mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-29 08:46:55 +08:00
1 parent
5e0da3da28
commit
ee6c9f6a16
82 files changed
+4316
-4310
No files matched your search
+13
-13
@@ -29,9 +29,6 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// SignatureWriteMode 签署方式
|
||||
type SignatureWriteMode uint8
|
||||
|
||||
const (
|
||||
// SignatureAppend 追加签署,要求原活动签名有效且未保护签名列表
|
||||
SignatureAppend SignatureWriteMode = iota
|
||||
@@ -39,6 +36,9 @@ const (
|
||||
SignatureReplace
|
||||
)
|
||||
|
||||
// SignatureWriteMode 签署方式
|
||||
type SignatureWriteMode uint8
|
||||
|
||||
// SignatureWriteOptions 最终包签署选项,不修改Editor或调用方的原件
|
||||
// SM2数字签名使用GB/T 35275-2017消息结构;RSA/ECDSA使用裸签名,验签需WithSignatureCert
|
||||
// Seal仅接受已有合法SES v4电子印章,使用SM2/SM3,不声明GM/T 0031-2025兼容
|
||||
@@ -64,6 +64,16 @@ type SignatureWriteOptions struct {
|
||||
progress editorProgress
|
||||
}
|
||||
|
||||
// signatureWriteInfo 写出签名信息,省略数字签名中不存在的印章
|
||||
type signatureWriteInfo struct {
|
||||
Provider SignatureProvider `xml:"Provider"`
|
||||
SignatureMethod string `xml:"SignatureMethod"`
|
||||
SignatureDateTime string `xml:"SignatureDateTime"`
|
||||
References SignatureReferences `xml:"References"`
|
||||
Stamps []SignatureStamp `xml:"StampAnnot,omitempty"`
|
||||
Seal *SignatureSeal `xml:"Seal,omitempty"`
|
||||
}
|
||||
|
||||
// SignPackage 签署最终OFD包,失败时返回nil且不修改输入
|
||||
// 入参: data 最终包字节, options 签署选项
|
||||
// 返回: []byte 签署后的完整包, error 错误信息
|
||||
@@ -436,16 +446,6 @@ func signatureWriteIDs(list *Signatures, listPath string, parts map[string][]byt
|
||||
return id, stamps, nil
|
||||
}
|
||||
|
||||
// signatureWriteInfo 写出签名信息,省略数字签名中不存在的印章
|
||||
type signatureWriteInfo struct {
|
||||
Provider SignatureProvider `xml:"Provider"`
|
||||
SignatureMethod string `xml:"SignatureMethod"`
|
||||
SignatureDateTime string `xml:"SignatureDateTime"`
|
||||
References SignatureReferences `xml:"References"`
|
||||
Stamps []SignatureStamp `xml:"StampAnnot,omitempty"`
|
||||
Seal *SignatureSeal `xml:"Seal,omitempty"`
|
||||
}
|
||||
|
||||
// signatureWriteXML 编码带OFD命名空间的签名文件
|
||||
// 入参: name 根节点名称, value 内容
|
||||
// 返回: []byte XML, error 错误信息
|
||||
|
||||
Reference in new issue
Block a user