Do not return error on empty name or email key generation
This commit is contained in:
parent
b601b54c1f
commit
f5803d148d
2 changed files with 3 additions and 6 deletions
|
|
@ -438,12 +438,8 @@ func generateKey(
|
|||
bits int,
|
||||
prime1, prime2, prime3, prime4 []byte,
|
||||
) (*Key, error) {
|
||||
if len(email) == 0 {
|
||||
return nil, errors.New("gopenpgp: invalid email format")
|
||||
}
|
||||
|
||||
if len(name) == 0 {
|
||||
return nil, errors.New("gopenpgp: invalid name format")
|
||||
if len(email) == 0 && len(name) == 0 {
|
||||
return nil, errors.New("gopenpgp: neither name nor email set.")
|
||||
}
|
||||
|
||||
comments := ""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue