diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2020-02-12 10:36:55 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2020-02-12 15:12:21 +0100 |
commit | 567d70df3b889bf862a18be7b17473efddf993c8 (patch) | |
tree | 4c2fadc8cbd8f693c0957b93d7731d7110d0ddbd | |
parent | 682cb11bb409cd4f6be3ab3a416e8f1251409a86 (diff) |
openpgp: Use constant from nettle 6.
-rw-r--r-- | openpgp/src/crypto/hash.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/openpgp/src/crypto/hash.rs b/openpgp/src/crypto/hash.rs index ee7e367f..333e2d55 100644 --- a/openpgp/src/crypto/hash.rs +++ b/openpgp/src/crypto/hash.rs @@ -135,10 +135,7 @@ impl HashAlgorithm { HashAlgorithm::SHA384 => Ok(rsa::ASN1_OID_SHA384), HashAlgorithm::SHA512 => Ok(rsa::ASN1_OID_SHA512), HashAlgorithm::MD5 => Ok(rsa::ASN1_OID_MD5), - HashAlgorithm::RipeMD => - // XXX: Use the constant from nettle-rs 6. - Ok(&[0x30, 0x21, 0x30, 0x09, 0x06, 0x05, 0x2B, 0x24, - 0x03, 0x02, 0x01, 0x05, 0x00, 0x04, 0x14][..]), + HashAlgorithm::RipeMD => Ok(rsa::ASN1_OID_RIPEMD160), HashAlgorithm::Private(_) | HashAlgorithm::Unknown(_) => Err(Error::UnsupportedHashAlgorithm(self).into()), } |