Documentation ¶
Index ¶
- Variables
- func CryptoSignerType(kd keys.CryptoAlgo) (public string)
- func CryptoType(kd keys.CryptoAlgo) (private, public string)
- func LetsEncryptData(certType CertType) (crypto.PrivateKey, []*x509.Certificate, x509.VerifyOptions)
- func LetsEncryptDir(certType CertType) (string, error)
- func Password() []byte
- func SSHKeySigner(typ keys.CryptoAlgo, set SSHKeySetID) security.Signer
- func SSHKeydir() (string, []string, error)
- func SSHPrivateKey(typ keys.CryptoAlgo, set SSHKeySetID) crypto.PrivateKey
- func SSHPrivateKeyBytes(typ keys.CryptoAlgo, set SSHKeySetID) []byte
- func SSHPrivateKeys() []string
- func SSHPublicKey(typ keys.CryptoAlgo) crypto.PublicKey
- func SSHPublicKeyBytes(typ keys.CryptoAlgo, set SSHKeySetID) []byte
- func SSHPublicKeyType(typ keys.CryptoAlgo) string
- func StartPreConfiguredSSHAgent() (keyDir, sockName string, cleanup func(), err error)
- func V23CopyLegacyPrincipals(toDir string)
- func V23PrincipalDir(kt keys.CryptoAlgo, encrypted bool) string
- func V23PrivateKey(typ keys.CryptoAlgo, set V23KeySetID) crypto.PrivateKey
- func V23PrivateKeyBytes(typ keys.CryptoAlgo, set V23KeySetID) []byte
- func V23PublicKeyBytes(typ keys.CryptoAlgo, set V23KeySetID) []byte
- func V23Signer(typ keys.CryptoAlgo, set V23KeySetID) security.Signer
- func VanadiumSSLData() (map[string]crypto.PrivateKey, map[string]*x509.Certificate, x509.VerifyOptions)
- func X509Certificate(typ keys.CryptoAlgo) *x509.Certificate
- func X509PrivateKey(typ keys.CryptoAlgo) crypto.PrivateKey
- func X509PrivateKeyBytes(typ keys.CryptoAlgo, set X509KeySetID) []byte
- func X509PublicKey(typ keys.CryptoAlgo) crypto.PublicKey
- func X509PublicKeyBytes(typ keys.CryptoAlgo) []byte
- func X509Signer(typ keys.CryptoAlgo) security.Signer
- func X509VerifyOptions(typ keys.CryptoAlgo) x509.VerifyOptions
- type CertType
- type SSHKeySetID
- type V23KeySetID
- type X509KeySetID
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func CryptoSignerType ¶
func CryptoSignerType(kd keys.CryptoAlgo) (public string)
CryptoSignerType eturns the types of the public keys associated with a signer. These will differ from the CryptoTypes when openssl is used to implement the signer.
func CryptoType ¶
func CryptoType(kd keys.CryptoAlgo) (private, public string)
CryptoType returns the types of the expected crypto keys.
func LetsEncryptData ¶
func LetsEncryptData(certType CertType) (crypto.PrivateKey, []*x509.Certificate, x509.VerifyOptions)
LetsencryptData returns an SSL private key and certificate obtained from letsencrypt's staging environment. The returned VerifyOptions contain a cert pool and current time that will successfully validate that certificate.
func LetsEncryptDir ¶
LetsencryptDir creates a pre-populated directory with letsencrypt derived files for the requested cert type.
func SSHKeySigner ¶
func SSHKeySigner(typ keys.CryptoAlgo, set SSHKeySetID) security.Signer
func SSHKeydir ¶
SSHKeydir creates a pre-populated directory of ssh keys to use in tests. The following keys are installed for all supported algorithms.
ssh-<algo>, ssh-encrypted-<algo>, ssh-<algo>.pub, ssh-<algo>.pem,
func SSHPrivateKey ¶
func SSHPrivateKey(typ keys.CryptoAlgo, set SSHKeySetID) crypto.PrivateKey
func SSHPrivateKeyBytes ¶
func SSHPrivateKeyBytes(typ keys.CryptoAlgo, set SSHKeySetID) []byte
func SSHPrivateKeys ¶
func SSHPrivateKeys() []string
func SSHPublicKey ¶
func SSHPublicKey(typ keys.CryptoAlgo) crypto.PublicKey
func SSHPublicKeyBytes ¶
func SSHPublicKeyBytes(typ keys.CryptoAlgo, set SSHKeySetID) []byte
func SSHPublicKeyType ¶
func SSHPublicKeyType(typ keys.CryptoAlgo) string
SSHPublicKeyType returns the expected type of the ssh public keys used for the specified key type.
func V23CopyLegacyPrincipals ¶
func V23CopyLegacyPrincipals(toDir string)
func V23PrincipalDir ¶
func V23PrincipalDir(kt keys.CryptoAlgo, encrypted bool) string
func V23PrivateKey ¶
func V23PrivateKey(typ keys.CryptoAlgo, set V23KeySetID) crypto.PrivateKey
func V23PrivateKeyBytes ¶
func V23PrivateKeyBytes(typ keys.CryptoAlgo, set V23KeySetID) []byte
func V23PublicKeyBytes ¶
func V23PublicKeyBytes(typ keys.CryptoAlgo, set V23KeySetID) []byte
func V23Signer ¶
func V23Signer(typ keys.CryptoAlgo, set V23KeySetID) security.Signer
func VanadiumSSLData ¶
func VanadiumSSLData() (map[string]crypto.PrivateKey, map[string]*x509.Certificate, x509.VerifyOptions)
VanadiumSSLData returns a selection of keys and certificates for hosts created for a self-signed CA. Keys are returned for ecdsa, rsa and ed25519 algorithms.
func X509Certificate ¶
func X509Certificate(typ keys.CryptoAlgo) *x509.Certificate
func X509PrivateKey ¶
func X509PrivateKey(typ keys.CryptoAlgo) crypto.PrivateKey
func X509PrivateKeyBytes ¶
func X509PrivateKeyBytes(typ keys.CryptoAlgo, set X509KeySetID) []byte
func X509PublicKey ¶
func X509PublicKey(typ keys.CryptoAlgo) crypto.PublicKey
func X509PublicKeyBytes ¶
func X509PublicKeyBytes(typ keys.CryptoAlgo) []byte
func X509Signer ¶
func X509Signer(typ keys.CryptoAlgo) security.Signer
func X509VerifyOptions ¶
func X509VerifyOptions(typ keys.CryptoAlgo) x509.VerifyOptions
Types ¶
type CertType ¶
type CertType int
CertType specifies the type of cert to be used.
const ( // SingleHostCert refers to a cert and key for www.labdrive.io SingleHostCert CertType = iota // MultipleHostsCert refers to a cert and key for {a,b,c}.labdrive.io MultipleHostsCert // WildcardCert refers to a cert and key for *.labdrive.io WildcardCert // Cert with multiple wildcard domains for *.labdrive.io and *.labdr.io MultipleWildcardCert )
Supported cert types are below.
type SSHKeySetID ¶
type SSHKeySetID int
SSHKeySetID represents a set of ssh generated keys, one set uses the key pairs directly, the other uses the ssh agent for signing operations and does not have access to the private key. Vanadium stores the ssh public key files in PKCS8 format internally and hence these files are provided for use in tests.
const ( SSHKeyPrivate SSHKeySetID = iota SSHKeyPublic SSHKeySetPKCS8 SSHKeyEncrypted )
type V23KeySetID ¶
type V23KeySetID int
V23KeySetID represents a set of keys, each set contains at least one instance of all supported key types.
const ( V23KeySetA V23KeySetID = iota V23KeySetB V23KeySetC V23KeySetD V23KeySetE V23KeySetAEncrypted V23KeySetBEncrypted V23LegacyKeys V23LegacyEncryptedKeys )