signingblock

package
v0.0.0-...-b515d4e Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2019 License: LGPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SigRsaPssWithSha256            SignatureAlgorithm = 0x0101
	SigRsaPssWithSha512                               = 0x0102
	SigRsaPkcs1V15WithSha256                          = 0x0103
	SigRsaPkcs1V15WithSha512                          = 0x0104
	SigEcdsaWithSha256                                = 0x0201
	SigEcdsaWithSha512                                = 0x0202
	SigDsaWithSha256                                  = 0x0301
	SigVerityRsaPkcs1V15WithSha256                    = 0x0421
	SigVerityEcdsaWithSha256                          = 0x0423
	SigVerityDsaWithSha256                            = 0x425
)

Variables

View Source
var (
	ErrFrostingInvalidSignature = errors.New("invalid frosting signature")
	ErrFrostingDigestMismatch   = errors.New("frosting apk file digest mismatch")
)

Functions

func ExtractCerts

func ExtractCerts(path string, minSdkVersion, maxSdkVersion int32) (certs [][]*x509.Certificate, err error)

func IsSigningBlockNotFoundError

func IsSigningBlockNotFoundError(err error) bool

func PkixNameToString

func PkixNameToString(n *pkix.Name) string

Types

type FrostingResult

type FrostingResult struct {
	Error        error
	KeySha256    string
	ProtobufInfo []byte
}

type SignatureAlgorithm

type SignatureAlgorithm int32

func (SignatureAlgorithm) String

func (algo SignatureAlgorithm) String() string

type V3LineageSigningCertificateNode

type V3LineageSigningCertificateNode struct {
	SigningCert        *x509.Certificate
	ParentSigAlgorithm SignatureAlgorithm
	SigAlgorithm       SignatureAlgorithm
	Signature          []byte
	Flags              int32
}

func (*V3LineageSigningCertificateNode) Dump

func (*V3LineageSigningCertificateNode) Equal

type V3LineageSigningCertificateNodeList

type V3LineageSigningCertificateNodeList []*V3LineageSigningCertificateNode

func (V3LineageSigningCertificateNodeList) Equal

type V3SigningLineage

type V3SigningLineage struct {
	MinSdkVersion int
	Nodes         V3LineageSigningCertificateNodeList
}

type VerificationResult

type VerificationResult struct {
	Certs          [][]*x509.Certificate
	SchemeId       int
	SigningLineage *V3SigningLineage

	Frosting *FrostingResult

	Warnings []string
	Errors   []error
}

func CustomVerifySigningBlock

func CustomVerifySigningBlock(f multipart.File, filesize int64, minSdkVersion, maxSdkVersion int32) (res *VerificationResult, magic uint32, err error)

func VerifySigningBlock

func VerifySigningBlock(path string, minSdkVersion, maxSdkVersion int32) (res *VerificationResult, magic uint32, err error)

func (*VerificationResult) ContainsErrors

func (r *VerificationResult) ContainsErrors() bool

func (*VerificationResult) GetLastError

func (r *VerificationResult) GetLastError() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL