core

package
v0.0.0-...-2a3d941 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(e error)

Check panics if err != nil

func ComputeMRN

func ComputeMRN(cert *x509.Certificate) string

ComputeMRN computes MRN given certificate

func ExportCert

func ExportCert(cert *x509.Certificate) string

ExportCert exports the certificate into a PEM string

func HexEncode

func HexEncode(b []byte) string

HexEncode encodes the raw bytes into hex

Types

type Core

type Core struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func New

func New() *Core

func (*Core) Close

func (c *Core) Close() error

func (*Core) Delete

func (c *Core) Delete(serial string) error

func (*Core) Generate

func (c *Core) Generate(realm string) (*x509.Certificate, error)

func (*Core) List

func (c *Core) List() error

func (*Core) Login

func (c *Core) Login(tokenUrl string, insecure bool, signer crypto.Signer, cert *x509.Certificate) (string, error)

func (*Core) LoginPKCS11

func (c *Core) LoginPKCS11(url string, insecure bool, serial string) (string, error)

func (*Core) LoginPKCS12

func (c *Core) LoginPKCS12(url string, insecure bool, p12 string, password string, path bool) (string, error)

func (*Core) LoginX509

func (c *Core) LoginX509(url string, insecure bool, key string, cert string, path bool) (string, error)

func (*Core) Show

func (c *Core) Show(serial string) error

type Token

type Token struct {
	Signer crypto11.Signer
	Cert   *x509.Certificate
}

Jump to

Keyboard shortcuts

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