Documentation
¶
Index ¶
- Constants
- type Arc
- type AuthGraphKeyExchangeProxy
- func (p *AuthGraphKeyExchangeProxy) AsBinder() binder.IBinder
- func (p *AuthGraphKeyExchangeProxy) AuthenticationComplete(ctx context.Context, peerSignature SessionIdSignature, sharedKeys []Arc) ([]Arc, error)
- func (p *AuthGraphKeyExchangeProxy) Create(ctx context.Context) (SessionInitiationInfo, error)
- func (p *AuthGraphKeyExchangeProxy) Finish(ctx context.Context, peerPubKey PubKey, peerId Identity, ...) (SessionInfo, error)
- func (p *AuthGraphKeyExchangeProxy) Init(ctx context.Context, peerPubKey PubKey, peerId Identity, peerNonce []byte, ...) (KeInitResult, error)
- type AuthGraphKeyExchangeStub
- type Error
- type IAuthGraphKeyExchange
- type IAuthGraphKeyExchangeServer
- type Identity
- type KeInitResult
- type Key
- type PlainPubKey
- type PubKey
- func (u *PubKey) GetPlainKey() (PlainPubKey, bool)
- func (u *PubKey) GetSignedKey() (SignedPubKey, bool)
- func (u *PubKey) MarshalParcel(p *parcel.Parcel) error
- func (u *PubKey) SetPlainKey(v PlainPubKey)
- func (u *PubKey) SetSignedKey(v SignedPubKey)
- func (u *PubKey) UnmarshalParcel(p *parcel.Parcel) error
- type SessionIdSignature
- type SessionInfo
- type SessionInitiationInfo
- type SignedPubKey
Constants ¶
View Source
const ( TransactionIAuthGraphKeyExchangeCreate = binder.FirstCallTransaction + 0 TransactionIAuthGraphKeyExchangeInit = binder.FirstCallTransaction + 1 TransactionIAuthGraphKeyExchangeFinish = binder.FirstCallTransaction + 2 TransactionIAuthGraphKeyExchangeAuthenticationComplete = binder.FirstCallTransaction + 3 )
View Source
const ( MethodIAuthGraphKeyExchangeCreate = "create" MethodIAuthGraphKeyExchangeInit = "init" MethodIAuthGraphKeyExchangeFinish = "finish" MethodIAuthGraphKeyExchangeAuthenticationComplete = "authenticationComplete" )
View Source
const ( PubKeyTagPlainKey int32 = 0 PubKeyTagSignedKey int32 = 1 )
View Source
const DescriptorIAuthGraphKeyExchange = "android.hardware.security.authgraph.IAuthGraphKeyExchange"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthGraphKeyExchangeProxy ¶
func NewAuthGraphKeyExchangeProxy ¶
func NewAuthGraphKeyExchangeProxy( remote binder.IBinder, ) *AuthGraphKeyExchangeProxy
func (*AuthGraphKeyExchangeProxy) AsBinder ¶
func (p *AuthGraphKeyExchangeProxy) AsBinder() binder.IBinder
func (*AuthGraphKeyExchangeProxy) AuthenticationComplete ¶
func (p *AuthGraphKeyExchangeProxy) AuthenticationComplete( ctx context.Context, peerSignature SessionIdSignature, sharedKeys []Arc, ) ([]Arc, error)
func (*AuthGraphKeyExchangeProxy) Create ¶
func (p *AuthGraphKeyExchangeProxy) Create( ctx context.Context, ) (SessionInitiationInfo, error)
func (*AuthGraphKeyExchangeProxy) Finish ¶
func (p *AuthGraphKeyExchangeProxy) Finish( ctx context.Context, peerPubKey PubKey, peerId Identity, peerSignature SessionIdSignature, peerNonce []byte, peerVersion int32, ownKey Key, ) (SessionInfo, error)
type AuthGraphKeyExchangeStub ¶
type AuthGraphKeyExchangeStub struct {
Impl IAuthGraphKeyExchange
Transport binder.VersionAwareTransport
}
AuthGraphKeyExchangeStub dispatches incoming binder transactions to a typed IAuthGraphKeyExchange implementation.
func (*AuthGraphKeyExchangeStub) Descriptor ¶
func (s *AuthGraphKeyExchangeStub) Descriptor() string
func (*AuthGraphKeyExchangeStub) OnTransaction ¶
func (s *AuthGraphKeyExchangeStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)
type Error ¶
type Error int32
const ( ErrorOK Error = 0 ErrorInvalidPeerNonce Error = -1 ErrorInvalidPeerKeKey Error = -2 ErrorInvalidIdentity Error = -3 ErrorInvalidCertChain Error = -4 ErrorInvalidSignature Error = -5 ErrorInvalidKeKey Error = -6 ErrorInvalidPubKeyInKey Error = -7 ErrorInvalidPrivKeyArcInKey Error = -8 ErrorMemoryAllocationFailed Error = -10 ErrorIncompatibleProtocolVersion Error = -11 )
type IAuthGraphKeyExchange ¶
type IAuthGraphKeyExchange interface {
AsBinder() binder.IBinder
Create(ctx context.Context) (SessionInitiationInfo, error)
Init(ctx context.Context, peerPubKey PubKey, peerId Identity, peerNonce []byte, peerVersion int32) (KeInitResult, error)
Finish(ctx context.Context, peerPubKey PubKey, peerId Identity, peerSignature SessionIdSignature, peerNonce []byte, peerVersion int32, ownKey Key) (SessionInfo, error)
AuthenticationComplete(ctx context.Context, peerSignature SessionIdSignature, sharedKeys []Arc) ([]Arc, error)
}
func NewAuthGraphKeyExchangeStub ¶
func NewAuthGraphKeyExchangeStub( impl IAuthGraphKeyExchangeServer, ) IAuthGraphKeyExchange
NewAuthGraphKeyExchangeStub creates a server-side IAuthGraphKeyExchange wrapping the given server implementation. The returned value satisfies IAuthGraphKeyExchange and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.
type IAuthGraphKeyExchangeServer ¶
type IAuthGraphKeyExchangeServer interface {
Create(ctx context.Context) (SessionInitiationInfo, error)
Init(ctx context.Context, peerPubKey PubKey, peerId Identity, peerNonce []byte, peerVersion int32) (KeInitResult, error)
Finish(ctx context.Context, peerPubKey PubKey, peerId Identity, peerSignature SessionIdSignature, peerNonce []byte, peerVersion int32, ownKey Key) (SessionInfo, error)
AuthenticationComplete(ctx context.Context, peerSignature SessionIdSignature, sharedKeys []Arc) ([]Arc, error)
}
IAuthGraphKeyExchangeServer is the server-side interface that user implementations provide to NewAuthGraphKeyExchangeStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type KeInitResult ¶
type KeInitResult struct {
SessionInitiationInfo SessionInitiationInfo
SessionInfo SessionInfo
}
func (*KeInitResult) MarshalParcel ¶
func (s *KeInitResult) MarshalParcel( p *parcel.Parcel, ) error
func (*KeInitResult) UnmarshalParcel ¶
func (s *KeInitResult) UnmarshalParcel( p *parcel.Parcel, ) error
type PlainPubKey ¶
type PlainPubKey struct {
PlainPubKey []byte
}
func (*PlainPubKey) MarshalParcel ¶
func (s *PlainPubKey) MarshalParcel( p *parcel.Parcel, ) error
func (*PlainPubKey) UnmarshalParcel ¶
func (s *PlainPubKey) UnmarshalParcel( p *parcel.Parcel, ) error
type PubKey ¶
type PubKey struct {
Tag int32
PlainKey PlainPubKey
SignedKey SignedPubKey
}
func (*PubKey) GetPlainKey ¶
func (u *PubKey) GetPlainKey() (PlainPubKey, bool)
func (*PubKey) GetSignedKey ¶
func (u *PubKey) GetSignedKey() (SignedPubKey, bool)
func (*PubKey) SetPlainKey ¶
func (u *PubKey) SetPlainKey( v PlainPubKey, )
func (*PubKey) SetSignedKey ¶
func (u *PubKey) SetSignedKey( v SignedPubKey, )
type SessionIdSignature ¶
type SessionIdSignature struct {
Signature []byte
}
func (*SessionIdSignature) MarshalParcel ¶
func (s *SessionIdSignature) MarshalParcel( p *parcel.Parcel, ) error
func (*SessionIdSignature) UnmarshalParcel ¶
func (s *SessionIdSignature) UnmarshalParcel( p *parcel.Parcel, ) error
type SessionInfo ¶
type SessionInfo struct {
SessionId []byte
Signature SessionIdSignature
}
func (*SessionInfo) MarshalParcel ¶
func (s *SessionInfo) MarshalParcel( p *parcel.Parcel, ) error
func (*SessionInfo) UnmarshalParcel ¶
func (s *SessionInfo) UnmarshalParcel( p *parcel.Parcel, ) error
type SessionInitiationInfo ¶
func (*SessionInitiationInfo) MarshalParcel ¶
func (s *SessionInitiationInfo) MarshalParcel( p *parcel.Parcel, ) error
func (*SessionInitiationInfo) UnmarshalParcel ¶
func (s *SessionInitiationInfo) UnmarshalParcel( p *parcel.Parcel, ) error
type SignedPubKey ¶
type SignedPubKey struct {
SignedPubKey []byte
}
func (*SignedPubKey) MarshalParcel ¶
func (s *SignedPubKey) MarshalParcel( p *parcel.Parcel, ) error
func (*SignedPubKey) UnmarshalParcel ¶
func (s *SignedPubKey) UnmarshalParcel( p *parcel.Parcel, ) error
Click to show internal directories.
Click to hide internal directories.