tgnoob

package
Version: v1.40.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package tgnoob is depreacted and shold not be used.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCA

func CreateCA(
	name string,
	organization string,
	password string,
	out string,
) (string, string, error)

CreateCA creates a Certificates Authority Certificate.

func CreateClientCertificate

func CreateClientCertificate(
	name string,
	organization string,
	password string,
	signingCertPath string,
	signingCertKeyPath string,
	signingCertKeyPass string,
	dns []string,
	ips []string,
	out string,
) (string, string, error)

CreateClientCertificate creates a client certificate.

func CreateServerCertificate

func CreateServerCertificate(
	name string,
	organization string,
	password string,
	signingCertPath string,
	signingCertKeyPath string,
	signingCertKeyPass string,
	dns []string,
	ips []string,
	out string,
) (string, string, error)

CreateServerCertificate creates a client certificate.

func CreateSignedCA

func CreateSignedCA(
	name string,
	organization string,
	password string,
	signingCertPath string,
	signingCertKeyPath string,
	signingCertKeyPass string,
	out string,
) (string, string, error)

CreateSignedCA creates a Certificates Authority Certificate.

func DecryptPrivateKey

func DecryptPrivateKey(
	certKeyPath string,
	password string,
) ([]byte, error)

DecryptPrivateKey decrypts a private key.

func EncryptPrivateKey

func EncryptPrivateKey(
	certKeyPath string,
	password string,
) ([]byte, error)

EncryptPrivateKey encrypts a private key.

func GenerateCSR

func GenerateCSR(
	name string,
	commonName string,
	cert string,
	certKey string,
	certKeyPass string,
	out string,
	force bool,
	algo string,
	country []string,
	state []string,
	city []string,
	address []string,
	zipCode []string,
	org []string,
	orgUnit []string,
	dns []string,
	ips []string,
	policies []string,
) error

GenerateCSR generates a new CSR with the given parameters.

func GenerateCertificate

func GenerateCertificate(
	name string,
	commonName string,
	password string,
	isCA bool,
	authServer bool,
	authClient bool,
	authEmail bool,
	p12 bool,
	p12Pass string,
	out string,
	force bool,
	algo string,
	signingCertPath string,
	signingCertKeyPath string,
	signingCertKeyPass string,
	country []string,
	state []string,
	city []string,
	address []string,
	zipCode []string,
	org []string,
	orgUnit []string,
	dns []string,
	ips []string,
	duration time.Duration,
	policies []string,
) error

GenerateCertificate is a wrapper on top of tglib.IssueCertificate. Generates a new certificate and store it in the out directory.

func SignCSR

func SignCSR(
	name string,
	isCa bool,
	authServer bool,
	authClient bool,
	authEmail bool,
	out string,
	force bool,
	algo string,
	signingCertPath string,
	signingCertKeyPath string,
	signingCertKeyPass string,
	csr []string,
	duration time.Duration,
	policies []string,

) error

SignCSR signs a CSR.

func VerifyCert

func VerifyCert(
	certPath string,
	signerPath string,
	authServer bool,
	authClient bool,
	authEmail bool,
) error

VerifyCert verifies a certificate.

Types

This section is empty.

Jump to

Keyboard shortcuts

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