testpeertls

package
v0.28.3-rc-crdb Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2019 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCertChain

func NewCertChain(length int, versionNumber storj.IDVersionNumber) (keys []crypto.PrivateKey, certs []*x509.Certificate, _ error)

NewCertChain creates a valid peertls certificate chain (and respective keys) of the desired length. NB: keys are in the reverse order compared to certs (i.e. first key belongs to last cert)!

func NewRevokedLeafChain

func NewRevokedLeafChain() ([]crypto.PrivateKey, []*x509.Certificate, pkix.Extension, error)

NewRevokedLeafChain creates a certificate chain (of length 2) with a leaf that contains a valid revocation extension.

func RevokeCA

func RevokeCA(caKey crypto.PrivateKey, chain []*x509.Certificate) ([]*x509.Certificate, pkix.Extension, error)

RevokeCA revokes the CA certificate in the passed chain and adds a revocation extension to that certificate, recording this action.

func RevokeLeaf

func RevokeLeaf(caKey crypto.PrivateKey, chain []*x509.Certificate) ([]*x509.Certificate, pkix.Extension, error)

RevokeLeaf revokes the leaf certificate in the passed chain and replaces it with a "revoking" certificate, which contains a revocation extension recording this action.

Types

This section is empty.

Jump to

Keyboard shortcuts

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