mirror of https://github.com/perkeep/perkeep.git
complain more clearly when DSA public keys are read.
This commit is contained in:
parent
5f9840a429
commit
5f82a9caa9
|
@ -332,8 +332,12 @@ func readPublicKeyPacket(r io.Reader, length uint16) (pk PublicKeyPacket, err os
|
|||
pk.PubKeyAlgo = PublicKeyAlgorithm(buf[5])
|
||||
switch pk.PubKeyAlgo {
|
||||
case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly:
|
||||
// good.
|
||||
case PubKeyAlgoDSA:
|
||||
err = error.Unsupported("DSA public key type")
|
||||
return
|
||||
default:
|
||||
err = error.Unsupported("public key type")
|
||||
err = error.Unsupported(fmt.Sprintf("public key type (%d)", pk.PubKeyAlgo))
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue