add the nsec3 alias too
This commit is contained in:
parent
3aba338dc5
commit
70fac2eec3
|
@ -251,7 +251,7 @@ func (s *RR_RRSIG) Sign(k PrivateKey, rrset []RR) error {
|
|||
var h hash.Hash
|
||||
var ch crypto.Hash // Only need for RSA
|
||||
switch s.Algorithm {
|
||||
case DSA:
|
||||
case DSA, DSANSEC3SHA1:
|
||||
// Implicit in the ParameterSizes
|
||||
case RSAMD5:
|
||||
h = md5.New()
|
||||
|
|
|
@ -24,7 +24,7 @@ type PrivateKey interface{}
|
|||
// bits should be set to the size of the algorithm.
|
||||
func (r *RR_DNSKEY) Generate(bits int) (PrivateKey, error) {
|
||||
switch r.Algorithm {
|
||||
case DSA:
|
||||
case DSA, DSANSEC3SHA1:
|
||||
if bits != 1024 {
|
||||
return nil, ErrKeySize
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ func (r *RR_DNSKEY) Generate(bits int) (PrivateKey, error) {
|
|||
}
|
||||
|
||||
switch r.Algorithm {
|
||||
case DSA:
|
||||
case DSA, DSANSEC3SHA1:
|
||||
params := new(dsa.Parameters)
|
||||
if err := dsa.GenerateParameters(params, rand.Reader, dsa.L1024N160); err != nil {
|
||||
return nil, err
|
||||
|
|
Loading…
Reference in New Issue