genOspa

package
v0.0.0-...-05217b6 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2018 License: LGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildAbsPath

func BuildAbsPath(path string) string

Returns an absolute path from the provided path using the executable as the working directory if the provided path is relative. Otherwise it simply returns the provided path since it's absolute. If we fail to get the path of the executable we panic.

func EncodeRSAPrivateKey

func EncodeRSAPrivateKey(privKey *rsa.PrivateKey) ([]byte, error)

Encodes the RSA private key to a PEM formatted byte slice

func EncodeRSAPublicKey

func EncodeRSAPublicKey(pubKey *rsa.PublicKey) ([]byte, error)

Encodes the RSA public key to a PEM formatted byte slice

func FileContents

func FileContents(path string) ([]byte, error)

Accepts a relative path (using the executable as the working directory) or an absolute path of a file and opens it while returning the contents.

func GeneratePrivatePublicKeyPair

func GeneratePrivatePublicKeyPair() (*rsa.PrivateKey, *rsa.PublicKey, error)

Generates a RSA private/public key-pair.

Types

type OSPAFileParameters

type OSPAFileParameters struct {
	ConfigName      string
	ClientDeviceID  string
	ServerIP        net.IP
	ServerPort      uint16
	EchoIPServer    string
	PrivateKey      *rsa.PrivateKey
	PublicKey       *rsa.PublicKey
	ServerPublicKey *rsa.PublicKey
}

func AskClientOSPAFileParameters

func AskClientOSPAFileParameters(serverPublicKey *rsa.PublicKey) (OSPAFileParameters, error)

func (*OSPAFileParameters) Generate

func (fileParam *OSPAFileParameters) Generate() ([]byte, error)

Generates the OSPA YAML file

Jump to

Keyboard shortcuts

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