diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2021-06-23 12:46:44 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2021-06-28 12:53:30 +0200 |
commit | 327aecee26ca9bc96211dc817e08df8a94587877 (patch) | |
tree | 04b5e8849d8ac0f634413b035360668b868f5ab5 /openpgp/src | |
parent | 3a90e96a608a9ce5e8f018d7ff9716b700a50cc2 (diff) |
openpgp: Fix classification of unknown public key algorithms.
- Conservatively consider unknown algorithms encryption- and
signing-capable.
- Fixes parsing of PKESK and Signature packets using unknown
algorithms.
- Fixes #722.
Diffstat (limited to 'openpgp/src')
-rw-r--r-- | openpgp/src/types/mod.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/openpgp/src/types/mod.rs b/openpgp/src/types/mod.rs index b3a9822e..e9d39801 100644 --- a/openpgp/src/types/mod.rs +++ b/openpgp/src/types/mod.rs @@ -151,7 +151,10 @@ impl PublicKeyAlgorithm { | DSA | ECDSA | ElGamalEncryptSign - | EdDSA) + | EdDSA + | Private(_) + | Unknown(_) + ) } } @@ -174,7 +177,10 @@ impl PublicKeyAlgorithm { | RSAEncrypt | ElGamalEncrypt | ECDH - | ElGamalEncryptSign) + | ElGamalEncryptSign + | Private(_) + | Unknown(_) + ) } } |