diff options
Diffstat (limited to 'openpgp/src/crypto/sexp.rs')
-rw-r--r-- | openpgp/src/crypto/sexp.rs | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/openpgp/src/crypto/sexp.rs b/openpgp/src/crypto/sexp.rs index 8bd958a6..454ed5e7 100644 --- a/openpgp/src/crypto/sexp.rs +++ b/openpgp/src/crypto/sexp.rs @@ -10,11 +10,11 @@ use std::fmt; use std::ops::Deref; use quickcheck::{Arbitrary, Gen}; -use crypto::{self, mpis, SessionKey}; -use crypto::mem::Protected; +use crate::crypto::{self, mpis, SessionKey}; +use crate::crypto::mem::Protected; -use Error; -use Result; +use crate::Error; +use crate::Result; /// An *S-Expression*. /// @@ -42,7 +42,7 @@ impl Sexp { /// The resulting expression is suitable for gpg-agent's `INQUIRE /// CIPHERTEXT` inquiry. pub fn from_ciphertext(ciphertext: &mpis::Ciphertext) -> Result<Self> { - use crypto::mpis::Ciphertext::*; + use crate::crypto::mpis::Ciphertext::*; match ciphertext { RSA { ref c } => Ok(Sexp::List(vec![ @@ -91,11 +91,11 @@ impl Sexp { /// command. `padding` must be set according to the status /// messages sent. pub fn finish_decryption(&self, - recipient: &::packet::Key, + recipient: &crate::packet::Key, ciphertext: &mpis::Ciphertext, padding: bool) -> Result<SessionKey> { - use crypto::mpis::PublicKey; + use crate::crypto::mpis::PublicKey; let not_a_session_key = || -> failure::Error { Error::MalformedMPI( format!("Not a session key: {:?}", self)).into() @@ -386,8 +386,8 @@ impl Arbitrary for String_ { #[cfg(test)] mod tests { use super::*; - use parse::Parse; - use serialize::Serialize; + use crate::parse::Parse; + use crate::serialize::Serialize; quickcheck! { fn roundtrip(s: Sexp) -> bool { @@ -401,18 +401,18 @@ mod tests { #[test] fn to_signature() { - use crypto::mpis::Signature::*; + use crate::crypto::mpis::Signature::*; assert_match!(DSA { .. } = Sexp::from_bytes( - ::tests::file("sexp/dsa-signature.sexp")).unwrap() + crate::tests::file("sexp/dsa-signature.sexp")).unwrap() .to_signature().unwrap()); assert_match!(ECDSA { .. } = Sexp::from_bytes( - ::tests::file("sexp/ecdsa-signature.sexp")).unwrap() + crate::tests::file("sexp/ecdsa-signature.sexp")).unwrap() .to_signature().unwrap()); assert_match!(EdDSA { .. } = Sexp::from_bytes( - ::tests::file("sexp/eddsa-signature.sexp")).unwrap() + crate::tests::file("sexp/eddsa-signature.sexp")).unwrap() .to_signature().unwrap()); assert_match!(RSA { .. } = Sexp::from_bytes( - ::tests::file("sexp/rsa-signature.sexp")).unwrap() + crate::tests::file("sexp/rsa-signature.sexp")).unwrap() .to_signature().unwrap()); } } |