Documentation ¶
Index ¶
- Constants
- Variables
- func ExtractCerts(path string, minSdkVersion, maxSdkVersion int32) (certs [][]*x509.Certificate, err error)
- func ExtractCertsReader(r io.ReadSeeker, minSdkVersion, maxSdkVersion int32) (certs [][]*x509.Certificate, err error)
- func IsSigningBlockNotFoundError(err error) bool
- func PkixNameToString(n *pkix.Name) string
- type FrostingResult
- type LineageCertCaps
- type SignatureAlgorithm
- type V3LineageSigningCertificateNode
- type V3LineageSigningCertificateNodeList
- type V3SigningLineage
- type VerificationResult
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 PkixNameToString ¶
Types ¶
type FrostingResult ¶
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 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 (n *V3LineageSigningCertificateNode) Dump(w io.Writer) error
func (*V3LineageSigningCertificateNode) Equal ¶
func (n *V3LineageSigningCertificateNode) Equal(o *V3LineageSigningCertificateNode) bool
type V3LineageSigningCertificateNodeList ¶
type V3LineageSigningCertificateNodeList []*V3LineageSigningCertificateNode
func (V3LineageSigningCertificateNodeList) Equal ¶
func (l V3LineageSigningCertificateNodeList) Equal(o V3LineageSigningCertificateNodeList) bool
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
Click to show internal directories.
Click to hide internal directories.