add the nsec3 alias too

This commit is contained in:
Miek Gieben 2012-04-19 14:39:50 +02:00
parent 3aba338dc5
commit 70fac2eec3
2 changed files with 3 additions and 3 deletions

View File

@ -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()

View File

@ -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