Documentation ¶
Index ¶
- Constants
- type PKCS7Encrypter
- type PKCS7Plugin
- type PrivateKey
- type PublicKey
- func (k *PublicKey) Generate(key *rsa.PrivateKey) (*x509.Certificate, error)
- func (k *PublicKey) Load() (*x509.Certificate, error)
- func (k *PublicKey) Path() string
- func (k *PublicKey) Save(cert *x509.Certificate, force bool) error
- func (k *PublicKey) SignatureAlgorithm() x509.SignatureAlgorithm
- func (k *PublicKey) Subject() string
Constants ¶
View Source
const Encrypter = "PKCS7"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PKCS7Encrypter ¶
type PKCS7Encrypter struct {
// contains filtered or unexported fields
}
func New ¶
func New(key *PrivateKey, cert *PublicKey) *PKCS7Encrypter
func (*PKCS7Encrypter) GenerateSecrets ¶
func (p *PKCS7Encrypter) GenerateSecrets(force bool, ctx context.Context) error
type PKCS7Plugin ¶
type PKCS7Plugin struct { PrivateKey string `kong:"help='Path to private key',type='path',placeholder='FILE'"` PublicKey string `kong:"help='Path to public key',type='path',placeholder='FILE'"` Subject string `kong:"help='Subject to use for certificate when creating keys',default='/'"` Digest string `kong:"help='Hash function used for PKCS7',enum='SHA256,SHA384,SHA512',default='SHA256'"` Keysize uint32 `kong:"help='Key size used for encryption',default='2048'"` }
func (*PKCS7Plugin) Encrypter ¶
func (o *PKCS7Plugin) Encrypter() string
func (*PKCS7Plugin) NewEncrypter ¶
func (o *PKCS7Plugin) NewEncrypter(baseDir string) *PKCS7Encrypter
type PrivateKey ¶
type PrivateKey struct {
// contains filtered or unexported fields
}
func NewPrivateKey ¶
func NewPrivateKey(path string, bits uint32) *PrivateKey
func (*PrivateKey) Bits ¶
func (k *PrivateKey) Bits() uint32
func (*PrivateKey) Generate ¶
func (k *PrivateKey) Generate() (*rsa.PrivateKey, error)
func (*PrivateKey) Load ¶
func (k *PrivateKey) Load() (*rsa.PrivateKey, error)
func (*PrivateKey) Path ¶
func (k *PrivateKey) Path() string
func (*PrivateKey) Save ¶
func (k *PrivateKey) Save(key *rsa.PrivateKey, force bool) error
type PublicKey ¶
type PublicKey struct {
// contains filtered or unexported fields
}
func NewPublicKey ¶
func NewPublicKey(path, subject string, algo x509.SignatureAlgorithm) *PublicKey
func (*PublicKey) Generate ¶
func (k *PublicKey) Generate(key *rsa.PrivateKey) (*x509.Certificate, error)
func (*PublicKey) SignatureAlgorithm ¶
func (k *PublicKey) SignatureAlgorithm() x509.SignatureAlgorithm
Click to show internal directories.
Click to hide internal directories.