signingblock

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2021 License: LGPL-3.0 Imports: 26 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 ExtractCertsReader

func ExtractCertsReader(r io.ReadSeeker, 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 LineageCertCaps

type LineageCertCaps int32

frameworks/base/core/java/android/content/pm/PackageParser.java public @interface CertCapabilities

const (
	CapInstalledData LineageCertCaps = 1  // accept data from already installed pkg with this cert
	CapSharedUserId  LineageCertCaps = 2  // accept sharedUserId with pkg with this cert
	CapPermission    LineageCertCaps = 4  // grant SIGNATURE permissions to pkgs with this cert
	CapRollback      LineageCertCaps = 8  // allow pkg to update to one signed by this certificate
	CapAuth          LineageCertCaps = 16 // allow pkg to continue to have auth access gated by this cert
)

func (LineageCertCaps) String

func (c LineageCertCaps) String() string

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              LineageCertCaps
}

func (*V3LineageSigningCertificateNode) Dump

func (*V3LineageSigningCertificateNode) Equal

type V3LineageSigningCertificateNodeList

type V3LineageSigningCertificateNodeList []*V3LineageSigningCertificateNode

func (V3LineageSigningCertificateNodeList) Equal

type V3SigningLineage

type V3SigningLineage struct {
	MinSdkVersion int32
	Nodes         V3LineageSigningCertificateNodeList
}

type VerificationResult

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

	Frosting *FrostingResult

	Warnings []string
	Errors   []error
}

func VerifySigningBlock

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

func VerifySigningBlockReader

func VerifySigningBlockReader(r io.ReadSeeker, 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