Documentation ¶
Index ¶
- Constants
- func LoadZipFileContent(rc *zip.ReadCloser, path string) ([]byte, error)
- type Attachments
- type AttachmentsXml
- type Category
- type Cert
- type CertDigestList
- type CertDigestObj
- type CertDigestValue
- type CertInfoList
- type CommonData
- type CommonDataResource
- type CommonDataXml
- type CommonValidator
- type ContentInfo
- type CustomTags
- type CustomTagsXml
- type DocResource
- type Document
- type DocumentRes
- type DocumentResXml
- type DocumentXml
- type ExtensionDatas
- type Hash
- type OFD
- type OFDReader
- func (ofdReader *OFDReader) Close() error
- func (ofdReader *OFDReader) GetDocumentById(docId string) (*Document, error)
- func (ofdReader *OFDReader) GetFileContent(path string) ([]byte, error)
- func (ofdReader *OFDReader) GetSignaturesById(docId string) (*Signatures, error)
- func (ofdReader *OFDReader) OFD() (*OFD, error)
- type ObjType
- type Option
- type Options
- type Page
- type PageXml
- type Pages
- type PagesXml
- type PublicRes
- type PublicResXml
- type Resource
- type SES_CertList
- type SES_ESPictrueInfo
- type SES_ESPropertyInfo
- type SES_Header
- type SES_Seal_Info
- func (ses_seal_info *SES_Seal_Info) Get_ESID() string
- func (ses_seal_info *SES_Seal_Info) Get_ExtDatas() (*ExtensionDatas, error)
- func (ses_seal_info *SES_Seal_Info) Get_Header() (*SES_Header, error)
- func (ses_seal_info *SES_Seal_Info) Get_Pictrue() (*SES_ESPictrueInfo, error)
- func (ses_seal_info *SES_Seal_Info) Get_Property() (*SES_ESPropertyInfo, error)
- type SES_Signature
- type SESeal
- type Signature
- type SignatureXml
- type Signatures
- type SignaturesXml
- type SignedData
- type SignerInfo
- func (signerInfo *SignerInfo) GetAuthenticatedAttributes() cryptobyte.String
- func (signerInfo *SignerInfo) GetDigestAlgorithm() string
- func (signerInfo *SignerInfo) GetDigestEncryptionAlgorithm() string
- func (signerInfo *SignerInfo) GetEncryptedDigest() cryptobyte.String
- func (signerInfo *SignerInfo) GetIssuerAndSerialNumber() cryptobyte.String
- func (signerInfo *SignerInfo) GetUnauthenticatedAttributes() cryptobyte.String
- func (signerInfo *SignerInfo) GetVersion() int64
- type TBS_Sign
- type Validator
Constants ¶
View Source
const ( SM3_OID = "1.2.156.10197.1.401" SM3WITHSM2_OID = "1.2.156.10197.1.501" MAX = "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" )
View Source
const (
OFD_PATH = "OFD.xml"
)
Variables ¶
This section is empty.
Functions ¶
func LoadZipFileContent ¶
func LoadZipFileContent(rc *zip.ReadCloser, path string) ([]byte, error)
Types ¶
type Attachments ¶
type Attachments struct { AttachmentsXml // contains filtered or unexported fields }
func (*Attachments) GetFileContent ¶
func (attachments *Attachments) GetFileContent(path string) ([]byte, error)
type AttachmentsXml ¶
type AttachmentsXml struct { XMLName xml.Name `xml:"Attachments"` Text string `xml:",chardata"` Ofd string `xml:"ofd,attr"` Attachment []struct { Text string `xml:",chardata"` ID string `xml:"ID,attr"` Name string `xml:"Name,attr"` Format string `xml:"Format,attr"` Size string `xml:"Size,attr"` Visible string `xml:"Visible,attr"` CreationDate string `xml:"CreationDate,attr"` } `xml:"Attachment"` }
type CertDigestList ¶
type CertDigestList struct {
CertDigestObjs []CertDigestObj
}
type CertDigestObj ¶
type CertDigestObj struct { Type ObjType Value CertDigestValue }
type CertDigestValue ¶
type CertDigestValue []byte
type CertInfoList ¶
type CertInfoList struct {
Certs []Cert
}
type CommonData ¶
type CommonData struct { CommonDataXml // contains filtered or unexported fields }
func (*CommonData) GetDocumentRes ¶
func (commonData *CommonData) GetDocumentRes() (*DocumentRes, error)
func (*CommonData) GetPublicRes ¶
func (commonData *CommonData) GetPublicRes() (*PublicRes, error)
func (*CommonData) GetTemplatePage ¶
func (commonData *CommonData) GetTemplatePage() (*Page, error)
type CommonDataResource ¶
type CommonDataResource int
const ( PUBLICRES CommonDataResource = iota DOCUMENTRES TEMPLATEPAGE )
type CommonDataXml ¶
type CommonDataXml struct { Text string `xml:",chardata"` MaxUnitID struct { Text string `xml:",chardata"` } `xml:"MaxUnitID"` PageArea struct { Text string `xml:",chardata"` PhysicalBox struct { Text string `xml:",chardata"` } `xml:"PhysicalBox"` } `xml:"PageArea"` PublicRes struct { Text string `xml:",chardata"` } `xml:"PublicRes"` DocumentRes struct { Text string `xml:",chardata"` } `xml:"DocumentRes"` TemplatePage struct { Text string `xml:",chardata"` ID string `xml:"ID,attr"` BaseLoc string `xml:"BaseLoc,attr"` } `xml:"TemplatePage"` }
type CommonValidator ¶
type CommonValidator struct { }
func (*CommonValidator) Digest ¶
func (common *CommonValidator) Digest(msg []byte) []byte
type ContentInfo ¶
type ContentInfo struct {
// contains filtered or unexported fields
}
func NewContentInfo ¶
func NewContentInfo(input cryptobyte.String) (*ContentInfo, error)
func (*ContentInfo) GetContent ¶
func (contentInfo *ContentInfo) GetContent() []byte
type CustomTags ¶
type CustomTags struct { CustomTagsXml // contains filtered or unexported fields }
func (*CustomTags) GetFileContent ¶
func (attachments *CustomTags) GetFileContent(path string) ([]byte, error)
type CustomTagsXml ¶
type Document ¶
type Document struct { DocumentXml // contains filtered or unexported fields }
func (*Document) GetAttachments ¶
func (doc *Document) GetAttachments() (*Attachments, error)
func (*Document) GetCommonData ¶
func (doc *Document) GetCommonData() (*CommonData, error)
func (*Document) GetCustomTags ¶
func (doc *Document) GetCustomTags() (*CustomTags, error)
func (*Document) GetFileContent ¶
type DocumentRes ¶
type DocumentRes struct { DocumentResXml // contains filtered or unexported fields }
func (*DocumentRes) GetFileContent ¶
func (docRes *DocumentRes) GetFileContent(path string) ([]byte, error)
type DocumentResXml ¶
type DocumentResXml struct { XMLName xml.Name `xml:"Res"` Text string `xml:",chardata"` Ofd string `xml:"ofd,attr"` BaseLoc string `xml:"BaseLoc,attr"` MultiMedias struct { Text string `xml:",chardata"` MultiMedia []struct { Text string `xml:",chardata"` ID string `xml:"ID,attr"` Type string `xml:"Type,attr"` MediaFile struct { Text string `xml:",chardata"` } `xml:"MediaFile"` } `xml:"MultiMedia"` } `xml:"MultiMedias"` }
type DocumentXml ¶
type DocumentXml struct { XMLName xml.Name `xml:"Document"` Text string `xml:",chardata"` Ofd string `xml:"ofd,attr"` CommonData CommonData `xml:"CommonData"` Pages Pages `xml:"Pages"` Attachments struct { Text string `xml:",chardata"` } `xml:"Attachments"` CustomTags struct { Text string `xml:",chardata"` } `xml:"CustomTags"` }
type ExtensionDatas ¶
type ExtensionDatas struct { ExtnId std.ObjectIdentifier Critical bool ExtnValue []byte }
func New_ExtensionDatas ¶
func New_ExtensionDatas(extDatas cryptobyte.String) (*ExtensionDatas, error)
type OFD ¶
type OFD struct { XMLName xml.Name `xml:"OFD"` Text string `xml:",chardata"` Ofd string `xml:"ofd,attr"` Version string `xml:"Version,attr"` DocBody []struct { Text string `xml:",chardata"` DocInfo struct { Text string `xml:",chardata"` DocID struct { Text string `xml:",chardata"` } `xml:"DocID"` } `xml:"DocInfo"` DocRoot struct { Text string `xml:",chardata"` } `xml:"DocRoot"` Signatures struct { Text string `xml:",chardata"` } `xml:"Signatures"` } `xml:"DocBody"` }
type OFDReader ¶
type OFDReader struct {
// contains filtered or unexported fields
}
func (*OFDReader) GetDocumentById ¶
func (*OFDReader) GetFileContent ¶
func (*OFDReader) GetSignaturesById ¶
func (ofdReader *OFDReader) GetSignaturesById(docId string) (*Signatures, error)
type PageXml ¶
type PageXml struct { XMLName xml.Name `xml:"Page"` Text string `xml:",chardata"` Ofd string `xml:"ofd,attr"` Area struct { Text string `xml:",chardata"` PhysicalBox struct { Text string `xml:",chardata"` } `xml:"PhysicalBox"` } `xml:"Area"` Content struct { Text string `xml:",chardata"` Layer struct { Text string `xml:",chardata"` ID string `xml:"ID,attr"` TextObject []struct { Text string `xml:",chardata"` ID string `xml:"ID,attr"` Boundary string `xml:"Boundary,attr"` Font string `xml:"Font,attr"` Size string `xml:"Size,attr"` Weight string `xml:"Weight,attr"` TextCode struct { Text string `xml:",chardata"` X string `xml:"X,attr"` Y string `xml:"Y,attr"` DeltaX string `xml:"DeltaX,attr"` } `xml:"TextCode"` } `xml:"TextObject"` PathObject []struct { Text string `xml:",chardata"` ID string `xml:"ID,attr"` Boundary string `xml:"Boundary,attr"` LineWidth string `xml:"LineWidth,attr"` AbbreviatedData struct { Text string `xml:",chardata"` } `xml:"AbbreviatedData"` } `xml:"PathObject"` ImageObject []struct { Text string `xml:",chardata"` ID string `xml:"ID,attr"` Boundary string `xml:"Boundary,attr"` CTM string `xml:"CTM,attr"` ResourceID string `xml:"ResourceID,attr"` } `xml:"ImageObject"` } `xml:"Layer"` } `xml:"Content"` }
type PublicRes ¶
type PublicRes struct { PublicResXml // contains filtered or unexported fields }
type PublicResXml ¶
type PublicResXml struct { XMLName xml.Name `xml:"Res"` Text string `xml:",chardata"` Ofd string `xml:"ofd,attr"` BaseLoc string `xml:"BaseLoc,attr"` Fonts struct { Text string `xml:",chardata"` Font []struct { Text string `xml:",chardata"` ID string `xml:"ID,attr"` FontName string `xml:"FontName,attr"` Bold string `xml:"Bold,attr"` } `xml:"Font"` } `xml:"Fonts"` }
type SES_CertList ¶
type SES_CertList struct {
// contains filtered or unexported fields
}
func New_SES_CertList ¶
func New_SES_CertList(cert_type int64, cert_list cryptobyte.String) (*SES_CertList, error)
func (*SES_CertList) Get_CertDigestList ¶
func (ses_certlist *SES_CertList) Get_CertDigestList() []byte
func (*SES_CertList) Get_Certs ¶
func (ses_certlist *SES_CertList) Get_Certs() []byte
type SES_ESPictrueInfo ¶
func New_SES_ESPictrueInfo ¶
func New_SES_ESPictrueInfo(pictrue cryptobyte.String) (*SES_ESPictrueInfo, error)
type SES_ESPropertyInfo ¶
type SES_ESPropertyInfo struct { Type int64 Name string CertListType int64 CertList cryptobyte.String CreateDate time.Time ValidStart time.Time ValidEnd time.Time }
func New_SES_ESPropertyInfo ¶
func New_SES_ESPropertyInfo(ses_property cryptobyte.String) (*SES_ESPropertyInfo, error)
func (*SES_ESPropertyInfo) Get_CertList ¶
func (ses_property_info *SES_ESPropertyInfo) Get_CertList() (*SES_CertList, error)
type SES_Header ¶
func New_SES_Header ¶
func New_SES_Header(ses_header cryptobyte.String) (*SES_Header, error)
type SES_Seal_Info ¶
type SES_Seal_Info struct {
// contains filtered or unexported fields
}
func New_SES_Seal_Info ¶
func New_SES_Seal_Info(input cryptobyte.String) (*SES_Seal_Info, error)
func (*SES_Seal_Info) Get_ESID ¶
func (ses_seal_info *SES_Seal_Info) Get_ESID() string
func (*SES_Seal_Info) Get_ExtDatas ¶
func (ses_seal_info *SES_Seal_Info) Get_ExtDatas() (*ExtensionDatas, error)
func (*SES_Seal_Info) Get_Header ¶
func (ses_seal_info *SES_Seal_Info) Get_Header() (*SES_Header, error)
func (*SES_Seal_Info) Get_Pictrue ¶
func (ses_seal_info *SES_Seal_Info) Get_Pictrue() (*SES_ESPictrueInfo, error)
func (*SES_Seal_Info) Get_Property ¶
func (ses_seal_info *SES_Seal_Info) Get_Property() (*SES_ESPropertyInfo, error)
type SES_Signature ¶
type SES_Signature struct {
// contains filtered or unexported fields
}
func New_SES_Signature ¶
func New_SES_Signature(input cryptobyte.String) (*SES_Signature, error)
func (*SES_Signature) Get_Cert ¶
func (ses *SES_Signature) Get_Cert() ([]byte, error)
func (*SES_Signature) Get_Signature ¶
func (ses *SES_Signature) Get_Signature() []byte
func (*SES_Signature) Get_SignatureAlgId ¶
func (ses *SES_Signature) Get_SignatureAlgId() string
func (*SES_Signature) Get_TBS_Sign ¶
func (ses *SES_Signature) Get_TBS_Sign() (*TBS_Sign, error)
type SESeal ¶
type SESeal struct {
// contains filtered or unexported fields
}
func New_SESeal ¶
func New_SESeal(seSeal cryptobyte.String) (*SESeal, error)
func (*SESeal) Get_SES_SealInfo ¶
func (seal *SESeal) Get_SES_SealInfo() (*SES_Seal_Info, error)
func (*SESeal) Get_Signature ¶
func (*SESeal) Get_SignatureAlgId ¶
type Signature ¶
type Signature struct { SignatureXml Validator Category Content []byte // contains filtered or unexported fields }
func (Signature) GetFileContent ¶
func (Signature) VerifyDigest ¶
type SignatureXml ¶
type SignatureXml struct { XMLName xml.Name `xml:"Signature"` Text string `xml:",chardata"` Ofd string `xml:"ofd,attr"` SignedInfo struct { Text string `xml:",chardata"` Provider struct { Text string `xml:",chardata"` ProviderName string `xml:"ProviderName,attr"` Version string `xml:"Version,attr"` Company string `xml:"Company,attr"` } `xml:"Provider"` SignatureMethod struct { Text string `xml:",chardata"` } `xml:"SignatureMethod"` SignatureDateTime struct { Text string `xml:",chardata"` } `xml:"SignatureDateTime"` Parameters struct { Text string `xml:",chardata"` Parameter struct { Text string `xml:",chardata"` Name string `xml:"Name,attr"` } `xml:"Parameter"` } `xml:"Parameters"` References struct { Text string `xml:",chardata"` CheckMethod string `xml:"CheckMethod,attr"` Reference []struct { Text string `xml:",chardata"` FileRef string `xml:"FileRef,attr"` CheckValue struct { Text string `xml:",chardata"` } `xml:"CheckValue"` } `xml:"Reference"` } `xml:"References"` StampAnnot struct { Text string `xml:",chardata"` ID string `xml:"ID,attr"` PageRef string `xml:"PageRef,attr"` Boundary string `xml:"Boundary,attr"` } `xml:"StampAnnot"` } `xml:"SignedInfo"` SignedValue struct { Text string `xml:",chardata"` } `xml:"SignedValue"` }
type Signatures ¶
type Signatures struct { SignaturesXml Validator // contains filtered or unexported fields }
func (Signatures) GetFileContent ¶
func (signatures Signatures) GetFileContent(path string) ([]byte, error)
func (Signatures) GetSignatureById ¶
func (signatures Signatures) GetSignatureById(signId string) (*Signature, error)
type SignaturesXml ¶
type SignaturesXml struct { XMLName xml.Name `xml:"Signatures"` Text string `xml:",chardata"` Ofd string `xml:"ofd,attr"` MaxSignId struct { Text string `xml:",chardata"` } `xml:"MaxSignId"` Signature []struct { Text string `xml:",chardata"` ID string `xml:"ID,attr"` Type string `xml:"Type,attr"` BaseLoc string `xml:"BaseLoc,attr"` } `xml:"Signature"` }
type SignedData ¶
type SignedData struct {
// contains filtered or unexported fields
}
func NewSignedData ¶
func NewSignedData(content cryptobyte.String) (*SignedData, error)
func (*SignedData) GetCertificates ¶
func (signedData *SignedData) GetCertificates() []byte
func (*SignedData) GetSignerInfos ¶
func (signedData *SignedData) GetSignerInfos() ([]SignerInfo, error)
type SignerInfo ¶
type SignerInfo struct {
// contains filtered or unexported fields
}
func NewSignerInfo ¶
func NewSignerInfo(signInfo cryptobyte.String) (*SignerInfo, error)
func (*SignerInfo) GetAuthenticatedAttributes ¶
func (signerInfo *SignerInfo) GetAuthenticatedAttributes() cryptobyte.String
func (*SignerInfo) GetDigestAlgorithm ¶
func (signerInfo *SignerInfo) GetDigestAlgorithm() string
func (*SignerInfo) GetDigestEncryptionAlgorithm ¶
func (signerInfo *SignerInfo) GetDigestEncryptionAlgorithm() string
func (*SignerInfo) GetEncryptedDigest ¶
func (signerInfo *SignerInfo) GetEncryptedDigest() cryptobyte.String
func (*SignerInfo) GetIssuerAndSerialNumber ¶
func (signerInfo *SignerInfo) GetIssuerAndSerialNumber() cryptobyte.String
func (*SignerInfo) GetUnauthenticatedAttributes ¶
func (signerInfo *SignerInfo) GetUnauthenticatedAttributes() cryptobyte.String
func (*SignerInfo) GetVersion ¶
func (signerInfo *SignerInfo) GetVersion() int64
type TBS_Sign ¶
type TBS_Sign struct {
// contains filtered or unexported fields
}
func New_TBS_Sign ¶
func New_TBS_Sign(input cryptobyte.String) (*TBS_Sign, error)
func (*TBS_Sign) Get_DataHash ¶
func (*TBS_Sign) Get_Version ¶
Click to show internal directories.
Click to hide internal directories.