Documentation
¶
Overview ¶
Package certutil contains helper functions that are mostly used with the PKI backend but can be generally useful. Functionality includes helpers for converting a certificate/private key bundle between DER and PEM, printing certificate serial numbers, and more.
Functionality specific to the PKI backend includes some types and helper methods to make requesting certificates from the backend easy.
Index ¶
- func ComparePublicKeys(key1Iface, key2Iface crypto.PublicKey) (bool, error)
- func GeneratePrivateKey(keyType string, keyBits int, container ParsedPrivateKeyContainer) error
- func GenerateSerialNumber() (*big.Int, error)
- func GetHexFormatted(buf []byte, sep string) string
- func GetSubjKeyID(privateKey crypto.Signer) ([]byte, error)
- func MarshalPKCS8PrivateKey(key interface{}) ([]byte, error)
- func ParseHexFormatted(in, sep string) []byte
- type BlockType
- type CSRBundle
- type CertBlock
- type CertBundle
- type IssueData
- type ParsedCSRBundle
- type ParsedCertBundle
- func (p *ParsedCertBundle) GetCertificatePath() []*CertBlock
- func (p *ParsedCertBundle) GetTLSConfig(usage TLSUsage) (*tls.Config, error)
- func (p *ParsedCertBundle) SetParsedPrivateKey(privateKey crypto.Signer, privateKeyType PrivateKeyType, ...)
- func (p *ParsedCertBundle) ToCertBundle() (*CertBundle, error)
- func (p *ParsedCertBundle) Verify() error
- type ParsedPrivateKeyContainer
- type PrivateKeyType
- type Secret
- type TLSUsage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComparePublicKeys ¶ added in v0.4.0
ComparePublicKeys compares two public keys and returns true if they match
func GeneratePrivateKey ¶ added in v0.4.0
func GeneratePrivateKey(keyType string, keyBits int, container ParsedPrivateKeyContainer) error
GeneratePrivateKey generates a private key with the specified type and key bits
func GenerateSerialNumber ¶ added in v0.4.0
GenerateSerialNumber generates a serial number suitable for a certificate
func GetHexFormatted ¶ added in v0.6.2
GetHexFormatted returns the byte buffer formatted in hex with the specified separator between bytes.