util

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2019 License: Apache-2.0 Imports: 20 Imported by: 1

Documentation

Overview

Package configutil contains utility routines for the keymaster client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenKeyPair

func GenKeyPair(
	privateKeyPath string, identity string, logger log.Logger) (
	privateKey crypto.Signer, publicKeyPath string, err error)

GenKeyPair uses internal golang functions to be portable

func GenerateKey

func GenerateKey() (*rsa.PrivateKey, error)

GenerateKey generates a random 2048 byte rsa key

func GetHttpClient

func GetHttpClient(tlsConfig *tls.Config,
	dialer net.Dialer) (*http.Client, error)

GetHttpClient returns an http client instance to use given a particular TLS configuration.

func GetUserCreds

func GetUserCreds(userName string) (password []byte, err error)

GetUserCreds prompts the user for thier password and returns it.

func GetUserHomeDir

func GetUserHomeDir(usr *user.User) (string, error)

GetUserHomeDir returns the user's home directory.

Types

This section is empty.

Jump to

Keyboard shortcuts

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