v1

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2020 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRemoteSignedSecureRequest

func NewRemoteSignedSecureRequest(request protocol.Request, security SecurityProvider) (secure protocol.SecureRequest, err error)

NewRemoteSignedSecureRequest is a NewSecureRequest that delegates the signing to a remote signer like aaasvc

func NewReply

func NewReply(request protocol.Request, certname string) (rep protocol.Reply, err error)

NewReply creates a choria:reply:1 based on a previous Request

func NewReplyFromSecureReply

func NewReplyFromSecureReply(sr protocol.SecureReply) (rep protocol.Reply, err error)

NewReplyFromSecureReply create a choria:reply:1 based on the data contained in a SecureReply

func NewRequest

func NewRequest(agent string, senderid string, callerid string, ttl int, requestid string, collective string) (req protocol.Request, err error)

NewRequest creates a choria:request:1

func NewRequestFromSecureRequest

func NewRequestFromSecureRequest(sr protocol.SecureRequest) (req protocol.Request, err error)

NewRequestFromSecureRequest creates a choria::request:1 based on the data contained in a SecureRequest

func NewSecureReply

func NewSecureReply(reply protocol.Reply, security SecurityProvider) (secure protocol.SecureReply, err error)

NewSecureReply creates a choria:secure:reply:1

func NewSecureReplyFromTransport

func NewSecureReplyFromTransport(message protocol.TransportMessage, security SecurityProvider, skipvalidate bool) (secure protocol.SecureReply, err error)

NewSecureReplyFromTransport creates a new choria:secure:reply:1 from the data contained in a Transport message

func NewSecureRequest

func NewSecureRequest(request protocol.Request, security SecurityProvider) (secure protocol.SecureRequest, err error)

NewSecureRequest creates a choria:secure:request:1

func NewSecureRequestFromTransport

func NewSecureRequestFromTransport(message protocol.TransportMessage, security SecurityProvider, skipvalidate bool) (secure protocol.SecureRequest, err error)

NewSecureRequestFromTransport creates a new choria:secure:request:1 from the data contained in a Transport message

func NewTransportFromJSON

func NewTransportFromJSON(data string) (message protocol.TransportMessage, err error)

NewTransportFromJSON creates a new TransportMessage from JSON

func NewTransportMessage

func NewTransportMessage(certname string) (message protocol.TransportMessage, err error)

NewTransportMessage creates a choria:transport:1

Types

type SecurityProvider

type SecurityProvider interface {
	CallerIdentity(caller string) (string, error)
	SignString(s string) (signature []byte, err error)
	PrivilegedVerifyStringSignature(dat string, sig []byte, identity string) bool
	PublicCertTXT() ([]byte, error)
	ChecksumString(data string) []byte
	CachePublicData(data []byte, identity string) error
	RemoteSignRequest(str []byte) (signed []byte, err error)
}

Jump to

Keyboard shortcuts

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