cryptoutil

package
v0.23.5-rc.2 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSigner

func CreateSigner(kms, name string, opts ...pemutil.Options) (crypto.Signer, error)

CreateSigner reads a key from a file with a given name or creates a signer with the given kms and name uri.

func IsKMSSigner

func IsKMSSigner(signer crypto.Signer) (ok bool)

IsKMSSigner returns true if the given signer uses the step-kms-plugin signer.

func IsX509Signer

func IsX509Signer(signer crypto.Signer) bool

IsX509Signer returns true if the given signer is supported by Go's crypto/x509 package to sign sign X509 certificates. This methods returns true for ECDSA, RSA and Ed25519 keys, but if the kms is `sshagentkms:` it will only return true for Ed25519 keys.

func LoadCertificate added in v0.23.0

func LoadCertificate(kms, certPath string) ([]*x509.Certificate, error)

LoadCertificate returns a x509.Certificate from a kms or file

func LoadJSONWebKey added in v0.23.4

func LoadJSONWebKey(kms, name string, opts ...jose.Option) (*jose.JSONWebKey, error)

LoadJSONWebKey returns a jose.JSONWebKey from a KMS or a file.

Types

type Attestor added in v0.23.0

type Attestor interface {
	crypto.Signer
	Attest() ([]byte, error)
}

Attestor is the interface implemented by step-kms-plugin using the key, sign, and attest commands.

func CreateAttestor added in v0.23.0

func CreateAttestor(kms, name string) (Attestor, error)

CreateAttestor creates an attestor that will use `step-kms-plugin` with the given kms and name.

Jump to

Keyboard shortcuts

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