mirror of
https://github.com/go-gitea/gitea
synced 2025-07-05 10:07:22 +00:00
go1.16 (#14783)
This commit is contained in:
4
vendor/github.com/miekg/dns/dnssec_keygen.go
generated
vendored
4
vendor/github.com/miekg/dns/dnssec_keygen.go
generated
vendored
@ -19,8 +19,6 @@ import (
|
||||
// bits should be set to the size of the algorithm.
|
||||
func (k *DNSKEY) Generate(bits int) (crypto.PrivateKey, error) {
|
||||
switch k.Algorithm {
|
||||
case RSAMD5, DSA, DSANSEC3SHA1:
|
||||
return nil, ErrAlg
|
||||
case RSASHA1, RSASHA256, RSASHA1NSEC3SHA1:
|
||||
if bits < 512 || bits > 4096 {
|
||||
return nil, ErrKeySize
|
||||
@ -41,6 +39,8 @@ func (k *DNSKEY) Generate(bits int) (crypto.PrivateKey, error) {
|
||||
if bits != 256 {
|
||||
return nil, ErrKeySize
|
||||
}
|
||||
default:
|
||||
return nil, ErrAlg
|
||||
}
|
||||
|
||||
switch k.Algorithm {
|
||||
|
Reference in New Issue
Block a user