summaryrefslogtreecommitdiffstats
path: root/openpgp
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2019-10-27 22:45:01 -0400
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>2019-10-27 22:45:01 -0400
commitd3336f34c0d953b6cfd6cc9d4757fd31c1ac31ae (patch)
treeaac95b974bd51187efc572a21fb28dd55b0b810e /openpgp
parent6b1c86756c1a3945fec84e3703e991ef1ee99fee (diff)
Fix more spelling errors caught by codespell
Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Diffstat (limited to 'openpgp')
-rw-r--r--openpgp/src/autocrypt.rs4
-rw-r--r--openpgp/src/crypto/aead.rs4
-rw-r--r--openpgp/src/crypto/hash.rs2
-rw-r--r--openpgp/src/crypto/s2k.rs2
-rw-r--r--openpgp/src/crypto/symmetric.rs2
-rw-r--r--openpgp/src/message/mod.rs2
-rw-r--r--openpgp/src/packet/header/ctb.rs2
-rw-r--r--openpgp/src/packet/key/mod.rs2
-rw-r--r--openpgp/src/packet/signature/subpacket.rs2
-rw-r--r--openpgp/src/packet/userid/rfc2822/mod.rs12
-rw-r--r--openpgp/src/parse/parse.rs4
-rw-r--r--openpgp/src/serialize/mod.rs2
-rw-r--r--openpgp/src/serialize/tpk_armored.rs2
-rw-r--r--openpgp/src/tpk/mod.rs4
14 files changed, 23 insertions, 23 deletions
diff --git a/openpgp/src/autocrypt.rs b/openpgp/src/autocrypt.rs
index d849244c..e69df6d3 100644
--- a/openpgp/src/autocrypt.rs
+++ b/openpgp/src/autocrypt.rs
@@ -332,7 +332,7 @@ impl AutocryptSetupMessage {
/// You can set the `prefer_encrypt` setting, which defaults to
/// "nopreference", using `set_prefer_encrypt`.
///
- /// Note: this generates a random passcode. To retreive the
+ /// Note: this generates a random passcode. To retrieve the
/// passcode, use the `passcode` method.
///
/// To decode an Autocrypt Setup Message, use the `from_bytes` or
@@ -1010,7 +1010,7 @@ In the light of the Efail vulnerability I am asking myself if it's
.collect::<Vec<(usize, usize)>>()
{
let is_good = lower < count && count < upper;
- eprintln!("{}: {} occurances{}.",
+ eprintln!("{}: {} occurrences{}.",
i, count, if is_good { "" } else { " UNLIKELY" });
if !is_good {
diff --git a/openpgp/src/crypto/aead.rs b/openpgp/src/crypto/aead.rs
index 93e6ad5d..47501d60 100644
--- a/openpgp/src/crypto/aead.rs
+++ b/openpgp/src/crypto/aead.rs
@@ -204,7 +204,7 @@ impl<'a> Decryptor<'a> {
// Note: this implementation tries *very* hard to make sure we don't
// gratuitiously do a short read. Specifically, if the return value
// is less than `plaintext.len()`, then it is either because we
- // reached the end of the input or an error occured.
+ // reached the end of the input or an error occurred.
fn read_helper(&mut self, plaintext: &mut [u8]) -> Result<usize> {
use std::cmp::Ordering;
@@ -380,7 +380,7 @@ impl<'a> Decryptor<'a> {
// Note: this implementation tries *very* hard to make sure we don't
// gratuitiously do a short read. Specifically, if the return value
// is less than `plaintext.len()`, then it is either because we
-// reached the end of the input or an error occured.
+// reached the end of the input or an error occurred.
impl<'a> io::Read for Decryptor<'a> {
fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
match self.read_helper(buf) {
diff --git a/openpgp/src/crypto/hash.rs b/openpgp/src/crypto/hash.rs
index cc5ea49d..d35394b9 100644
--- a/openpgp/src/crypto/hash.rs
+++ b/openpgp/src/crypto/hash.rs
@@ -83,7 +83,7 @@ impl HashAlgorithm {
}
}
- /// Creates a new Nettle hash context for this algorith.
+ /// Creates a new Nettle hash context for this algorithm.
///
/// # Errors
///
diff --git a/openpgp/src/crypto/s2k.rs b/openpgp/src/crypto/s2k.rs
index 44655613..2a819c47 100644
--- a/openpgp/src/crypto/s2k.rs
+++ b/openpgp/src/crypto/s2k.rs
@@ -74,7 +74,7 @@ impl Default for S2K {
}
impl S2K {
- /// Convert the string to a key using the S2K's paramters.
+ /// Convert the string to a key using the S2K's parameters.
pub fn derive_key(&self, string: &Password, key_size: usize)
-> Result<SessionKey> {
match self {
diff --git a/openpgp/src/crypto/symmetric.rs b/openpgp/src/crypto/symmetric.rs
index 61c7dcd0..5ca999ad 100644
--- a/openpgp/src/crypto/symmetric.rs
+++ b/openpgp/src/crypto/symmetric.rs
@@ -194,7 +194,7 @@ fn read_exact<R: io::Read>(reader: &mut R, mut buffer: &mut [u8])
// Note: this implementation tries *very* hard to make sure we don't
// gratuitiously do a short read. Specifically, if the return value
// is less than `plaintext.len()`, then it is either because we
-// reached the end of the input or an error occured.
+// reached the end of the input or an error occurred.
impl<R: io::Read> io::Read for Decryptor<R> {
fn read(&mut self, plaintext: &mut [u8]) -> io::Result<usize> {
let mut pos = 0;
diff --git a/openpgp/src/message/mod.rs b/openpgp/src/message/mod.rs
index cdf3d1d9..2e1981e0 100644
--- a/openpgp/src/message/mod.rs
+++ b/openpgp/src/message/mod.rs
@@ -963,7 +963,7 @@ mod tests {
// There are no simple constructors for SEIP packets: they are
// interleaved with SK-ESK and PK-ESK packets. And, the
// session key needs to be managed. Instead, we use some
- // internal iterfaces to progressively build up more
+ // internal interfaces to progressively build up more
// complicated messages.
let mut lit = Literal::new(Text);
diff --git a/openpgp/src/packet/header/ctb.rs b/openpgp/src/packet/header/ctb.rs
index fbe81a9a..1a6565a4 100644
--- a/openpgp/src/packet/header/ctb.rs
+++ b/openpgp/src/packet/header/ctb.rs
@@ -109,7 +109,7 @@ impl From<PacketLengthType> for u8 {
pub struct CTBOld {
/// Common CTB fields.
common: CTBCommon,
- /// Type of length sepcifier.
+ /// Type of length specifier.
pub length_type: PacketLengthType,
}
diff --git a/openpgp/src/packet/key/mod.rs b/openpgp/src/packet/key/mod.rs
index 22636759..5cea7423 100644
--- a/openpgp/src/packet/key/mod.rs
+++ b/openpgp/src/packet/key/mod.rs
@@ -409,7 +409,7 @@ macro_rules! create_conversions {
{
/// Changes the key's parts tag to `PublicParts`.
pub fn mark_parts_public(self) -> $Key<PublicParts, R> {
- // Ideally, we'd use self.into() to do the actualy
+ // Ideally, we'd use self.into() to do the actually
// conversion. But, because P is not concrete, we get the
// following error:
//
diff --git a/openpgp/src/packet/signature/subpacket.rs b/openpgp/src/packet/signature/subpacket.rs
index 7d3a4c27..9d0d0c92 100644
--- a/openpgp/src/packet/signature/subpacket.rs
+++ b/openpgp/src/packet/signature/subpacket.rs
@@ -319,7 +319,7 @@ pub struct SubpacketArea {
// The subpacket area, but parsed so that the map is indexed by
// the subpacket tag, and the value corresponds to the *last*
- // occurance of that subpacket in the subpacket area.
+ // occurrence of that subpacket in the subpacket area.
//
// Since self-referential structs are a no-no, we use (start, len)
// to reference the content in the area.
diff --git a/openpgp/src/packet/userid/rfc2822/mod.rs b/openpgp/src/packet/userid/rfc2822/mod.rs
index af4a3ef5..f30a6631 100644
--- a/openpgp/src/packet/userid/rfc2822/mod.rs
+++ b/openpgp/src/packet/userid/rfc2822/mod.rs
@@ -1273,18 +1273,18 @@ mod tests {
// Try some URIs for completeness.
Test {
- input: "ssh://user:pasword@example.org/resource",
+ input: "ssh://user:password@example.org/resource",
output: Some(vec![
Component::InvalidAddress(
- e(), "ssh://user:pasword@example.org/resource".into())
+ e(), "ssh://user:password@example.org/resource".into())
])
},
Test {
- input: "(not a comment) ssh://user:pasword@example.org/resource",
+ input: "(not a comment) ssh://user:password@example.org/resource",
output: Some(vec![
Component::InvalidAddress(
- e(), "(not a comment) ssh://user:pasword@example.org/resource".into())
+ e(), "(not a comment) ssh://user:password@example.org/resource".into())
])
},
@@ -1481,11 +1481,11 @@ mod tests {
c("Willi Wonka",
Some(vec![ Component::Text("Willi Wonka".into()) ]));
- // As an extention we unquoted dots.
+ // As an extension we unquoted dots.
c("Willi A. Wonka",
Some(vec![ Component::Text("Willi A. Wonka".into()) ]));
- // As an extention we unquoted ats.
+ // As an extension we unquoted ats.
c("foo@example.org",
Some(vec![ Component::Text("foo@example.org".into()) ]));
}
diff --git a/openpgp/src/parse/parse.rs b/openpgp/src/parse/parse.rs
index 5a5a356e..d57e9b52 100644
--- a/openpgp/src/parse/parse.rs
+++ b/openpgp/src/parse/parse.rs
@@ -3303,7 +3303,7 @@ impl <'a> PacketParser<'a> {
match self.packet.tag() {
Tag::SEIP | Tag::AED | Tag::SED | Tag::CompressedData => {
// We didn't (fully) process a container's content. Add
- // this as opaque conent to the message validator.
+ // this as opaque content to the message validator.
let mut path = self.path().to_vec();
path.push(0);
self.state.message_validator.push_token(
@@ -3539,7 +3539,7 @@ impl<'a> PacketParser<'a> {
Packet::SEIP(_) => {
// Get the first blocksize plus two bytes and check
// whether we can decrypt them using the provided key.
- // Don't actually comsume them in case we can't.
+ // Don't actually consume them in case we can't.
let bl = algo.block_size()?;
{
diff --git a/openpgp/src/serialize/mod.rs b/openpgp/src/serialize/mod.rs
index 949ea519..96f8b17d 100644
--- a/openpgp/src/serialize/mod.rs
+++ b/openpgp/src/serialize/mod.rs
@@ -2691,7 +2691,7 @@ mod test {
// 1. Read the message into a local buffer.
let data = crate::tests::message(filename);
- // 2. Do a shallow parse of the messsage. In other words,
+ // 2. Do a shallow parse of the message. In other words,
// never recurse so that the resulting message only
// contains the top-level packets. Any containers will
// have their raw content stored in packet.content.
diff --git a/openpgp/src/serialize/tpk_armored.rs b/openpgp/src/serialize/tpk_armored.rs
index 8c4c3253..47940af7 100644
--- a/openpgp/src/serialize/tpk_armored.rs
+++ b/openpgp/src/serialize/tpk_armored.rs
@@ -241,7 +241,7 @@ mod tests {
// Create userids one character longer than the size allowed in the
// header and expect headers with the correct length.
- // 1 byte characer
+ // 1 byte character
// Can not use `to_string` here because not such method for
//`std::vec::Vec<char>`
let userid1: String = vec!['a'; length_value + 1].into_iter()
diff --git a/openpgp/src/tpk/mod.rs b/openpgp/src/tpk/mod.rs
index 329ac33a..263f41a6 100644
--- a/openpgp/src/tpk/mod.rs
+++ b/openpgp/src/tpk/mod.rs
@@ -1427,7 +1427,7 @@ impl TPK {
// Note: just because the TPK doesn't indicate that a key is a
// designed revoker doesn't mean that it isn't---we might just
// be missing the signature. In other words, this is a policy
- // decision, but given how easy it could be to create rouge
+ // decision, but given how easy it could be to create rogue
// revocations, is probably the better to reject such
// signatures than to keep them around and have many keys
// being shown as "potentially revoked".
@@ -1692,7 +1692,7 @@ mod test {
.merge(tpk_add_subkey_1.clone()).unwrap();
assert_eq!(tpk_all_subkeys, merged);
- // Merge alot.
+ // Merge a lot.
let merged = tpk_base.clone()
.merge(tpk_add_subkey_1.clone()).unwrap()
.merge(tpk_add_subkey_1.clone()).unwrap()