cryptoutil

package
v0.22.1-rc1 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2022 License: Apache-2.0 Imports: 12 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.

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