diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2023-03-20 10:56:50 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2023-03-20 10:56:50 +0100 |
commit | 5bc6ab7e9d9c34ab6393472219a53547106b2b5a (patch) | |
tree | b719d78afc45b9f2876e2a474e0570278d7c3ae7 /openpgp/src/crypto/backend | |
parent | 8e6e7a080dc4b581504b7c71357678bb5ece7a8d (diff) |
openpgp: Small cleanups in the Botan backend.
- Remove development remnants, actually use the creation time when
importing RSA keys.
Diffstat (limited to 'openpgp/src/crypto/backend')
-rw-r--r-- | openpgp/src/crypto/backend/botan.rs | 2 | ||||
-rw-r--r-- | openpgp/src/crypto/backend/botan/asymmetric.rs | 4 | ||||
-rw-r--r-- | openpgp/src/crypto/backend/botan/ecdh.rs | 3 |
3 files changed, 2 insertions, 7 deletions
diff --git a/openpgp/src/crypto/backend/botan.rs b/openpgp/src/crypto/backend/botan.rs index 30f42a67..02ec4268 100644 --- a/openpgp/src/crypto/backend/botan.rs +++ b/openpgp/src/crypto/backend/botan.rs @@ -3,9 +3,7 @@ use crate::types::*; pub mod aead; -#[allow(unused_variables)] pub mod asymmetric; -#[allow(unused_variables)] pub mod ecdh; pub mod hash; pub mod symmetric; diff --git a/openpgp/src/crypto/backend/botan/asymmetric.rs b/openpgp/src/crypto/backend/botan/asymmetric.rs index 4cc2da5b..bf9b53c6 100644 --- a/openpgp/src/crypto/backend/botan/asymmetric.rs +++ b/openpgp/src/crypto/backend/botan/asymmetric.rs @@ -188,7 +188,7 @@ impl Decryptor for KeyPair { } fn decrypt(&mut self, ciphertext: &mpi::Ciphertext, - plaintext_len: Option<usize>) + _plaintext_len: Option<usize>) -> Result<SessionKey> { fn bad(e: impl ToString) -> anyhow::Error { @@ -474,7 +474,7 @@ impl<R> Key4<SecretParts, R> let (public, secret) = rsa_rfc4880(secret)?; Self::with_secret( - crate::now(), + ctime.into().unwrap_or_else(crate::now), PublicKeyAlgorithm::RSAEncryptSign, public, secret.into()) } diff --git a/openpgp/src/crypto/backend/botan/ecdh.rs b/openpgp/src/crypto/backend/botan/ecdh.rs index e798503c..87eab757 100644 --- a/openpgp/src/crypto/backend/botan/ecdh.rs +++ b/openpgp/src/crypto/backend/botan/ecdh.rs @@ -1,10 +1,7 @@ //! Elliptic Curve Diffie-Hellman. -#[allow(unused_imports)] - use botan::{ RandomNumberGenerator, - //Pubkey, Privkey, }; |