certificate

package
v0.0.0-...-b3d2b93 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package certificate provide helpers to manipulate certificates.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bundle

type Bundle struct {
	Name string
	Key  *rsa.PrivateKey
	Cert *x509.Certificate
}

Bundle represents a pair of private key and certificate.

func RawToBundle

func RawToBundle(name string, key []byte, cert []byte) (*Bundle, error)

RawToBundle creates a bundle from the name and bytes given for a private key and a certificate.

func (*Bundle) Raw

func (b *Bundle) Raw() ([]byte, []byte)

Raw returns the raw bytes for the private key and certificate.

type State

type State int

State represents a certificate state (Valid, Expired, Revoked).

const (
	Valid State = iota
	Revoked
	Expired
)

Certificate states.

Jump to

Keyboard shortcuts

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