Categorygithub.com/kthomas/go-self-signed-cert
modulepackage
0.0.0-20200602041729-f9878375d46e
Repository: https://github.com/kthomas/go-self-signed-cert.git
Documentation: pkg.go.dev

# README

Golang self-signed certificate utility

This package makes it simple to generate a self-signed certificate.

Currently supports RSA keys of arbitrary length.

Installation

go get github.com/kthomas/go-self-signed-cert

Usage

privateKey, certificate, err := selfsignedcert.Generate()

# Functions

Generate a self-signed certificate; returns the certificate and its private key or an error.
GenerateToDisk generates a self-signed certificate and writes it and the private key to disk based on the configured environment and returns the paths to the generated private key and certificate, or an error.
GenerateWithKeySize a self-signed certificate; returns the certificate and its private key or an error.