testutil

package
v2.0.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenJwsFromPrivateKey

func GenJwsFromPrivateKey(t *testing.T, privKey *rsa.PrivateKey, appName string) *jose.JSONWebSignature

GenJwsFromPrivateKey TEST ONLY: generate a new JWS token signed by a privKey

func GenerateCertificate

func GenerateCertificate() ([]byte, []byte, error)

GenerateCertificate TEST-ONLY: generate a private key and a certificate

func GenerateCertificateFiles

func GenerateCertificateFiles() (string, string, error)

GenerateCertificateFiles TEST ONLY: will generate a test certificate/priv key and store it on files

func GenerateKeyPair

func GenerateKeyPair() (*rsa.PrivateKey, *rsa.PublicKey, error)

GenerateKeyPair TEST ONLY: generate a new RSA key pairs

func PublicKeyToBytes

func PublicKeyToBytes(pub *rsa.PublicKey) []byte

PublicKeyToBytes TEST ONLY:marshall an rsa.PublicKey to an array of bytes

Types

This section is empty.

Jump to

Keyboard shortcuts

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