identityfile

package
v7.0.0-...-185e5fd Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package identityfile implements parsing and serialization of Teleport identity files.

Index

Constants

View Source
const (
	// FilePermissions defines file permissions for identity files.
	FilePermissions = 0600
)

Variables

This section is empty.

Functions

func Write

func Write(idFile *IdentityFile, path string) error

Write writes the given identityFile to the specified path.

Types

type CACerts

type CACerts struct {
	// SSH are CA certs used for SSH.
	SSH [][]byte
	// TLS are CA certs used for TLS.
	TLS [][]byte
}

CACerts contains PEM encoded CA certificates.

type Certs

type Certs struct {
	// SSH is a cert used for SSH.
	SSH []byte
	// TLS is a cert used for TLS.
	TLS []byte
}

Certs contains PEM encoded certificates.

type IdentityFile

type IdentityFile struct {
	// PrivateKey is a PEM encoded key.
	PrivateKey []byte
	// Certs contains PEM encoded certificates.
	Certs Certs
	// CACerts contains PEM encoded CA certificates.
	CACerts CACerts
}

IdentityFile represents the basic components of an identity file.

func Read

func Read(path string) (*IdentityFile, error)

Read reads an identity file from the given path.

func (*IdentityFile) SSHClientConfig

func (i *IdentityFile) SSHClientConfig() (*ssh.ClientConfig, error)

SSHClientConfig returns the identity file's associated SSHClientConfig.

func (*IdentityFile) TLSConfig

func (i *IdentityFile) TLSConfig() (*tls.Config, error)

TLSConfig returns the identity file's associated TLSConfig.

Jump to

Keyboard shortcuts

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