Documentation ¶
Index ¶
- Constants
- func CreateSignature(signedData *etree.Element, ctx *SigningContext) (*etree.Element, error)
- func DigestValue(element *etree.Element, canonicalizer *dsig.Canonicalizer, hash crypto.Hash) (base64encoded string, err error)
- func SignatureValue(element *etree.Element, canonicalizer *dsig.Canonicalizer, hash crypto.Hash, ...) (base64encoded string, err error)
- type MemoryX509KeyStore
- type SignedDataContext
- type SignedPropertiesContext
- type SigningContext
Constants ¶
View Source
const ( SignedPropertiesTag string = "SignedProperties" SignedSignaturePropertiesTag string = "SignedSignatureProperties" SigningTimeTag string = "SigningTime" SigningCertificateTag string = "SigningCertificate" CertTag string = "Cert" IssuerSerialTag string = "IssuerSerial" CertDigestTag string = "CertDigest" QualifyingPropertiesTag string = "QualifyingProperties" MimeTypeTag string = "MimeType" DescriptionTag string = "Description" DataObjectFormatTag string = "DataObjectFormat" SignedDataObjectPropertiesTag string = "SignedDataObjectProperties" )
View Source
const (
EtsiNamespace string = "http://uri.etsi.org/01903/v1.3.2#"
)
Variables ¶
This section is empty.
Functions ¶
func CreateSignature ¶
CreateSignature create filled signature element
func DigestValue ¶
func DigestValue(element *etree.Element, canonicalizer *dsig.Canonicalizer, hash crypto.Hash) (base64encoded string, err error)
DigestValue calculate hash for digest
func SignatureValue ¶
func SignatureValue(element *etree.Element, canonicalizer *dsig.Canonicalizer, hash crypto.Hash, keyStore *MemoryX509KeyStore) (base64encoded string, err error)
SignatureValue calculate signature
Types ¶
type MemoryX509KeyStore ¶
type MemoryX509KeyStore struct { PrivateKey *rsa.PrivateKey Cert *x509.Certificate CertBinary []byte }
MemoryX509KeyStore struct
func (*MemoryX509KeyStore) GetKeyPair ¶
func (ks *MemoryX509KeyStore) GetKeyPair() (*rsa.PrivateKey, []byte, error)
GetKeyPair func
type SignedDataContext ¶
type SignedPropertiesContext ¶
type SigningContext ¶
type SigningContext struct { DataContext SignedDataContext PropertiesContext SignedPropertiesContext Canonicalizer dsig.Canonicalizer Hash crypto.Hash KeyStore MemoryX509KeyStore DsigNamespacePrefix string EtsiNamespacePrefix string EtsiNamespaceAtTopLevel bool SignatureId string SignedInfoId string SignatureValueId string KeyInfoId string ObjectId string SignedPropertiesId string ReferenceMainDocumentId string ReferencePropertiesId string IncludeKeyValue bool IncludeSignedDataObjectProperties bool SignedDataObjectDescription string ReferenceCertificate bool ReferenceDataLast bool ReferenceAvoidTransformElements bool }
Click to show internal directories.
Click to hide internal directories.