security

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2026 License: CC0-1.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TransactionIFileIntegrityServiceIsApkVeritySupported          = binder.FirstCallTransaction + 0
	TransactionIFileIntegrityServiceIsAppSourceCertificateTrusted = binder.FirstCallTransaction + 1
	TransactionIFileIntegrityServiceCreateAuthToken               = binder.FirstCallTransaction + 2
	TransactionIFileIntegrityServiceSetupFsverity                 = binder.FirstCallTransaction + 3
)
View Source
const (
	TransactionIKeyChainServiceRequestPrivateKey                     = binder.FirstCallTransaction + 0
	TransactionIKeyChainServiceGetCertificate                        = binder.FirstCallTransaction + 1
	TransactionIKeyChainServiceGetCaCertificates                     = binder.FirstCallTransaction + 2
	TransactionIKeyChainServiceIsUserSelectable                      = binder.FirstCallTransaction + 3
	TransactionIKeyChainServiceSetUserSelectable                     = binder.FirstCallTransaction + 4
	TransactionIKeyChainServiceGenerateKeyPair                       = binder.FirstCallTransaction + 5
	TransactionIKeyChainServiceSetKeyPairCertificate                 = binder.FirstCallTransaction + 6
	TransactionIKeyChainServiceInstallCaCertificate                  = binder.FirstCallTransaction + 7
	TransactionIKeyChainServiceInstallKeyPair                        = binder.FirstCallTransaction + 8
	TransactionIKeyChainServiceRemoveKeyPair                         = binder.FirstCallTransaction + 9
	TransactionIKeyChainServiceContainsKeyPair                       = binder.FirstCallTransaction + 10
	TransactionIKeyChainServiceGetGrants                             = binder.FirstCallTransaction + 11
	TransactionIKeyChainServiceDeleteCaCertificate                   = binder.FirstCallTransaction + 12
	TransactionIKeyChainServiceReset                                 = binder.FirstCallTransaction + 13
	TransactionIKeyChainServiceGetUserCaAliases                      = binder.FirstCallTransaction + 14
	TransactionIKeyChainServiceGetSystemCaAliases                    = binder.FirstCallTransaction + 15
	TransactionIKeyChainServiceContainsCaAlias                       = binder.FirstCallTransaction + 16
	TransactionIKeyChainServiceGetEncodedCaCertificate               = binder.FirstCallTransaction + 17
	TransactionIKeyChainServiceGetCaCertificateChainAliases          = binder.FirstCallTransaction + 18
	TransactionIKeyChainServiceSetCredentialManagementApp            = binder.FirstCallTransaction + 19
	TransactionIKeyChainServiceHasCredentialManagementApp            = binder.FirstCallTransaction + 20
	TransactionIKeyChainServiceGetCredentialManagementAppPackageName = binder.FirstCallTransaction + 21
	TransactionIKeyChainServiceGetCredentialManagementAppPolicy      = binder.FirstCallTransaction + 22
	TransactionIKeyChainServiceGetPredefinedAliasForPackageAndUri    = binder.FirstCallTransaction + 23
	TransactionIKeyChainServiceRemoveCredentialManagementApp         = binder.FirstCallTransaction + 24
	TransactionIKeyChainServiceIsCredentialManagementApp             = binder.FirstCallTransaction + 25
	TransactionIKeyChainServiceSetGrant                              = binder.FirstCallTransaction + 26
	TransactionIKeyChainServiceHasGrant                              = binder.FirstCallTransaction + 27
	TransactionIKeyChainServiceGetWifiKeyGrantAsUser                 = binder.FirstCallTransaction + 28
)
View Source
const DescriptorIFileIntegrityService = "android.security.IFileIntegrityService"
View Source
const DescriptorIKeyChainAliasCallback = "android.security.IKeyChainAliasCallback"
View Source
const DescriptorIKeyChainService = "android.security.IKeyChainService"
View Source
const (
	TransactionIKeyChainAliasCallbackAlias = binder.FirstCallTransaction + 0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AppUriAuthenticationPolicy

type AppUriAuthenticationPolicy struct {
}

func (*AppUriAuthenticationPolicy) MarshalParcel

func (s *AppUriAuthenticationPolicy) MarshalParcel(
	p *parcel.Parcel,
) error

func (*AppUriAuthenticationPolicy) UnmarshalParcel

func (s *AppUriAuthenticationPolicy) UnmarshalParcel(
	p *parcel.Parcel,
) error

type FileIntegrityServiceProxy

type FileIntegrityServiceProxy struct {
	// contains filtered or unexported fields
}

func NewFileIntegrityServiceProxy

func NewFileIntegrityServiceProxy(
	remote binder.IBinder,
) *FileIntegrityServiceProxy

func (*FileIntegrityServiceProxy) AsBinder

func (*FileIntegrityServiceProxy) CreateAuthToken

func (*FileIntegrityServiceProxy) IsApkVeritySupported

func (p *FileIntegrityServiceProxy) IsApkVeritySupported(
	ctx context.Context,
) (bool, error)

func (*FileIntegrityServiceProxy) IsAppSourceCertificateTrusted

func (p *FileIntegrityServiceProxy) IsAppSourceCertificateTrusted(
	ctx context.Context,
	certificateBytes []byte,
	packageName string,
) (bool, error)

func (*FileIntegrityServiceProxy) SetupFsverity

func (p *FileIntegrityServiceProxy) SetupFsverity(
	ctx context.Context,
	authToken IInstalld.IFsveritySetupAuthToken,
	filePath string,
	packageName string,
) (int32, error)

type IFileIntegrityService

type IFileIntegrityService interface {
	AsBinder() binder.IBinder
	IsApkVeritySupported(ctx context.Context) (bool, error)
	IsAppSourceCertificateTrusted(ctx context.Context, certificateBytes []byte, packageName string) (bool, error)
	CreateAuthToken(ctx context.Context, authFd int32) (IInstalld.IFsveritySetupAuthToken, error)
	SetupFsverity(ctx context.Context, authToken IInstalld.IFsveritySetupAuthToken, filePath string, packageName string) (int32, error)
}

type IKeyChainAliasCallback

type IKeyChainAliasCallback interface {
	AsBinder() binder.IBinder
	Alias(ctx context.Context, alias string) error
}

type IKeyChainService

type IKeyChainService interface {
	AsBinder() binder.IBinder
	RequestPrivateKey(ctx context.Context, alias string) (string, error)
	GetCertificate(ctx context.Context, alias string) ([]byte, error)
	GetCaCertificates(ctx context.Context, alias string) ([]byte, error)
	IsUserSelectable(ctx context.Context, alias string) (bool, error)
	SetUserSelectable(ctx context.Context, alias string, isUserSelectable bool) error
	GenerateKeyPair(ctx context.Context, algorithm string, spec keystore.ParcelableKeyGenParameterSpec) (int32, error)
	SetKeyPairCertificate(ctx context.Context, alias string, userCert []byte, certChain []byte) (bool, error)
	InstallCaCertificate(ctx context.Context, caCertificate []byte) (string, error)
	InstallKeyPair(ctx context.Context, privateKey []byte, userCert []byte, certChain []byte, alias string, uid int32) (bool, error)
	RemoveKeyPair(ctx context.Context, alias string) (bool, error)
	ContainsKeyPair(ctx context.Context, alias string) (bool, error)
	GetGrants(ctx context.Context, alias string) ([]int32, error)
	DeleteCaCertificate(ctx context.Context, alias string) (bool, error)
	Reset(ctx context.Context) (bool, error)
	GetUserCaAliases(ctx context.Context) (pm.StringParceledListSlice, error)
	GetSystemCaAliases(ctx context.Context) (pm.StringParceledListSlice, error)
	ContainsCaAlias(ctx context.Context, alias string) (bool, error)
	GetEncodedCaCertificate(ctx context.Context, alias string, includeDeletedSystem bool) ([]byte, error)
	GetCaCertificateChainAliases(ctx context.Context, rootAlias string, includeDeletedSystem bool) ([]string, error)
	SetCredentialManagementApp(ctx context.Context, packageName string, policy AppUriAuthenticationPolicy) error
	HasCredentialManagementApp(ctx context.Context) (bool, error)
	GetCredentialManagementAppPackageName(ctx context.Context) (string, error)
	GetCredentialManagementAppPolicy(ctx context.Context) (AppUriAuthenticationPolicy, error)
	GetPredefinedAliasForPackageAndUri(ctx context.Context, packageName string, uri net.Uri) (string, error)
	RemoveCredentialManagementApp(ctx context.Context) error
	IsCredentialManagementApp(ctx context.Context, packageName string) (bool, error)
	SetGrant(ctx context.Context, uid int32, alias string, value bool) (bool, error)
	HasGrant(ctx context.Context, uid int32, alias string) (bool, error)
	GetWifiKeyGrantAsUser(ctx context.Context, alias string) (string, error)
}

type KeyChainAliasCallbackProxy

type KeyChainAliasCallbackProxy struct {
	// contains filtered or unexported fields
}

func NewKeyChainAliasCallbackProxy

func NewKeyChainAliasCallbackProxy(
	remote binder.IBinder,
) *KeyChainAliasCallbackProxy

func (*KeyChainAliasCallbackProxy) Alias

func (p *KeyChainAliasCallbackProxy) Alias(
	ctx context.Context,
	alias string,
) error

func (*KeyChainAliasCallbackProxy) AsBinder

type KeyChainServiceProxy

type KeyChainServiceProxy struct {
	// contains filtered or unexported fields
}

func NewKeyChainServiceProxy

func NewKeyChainServiceProxy(
	remote binder.IBinder,
) *KeyChainServiceProxy

func (*KeyChainServiceProxy) AsBinder

func (p *KeyChainServiceProxy) AsBinder() binder.IBinder

func (*KeyChainServiceProxy) ContainsCaAlias

func (p *KeyChainServiceProxy) ContainsCaAlias(
	ctx context.Context,
	alias string,
) (bool, error)

func (*KeyChainServiceProxy) ContainsKeyPair

func (p *KeyChainServiceProxy) ContainsKeyPair(
	ctx context.Context,
	alias string,
) (bool, error)

func (*KeyChainServiceProxy) DeleteCaCertificate

func (p *KeyChainServiceProxy) DeleteCaCertificate(
	ctx context.Context,
	alias string,
) (bool, error)

func (*KeyChainServiceProxy) GenerateKeyPair

func (p *KeyChainServiceProxy) GenerateKeyPair(
	ctx context.Context,
	algorithm string,
	spec keystore.ParcelableKeyGenParameterSpec,
) (int32, error)

func (*KeyChainServiceProxy) GetCaCertificateChainAliases

func (p *KeyChainServiceProxy) GetCaCertificateChainAliases(
	ctx context.Context,
	rootAlias string,
	includeDeletedSystem bool,
) ([]string, error)

func (*KeyChainServiceProxy) GetCaCertificates

func (p *KeyChainServiceProxy) GetCaCertificates(
	ctx context.Context,
	alias string,
) ([]byte, error)

func (*KeyChainServiceProxy) GetCertificate

func (p *KeyChainServiceProxy) GetCertificate(
	ctx context.Context,
	alias string,
) ([]byte, error)

func (*KeyChainServiceProxy) GetCredentialManagementAppPackageName

func (p *KeyChainServiceProxy) GetCredentialManagementAppPackageName(
	ctx context.Context,
) (string, error)

func (*KeyChainServiceProxy) GetCredentialManagementAppPolicy

func (p *KeyChainServiceProxy) GetCredentialManagementAppPolicy(
	ctx context.Context,
) (AppUriAuthenticationPolicy, error)

func (*KeyChainServiceProxy) GetEncodedCaCertificate

func (p *KeyChainServiceProxy) GetEncodedCaCertificate(
	ctx context.Context,
	alias string,
	includeDeletedSystem bool,
) ([]byte, error)

func (*KeyChainServiceProxy) GetGrants

func (p *KeyChainServiceProxy) GetGrants(
	ctx context.Context,
	alias string,
) ([]int32, error)

func (*KeyChainServiceProxy) GetPredefinedAliasForPackageAndUri

func (p *KeyChainServiceProxy) GetPredefinedAliasForPackageAndUri(
	ctx context.Context,
	packageName string,
	uri net.Uri,
) (string, error)

func (*KeyChainServiceProxy) GetSystemCaAliases

func (p *KeyChainServiceProxy) GetSystemCaAliases(
	ctx context.Context,
) (pm.StringParceledListSlice, error)

func (*KeyChainServiceProxy) GetUserCaAliases

func (p *KeyChainServiceProxy) GetUserCaAliases(
	ctx context.Context,
) (pm.StringParceledListSlice, error)

func (*KeyChainServiceProxy) GetWifiKeyGrantAsUser

func (p *KeyChainServiceProxy) GetWifiKeyGrantAsUser(
	ctx context.Context,
	alias string,
) (string, error)

func (*KeyChainServiceProxy) HasCredentialManagementApp

func (p *KeyChainServiceProxy) HasCredentialManagementApp(
	ctx context.Context,
) (bool, error)

func (*KeyChainServiceProxy) HasGrant

func (p *KeyChainServiceProxy) HasGrant(
	ctx context.Context,
	uid int32,
	alias string,
) (bool, error)

func (*KeyChainServiceProxy) InstallCaCertificate

func (p *KeyChainServiceProxy) InstallCaCertificate(
	ctx context.Context,
	caCertificate []byte,
) (string, error)

func (*KeyChainServiceProxy) InstallKeyPair

func (p *KeyChainServiceProxy) InstallKeyPair(
	ctx context.Context,
	privateKey []byte,
	userCert []byte,
	certChain []byte,
	alias string,
	uid int32,
) (bool, error)

func (*KeyChainServiceProxy) IsCredentialManagementApp

func (p *KeyChainServiceProxy) IsCredentialManagementApp(
	ctx context.Context,
	packageName string,
) (bool, error)

func (*KeyChainServiceProxy) IsUserSelectable

func (p *KeyChainServiceProxy) IsUserSelectable(
	ctx context.Context,
	alias string,
) (bool, error)

func (*KeyChainServiceProxy) RemoveCredentialManagementApp

func (p *KeyChainServiceProxy) RemoveCredentialManagementApp(
	ctx context.Context,
) error

func (*KeyChainServiceProxy) RemoveKeyPair

func (p *KeyChainServiceProxy) RemoveKeyPair(
	ctx context.Context,
	alias string,
) (bool, error)

func (*KeyChainServiceProxy) RequestPrivateKey

func (p *KeyChainServiceProxy) RequestPrivateKey(
	ctx context.Context,
	alias string,
) (string, error)

func (*KeyChainServiceProxy) Reset

func (p *KeyChainServiceProxy) Reset(
	ctx context.Context,
) (bool, error)

func (*KeyChainServiceProxy) SetCredentialManagementApp

func (p *KeyChainServiceProxy) SetCredentialManagementApp(
	ctx context.Context,
	packageName string,
	policy AppUriAuthenticationPolicy,
) error

func (*KeyChainServiceProxy) SetGrant

func (p *KeyChainServiceProxy) SetGrant(
	ctx context.Context,
	uid int32,
	alias string,
	value bool,
) (bool, error)

func (*KeyChainServiceProxy) SetKeyPairCertificate

func (p *KeyChainServiceProxy) SetKeyPairCertificate(
	ctx context.Context,
	alias string,
	userCert []byte,
	certChain []byte,
) (bool, error)

func (*KeyChainServiceProxy) SetUserSelectable

func (p *KeyChainServiceProxy) SetUserSelectable(
	ctx context.Context,
	alias string,
	isUserSelectable bool,
) error

Jump to

Keyboard shortcuts

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