Documentation ¶
Index ¶
Constants ¶
View Source
const ( MIN_VERSION_LENGTH = 16 SIGTYPE_DSA = uint16(0) SIGTYPE_ECDSA_SHA256 = uint16(1) SIGTYPE_ECDSA_SHA384 = uint16(2) SIGTYPE_ECDSA_SHA512 = uint16(3) SIGTYPE_RSA_SHA256 = uint16(4) SIGTYPE_RSA_SHA384 = uint16(5) SIGTYPE_RSA_SHA512 = uint16(6) CONTENT_TYPE_UNKNOWN = uint8(0) CONTENT_TYPE_ROUTER = uint8(1) CONTENT_TYPE_PLUGIN = uint8(2) CONTENT_TYPE_RESEED = uint8(3) CONTENT_TYPE_NEWS = uint8(4) FILE_TYPE_ZIP = uint8(0) FILE_TYPE_XML = uint8(1) FILE_TYPE_HTML = uint8(2) FILE_TYPE_XMLGZ = uint8(3) )
Variables ¶
View Source
var (
MAGIC_BYTES = []byte("I2Psu3")
)
Functions ¶
func NewSigningCertificate ¶
func NewSigningCertificate(signerId string, privateKey *rsa.PrivateKey) ([]byte, error)
Types ¶
type Su3File ¶
type Su3File struct { Format uint8 SignatureType uint16 FileType uint8 ContentType uint8 Version []byte SignerId []byte Content []byte Signature []byte SignedBytes []byte }
func NewSu3File ¶
func NewSu3File() *Su3File
func (*Su3File) MarshalBinary ¶
func (*Su3File) UnmarshalBinary ¶
func (*Su3File) VerifySignature ¶
func (s *Su3File) VerifySignature(cert *x509.Certificate) error
Click to show internal directories.
Click to hide internal directories.