Added support for RSASSA-PSS and RSAES-OAEP.
This commit is contained in:
@ -22,6 +22,7 @@ type configuration struct {
|
||||
subject *pkix.Name
|
||||
issuer *Identity
|
||||
nextSN *int64
|
||||
signatureAlgrotim x509.SignatureAlgorithm
|
||||
priv *crypto.Signer
|
||||
isCA bool
|
||||
notBefore *time.Time
|
||||
@ -33,6 +34,7 @@ type configuration struct {
|
||||
func (c *configuration) generate() *Identity {
|
||||
templ := &x509.Certificate{
|
||||
Subject: c.getSubject(),
|
||||
SignatureAlgorithm: c.signatureAlgrotim,
|
||||
IsCA: c.isCA,
|
||||
BasicConstraintsValid: true,
|
||||
NotAfter: c.getNotAfter(),
|
||||
@ -195,6 +197,13 @@ func PrivateKey(value crypto.Signer) Option {
|
||||
}
|
||||
}
|
||||
|
||||
// SignatureAlgorithm is an Option for setting the signature algorithm.
|
||||
func SignatureAlgorithm(value x509.SignatureAlgorithm) Option {
|
||||
return func(c *configuration) {
|
||||
c.signatureAlgrotim = value
|
||||
}
|
||||
}
|
||||
|
||||
// Issuer is an Option for setting the identity's issuer.
|
||||
func Issuer(value *Identity) Option {
|
||||
return func(c *configuration) {
|
||||
|
Reference in New Issue
Block a user