Documentation ¶
Index ¶
Constants ¶
View Source
const ( SigTypeDSA = uint16(0) SigTypeECDSAWithSHA256 = uint16(1) SigTypeECDSAWithSHA384 = uint16(2) SigTypeECDSAWithSHA512 = uint16(3) SigTypeRSAWithSHA256 = uint16(4) SigTypeRSAWithSHA384 = uint16(5) SigTypeRSAWithSHA512 = uint16(6) ContentTypeUnknown = uint8(0) ContentTypeRouter = uint8(1) ContentTypePlugin = uint8(2) ContentTypeReseed = uint8(3) ContentTypeNews = uint8(4) ContentTypeBlocklist = uint8(5) FileTypeZIP = uint8(0) FileTypeXML = uint8(1) FileTypeHTML = uint8(2) FileTypeXMLGZ = uint8(3) FileTypeTXTGZ = uint8(4) FileTypeDMG = uint8(5) FileTypeEXE = uint8(6) )
Variables ¶
This section is empty.
Functions ¶
func NewSigningCertificate ¶
func NewSigningCertificate(signerID string, privateKey *rsa.PrivateKey) ([]byte, error)
Types ¶
type File ¶
type File struct { Format uint8 SignatureType uint16 FileType uint8 ContentType uint8 Version []byte SignerID []byte Content []byte Signature []byte SignedBytes []byte }
func (*File) MarshalBinary ¶
func (*File) UnmarshalBinary ¶
func (*File) VerifySignature ¶
func (s *File) VerifySignature(cert *x509.Certificate) error
Click to show internal directories.
Click to hide internal directories.