Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CAConfig ¶
type CAConfig struct { // Subject fields. Country string `json:"Country"` State string `json:"State"` Locality string `json:"Locality"` Organization string `json:"Organization"` OrganizationalUnit string `json:"OrganizationalUnit"` CommonName string `json:"CommonName"` // The validity time period of the CA cert, which is specified in seconds. ValidityPeriod uint64 `json:"ValidityPeriod"` // PKCS#11 device fields. Identifier string `json:"Identifier"` KeyLabel string `json:"KeyLabel"` KeyType int `json:"KeyType"` SignatureAlgo int `json:"SignatureAlgo"` SlotNumber int `json:"SlotNumber"` UserPinPath string `json:"UserPinPath"` PKCS11ModulePath string `json:"PKCS11ModulePath"` }
CAConfig represents the configuration params for generating the CA certificate.
func (*CAConfig) LoadDefaults ¶ added in v1.5.0
func (c *CAConfig) LoadDefaults()
LoadDefaults assigns default values to missing required configuration fields.
type CertSign ¶
type CertSign interface { // GetSSHCertSigningKey returns the SSH signing key of the specified key. GetSSHCertSigningKey(ctx context.Context, keyIdentifier string) ([]byte, error) // SignSSHCert returns an SSH cert signed by the specified key. SignSSHCert(ctx context.Context, cert *ssh.Certificate, keyIdentifier string) ([]byte, error) // GetX509CACert returns the X509 CA cert of the specified key. GetX509CACert(ctx context.Context, keyIdentifier string) ([]byte, error) // SignX509Cert returns an x509 cert signed by the specified key. SignX509Cert(ctx context.Context, cert *x509.Certificate, keyIdentifier string) ([]byte, error) // GetBlobSigningPublicKey returns the public signing key of the specified key that signs the user's data. GetBlobSigningPublicKey(ctx context.Context, keyIdentifier string) ([]byte, error) // SignBlob returns a signature signed by the specified key. SignBlob(ctx context.Context, digest []byte, opts crypto.SignerOpts, keyIdentifier string) ([]byte, error) }
CertSign interface contains methods related to signing certificates.
type KeyIDProcessor ¶
type KeyIDProcessor interface { // Process will take in a key ID, add some more information, and then return the key ID back. Process(kid string) (string, error) }
KeyIDProcessor is a interface containing all the possible operations on keyID.
type PublicKeyAlgorithm ¶
type PublicKeyAlgorithm int
PublicKeyAlgorithm is used to specify public key algorithm.
const ( UnknownPublicKeyAlgorithm PublicKeyAlgorithm = iota RSA ECDSA )
List of supported public key algorithms.
type SignatureAlgorithm ¶ added in v1.7.1
type SignatureAlgorithm int
SignatureAlgorithm is used to specify signature key algorithm.
const ( UnknownSignatureAlgorithm SignatureAlgorithm = iota SHA256WithRSA ECDSAWithSHA256 ECDSAWithSHA384 )
List of supported signature hash algorithms. The naming convention adheres to x509.SignatureAlgorithm.
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
mock_pkcs11
Package mock_pkcs11 is a generated GoMock package.
|
Package mock_pkcs11 is a generated GoMock package. |
Package proto contains proto generated code.
|
Package proto contains proto generated code. |
mock
Package mock is a generated GoMock package.
|
Package mock is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.