certs

package
v0.0.0-...-b401b5e Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2024 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Overview

Package certs generates self-signed TLS keys with related helper functions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenKeys

func GenKeys(host string)

genKeys - Generate self-signed TLS certificate and key. Shamelessly stolen and modified from: https://go.dev/src/crypto/tls/generate_cert.go

func OpenKeyFile

func OpenKeyFile(name string) *os.File

openKeyFile creates and opens a file to write ecdsa key to

func WriteCertFile

func WriteCertFile(name string, data []byte) error

Write an X.509 certificate to a file with the given name

func WriteKeyFile

func WriteKeyFile(name string, privKey *ecdsa.PrivateKey) error

writeKeyFile creates and writes an ECDSA private key to a pem file with the given name

Types

This section is empty.

Jump to

Keyboard shortcuts

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