diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2018-06-27 16:49:14 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2018-06-28 10:18:10 +0200 |
commit | 06eac62a0619003a317ccc2cccee4c0abcc3eacd (patch) | |
tree | 27c95113234b436cdb52229d1c4633479e495bd8 /openpgp/src/parse/mpis.rs | |
parent | 951222e19c71160b88e08df16296d406bae7b176 (diff) |
openpgp: Parse MPIs of ElGamal signatures.
Diffstat (limited to 'openpgp/src/parse/mpis.rs')
-rw-r--r-- | openpgp/src/parse/mpis.rs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/openpgp/src/parse/mpis.rs b/openpgp/src/parse/mpis.rs index 0c3e48c3..bf82caa8 100644 --- a/openpgp/src/parse/mpis.rs +++ b/openpgp/src/parse/mpis.rs @@ -368,6 +368,16 @@ impl MPIs { }) } + ElgamalEncryptSign => { + let r = MPI::parse("elgamal_signature_r", php)?; + let s = MPI::parse("elgamal_signature_s", php)?; + + Ok(MPIs::ElgamalSignature{ + r: r, + s: s, + }) + } + EdDSA => { let r = MPI::parse("eddsa_signature_r", php)?; let s = MPI::parse("eddsa_signature_s", php)?; @@ -392,7 +402,7 @@ impl MPIs { Err(Error::UnknownPublicKeyAlgorithm(p.into()).into()) } - RSAEncrypt | ElgamalEncrypt | ElgamalEncryptSign | ECDH => { + RSAEncrypt | ElgamalEncrypt | ECDH => { Err(Error::UnknownPublicKeyAlgorithm(algo).into()) } } |