diff --git a/lib/go/ext/openpgp/packet/packet.go b/lib/go/ext/openpgp/packet/packet.go index 26646b6e0..102416c14 100644 --- a/lib/go/ext/openpgp/packet/packet.go +++ b/lib/go/ext/openpgp/packet/packet.go @@ -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 }