signjar

package
Version: v7.2.1+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 31, 2019 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DigestManifest

func DigestManifest(manifest []byte, hash crypto.Hash, sectionsOnly, apkV2 bool) ([]byte, error)

Transform a MANIFEST.MF into a *.SF by digesting each section with the specified hash

Types

type FilesMap

type FilesMap struct {
	Main  http.Header
	Order []string
	Files map[string]http.Header
}

func ParseManifest

func ParseManifest(manifest []byte) (files *FilesMap, err error)

func (*FilesMap) Dump

func (m *FilesMap) Dump() []byte

type JarDigest

type JarDigest struct {
	Digests  map[string]string
	Manifest []byte
	Hash     crypto.Hash
	// contains filtered or unexported fields
}

func DigestJarStream

func DigestJarStream(r io.Reader, hash crypto.Hash) (*JarDigest, error)

func (*JarDigest) Sign

func (jd *JarDigest) Sign(ctx context.Context, cert *certloader.Certificate, alias string, sectionsOnly, inlineSignature, apkV2 bool) (*binpatch.PatchSet, *pkcs9.TimestampedSignature, error)

type JarSignature

type JarSignature struct {
	pkcs9.TimestampedSignature
	SignatureHeader http.Header
	Hash            crypto.Hash
}

func Verify

func Verify(inz *zip.Reader, skipDigests bool) ([]*JarSignature, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL