Documentation ¶
Index ¶
- func EncodeToPKCS8(pkBlock *pem.Block) (*pem.Block, error)
- func ReturnSignerInterface(pkBlock *pem.Block) (crypto.Signer, error)
- type CSRGenerator
- type ECDSASigner
- type RSASigner
- type SigningRequestGeneratorECDSA
- func (e *SigningRequestGeneratorECDSA) Generate() (crypto.PrivateKey, error)
- func (e *SigningRequestGeneratorECDSA) KeyType() string
- func (e *SigningRequestGeneratorECDSA) MarshalPrivateKey(key crypto.PrivateKey) ([]byte, error)
- func (e *SigningRequestGeneratorECDSA) SupportsKeySize(size int) bool
- func (e *SigningRequestGeneratorECDSA) SupportsPublicKeyAlgorithm(algorithm x509.PublicKeyAlgorithm) bool
- func (e *SigningRequestGeneratorECDSA) SupportsSigningAlgorithm(algorithm x509.SignatureAlgorithm) bool
- type SigningRequestGeneratorRSA
- func (r *SigningRequestGeneratorRSA) Generate() (crypto.PrivateKey, error)
- func (r *SigningRequestGeneratorRSA) KeyType() string
- func (r *SigningRequestGeneratorRSA) MarshalPrivateKey(key crypto.PrivateKey) ([]byte, error)
- func (r *SigningRequestGeneratorRSA) SupportsKeySize(size int) bool
- func (r *SigningRequestGeneratorRSA) SupportsPublicKeyAlgorithm(algorithm x509.PublicKeyAlgorithm) bool
- func (r *SigningRequestGeneratorRSA) SupportsSigningAlgorithm(algorithm x509.SignatureAlgorithm) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CSRGenerator ¶
type CSRGenerator interface { Generate() (crypto.PrivateKey, error) KeyType() string MarshalPrivateKey(key crypto.PrivateKey) ([]byte, error) SupportsPublicKeyAlgorithm(algorithm x509.PublicKeyAlgorithm) bool SupportsSigningAlgorithm(algorithm x509.SignatureAlgorithm) bool SupportsKeySize(size int) bool }
type ECDSASigner ¶
type ECDSASigner struct { PrivateKey *ecdsa.PrivateKey SignatureAlgorithm x509.SignatureAlgorithm Hash func() (hash.Hash, crypto.Hash) }
type RSASigner ¶
type RSASigner struct { PrivateKey *rsa.PrivateKey SignatureAlgorithm x509.SignatureAlgorithm Hash func() (hash.Hash, crypto.Hash) }
type SigningRequestGeneratorECDSA ¶
type SigningRequestGeneratorECDSA struct {
Curve int
}
func (*SigningRequestGeneratorECDSA) Generate ¶
func (e *SigningRequestGeneratorECDSA) Generate() (crypto.PrivateKey, error)
ECDSA Interface
func (*SigningRequestGeneratorECDSA) KeyType ¶
func (e *SigningRequestGeneratorECDSA) KeyType() string
func (*SigningRequestGeneratorECDSA) MarshalPrivateKey ¶
func (e *SigningRequestGeneratorECDSA) MarshalPrivateKey(key crypto.PrivateKey) ([]byte, error)
func (*SigningRequestGeneratorECDSA) SupportsKeySize ¶
func (e *SigningRequestGeneratorECDSA) SupportsKeySize(size int) bool
func (*SigningRequestGeneratorECDSA) SupportsPublicKeyAlgorithm ¶
func (e *SigningRequestGeneratorECDSA) SupportsPublicKeyAlgorithm(algorithm x509.PublicKeyAlgorithm) bool
func (*SigningRequestGeneratorECDSA) SupportsSigningAlgorithm ¶
func (e *SigningRequestGeneratorECDSA) SupportsSigningAlgorithm(algorithm x509.SignatureAlgorithm) bool
type SigningRequestGeneratorRSA ¶
type SigningRequestGeneratorRSA struct {
Size int
}
func (*SigningRequestGeneratorRSA) Generate ¶
func (r *SigningRequestGeneratorRSA) Generate() (crypto.PrivateKey, error)
RSA Interface
func (*SigningRequestGeneratorRSA) KeyType ¶
func (r *SigningRequestGeneratorRSA) KeyType() string
func (*SigningRequestGeneratorRSA) MarshalPrivateKey ¶
func (r *SigningRequestGeneratorRSA) MarshalPrivateKey(key crypto.PrivateKey) ([]byte, error)
func (*SigningRequestGeneratorRSA) SupportsKeySize ¶
func (r *SigningRequestGeneratorRSA) SupportsKeySize(size int) bool
func (*SigningRequestGeneratorRSA) SupportsPublicKeyAlgorithm ¶
func (r *SigningRequestGeneratorRSA) SupportsPublicKeyAlgorithm(algorithm x509.PublicKeyAlgorithm) bool
func (*SigningRequestGeneratorRSA) SupportsSigningAlgorithm ¶
func (r *SigningRequestGeneratorRSA) SupportsSigningAlgorithm(algorithm x509.SignatureAlgorithm) bool
Click to show internal directories.
Click to hide internal directories.