internal

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2023 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChainName

func ChainName(chain []security.Certificate) string

func CreateDefaultBlessingName

func CreateDefaultBlessingName() string

CreateDefaultBlessingName generates a blessing name based on the hostname of the machine and the name of the user running this command.

func DecodeBlessingsFile

func DecodeBlessingsFile(filename string) (security.Blessings, error)

DecodeBlessingsFile will read and decode the blessings in filename or from stdin if filename is '-'.

func DumpBlessings

func DumpBlessings(out io.Writer, blessings security.Blessings) error

func DumpBlessingsFile

func DumpBlessingsFile(out io.Writer, filename string) error

func DumpCertificateChain

func DumpCertificateChain(out io.Writer, chain []security.Certificate) error

func DumpPrincipal

func DumpPrincipal(out io.Writer, p security.Principal, blessingNamesOnly bool) error

func DumpPublicKey

func DumpPublicKey(out io.Writer, p security.Principal, pretty bool) error

func EncodeBlessingRootsFile

func EncodeBlessingRootsFile(filename string, stdout io.Writer, blessings security.Blessings) error

EncodeBlessingRootsFile will encode and write the blessing roots to filename or to stdout if filename is '-'.

func EncodeBlessingsFile

func EncodeBlessingsFile(filename string, stdout io.Writer, blessings security.Blessings) error

EncodeBlessingsFile will encode and write the blessings to filename or to stdout if filename is '-'.

func FormatCaveats

func FormatCaveats(cavs []security.Caveat) ([]string, error)

func FormatCaveatsInChain

func FormatCaveatsInChain(chain []security.Certificate) ([]string, error)

func GetChainByName

func GetChainByName(b security.Blessings, name string) ([]security.Certificate, error)

func IsSupportedKeyType

func IsSupportedKeyType(keyType string) (keys.CryptoAlgo, bool)

IsSupportedKeyType returns true if the requested key type is supported by the principal command. Currently the supported types are:

ecdsa256
ecdsa384
ecdsa521
ed25519
rsa2048
rsa4096

func ReadFileOrStdin

func ReadFileOrStdin(filename string) (string, error)

ReadFileOrStdin will read the data from filename or stdin if filename is '-'.

func Rootkey

func Rootkey(chain []security.Certificate) string

func SupportedKeyTypes

func SupportedKeyTypes() []string

SupportedKeyTypes returns the currently supported key types.

func WriteFileOrStdout

func WriteFileOrStdout(filename string, stdout io.Writer, str string) error

WriteFileOrStdout will write the supplied string to filename or to stdout if filename is '-'.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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