pkicmn

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package pkicmn contains some commonly used functionality and definitions.

Index

Constants

View Source
const (
	CertNameFmt        = "ISD%d-AS%s-V%d.crt"
	CoreCertNameFmt    = "ISD%d-AS%s-V%d-core.crt"
	TrcNameFmt         = "ISD%d-V%d.trc"
	ErrInvalidSelector = "Invalid selector."
	ErrNoISDDirFound   = "No ISD directories found"
	ErrNoASDirFound    = "No AS directories found"
	TRCsDir            = "trcs"
	CertsDir           = "certs"
	KeysDir            = "keys"
)

Variables

View Source
var (
	RootDir string
	OutDir  string
	Force   bool
	Quiet   bool
)

Functions

func Contains

func Contains(ases []addr.IA, as addr.IA) bool

func ErrorAndExit

func ErrorAndExit(format string, a ...interface{})

func GetAsPath

func GetAsPath(baseDir string, ia addr.IA) string

func GetIsdPath

func GetIsdPath(baseDir string, isd addr.ISD) string

func ProcessSelector

func ProcessSelector(selector string) (map[addr.ISD][]addr.IA, error)

ProcessSelector processes the given selector and returns a mapping from ISD id to ASes of that ISD. In case of an ISD-only selector, i.e., a '*' or any number the lists of ASes will be empty.

func QuietPrint

func QuietPrint(format string, a ...interface{})

func WriteToFile

func WriteToFile(raw common.RawBytes, path string, perm os.FileMode) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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