summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--guide/src/chapter_02.md8
-rw-r--r--ipc/examples/gpg-agent-decrypt.rs2
-rw-r--r--ipc/src/gnupg.rs4
-rw-r--r--ipc/tests/gpg-agent.rs4
-rw-r--r--openpgp-ffi/src/parse/stream.rs2
-rw-r--r--openpgp-ffi/src/serialize.rs2
-rw-r--r--openpgp-ffi/src/tpk.rs2
-rw-r--r--openpgp/examples/decrypt-with.rs2
-rw-r--r--openpgp/examples/encrypt-for.rs2
-rw-r--r--openpgp/examples/generate-encrypt-decrypt.rs2
-rw-r--r--openpgp/examples/pad.rs2
-rw-r--r--openpgp/examples/statistics.rs2
-rw-r--r--openpgp/src/crypto/aead.rs2
-rw-r--r--openpgp/src/crypto/asymmetric.rs2
-rw-r--r--openpgp/src/crypto/ecdh.rs2
-rw-r--r--openpgp/src/crypto/keygrip.rs2
-rw-r--r--openpgp/src/crypto/mem.rs2
-rw-r--r--openpgp/src/crypto/mod.rs2
-rw-r--r--openpgp/src/crypto/mpis.rs2
-rw-r--r--openpgp/src/lib.rs10
-rw-r--r--openpgp/src/message/mod.rs12
-rw-r--r--openpgp/src/packet/aed.rs2
-rw-r--r--openpgp/src/packet/compressed_data.rs2
-rw-r--r--openpgp/src/packet/key/mod.rs12
-rw-r--r--openpgp/src/packet/literal.rs2
-rw-r--r--openpgp/src/packet/pkesk.rs2
-rw-r--r--openpgp/src/packet/signature/mod.rs4
-rw-r--r--openpgp/src/packet/signature/subpacket.rs6
-rw-r--r--openpgp/src/packet/skesk.rs2
-rw-r--r--openpgp/src/packet_pile.rs6
-rw-r--r--openpgp/src/parse/mpis.rs2
-rw-r--r--openpgp/src/parse/parse.rs6
-rw-r--r--openpgp/src/parse/stream.rs4
-rw-r--r--openpgp/src/serialize/mod.rs4
-rw-r--r--openpgp/src/serialize/padding.rs4
-rw-r--r--openpgp/src/serialize/stream.rs12
-rw-r--r--openpgp/src/serialize/tpk.rs2
-rw-r--r--openpgp/src/serialize/writer/mod.rs2
-rw-r--r--openpgp/src/tpk/bindings.rs12
-rw-r--r--openpgp/src/tpk/builder.rs12
-rw-r--r--openpgp/src/tpk/keyiter.rs2
-rw-r--r--openpgp/src/tpk/mod.rs16
-rw-r--r--openpgp/src/tpk/revoke.rs10
-rw-r--r--openpgp/src/types/features.rs (renamed from openpgp/src/constants/features.rs)0
-rw-r--r--openpgp/src/types/key_flags.rs (renamed from openpgp/src/constants/key_flags.rs)0
-rw-r--r--openpgp/src/types/mod.rs (renamed from openpgp/src/constants/mod.rs)6
-rw-r--r--openpgp/src/types/server_preferences.rs (renamed from openpgp/src/constants/server_preferences.rs)0
-rw-r--r--sqv/src/sqv.rs2
-rw-r--r--sqv/tests/revoked-key.rs2
-rw-r--r--sqv/tests/wrong-key-flags.rs2
-rw-r--r--tool/src/commands/decrypt.rs2
-rw-r--r--tool/src/commands/dump.rs2
-rw-r--r--tool/src/commands/inspect.rs4
-rw-r--r--tool/src/commands/key.rs2
-rw-r--r--tool/src/commands/mod.rs4
-rw-r--r--tool/src/sq.rs2
-rw-r--r--tool/tests/sq-sign.rs2
57 files changed, 113 insertions, 113 deletions
diff --git a/guide/src/chapter_02.md b/guide/src/chapter_02.md
index d2d11964..80ae2fa2 100644
--- a/guide/src/chapter_02.md
+++ b/guide/src/chapter_02.md
@@ -13,7 +13,7 @@ use std::io::{self, Write};
extern crate sequoia_openpgp as openpgp;
use openpgp::crypto::SessionKey;
-use openpgp::constants::{KeyFlags, SymmetricAlgorithm};
+use openpgp::types::{KeyFlags, SymmetricAlgorithm};
use openpgp::serialize::stream::*;
use openpgp::parse::stream::*;
@@ -156,7 +156,7 @@ create it:
#
# extern crate sequoia_openpgp as openpgp;
# use openpgp::crypto::SessionKey;
-# use openpgp::constants::{KeyFlags, SymmetricAlgorithm};
+# use openpgp::types::{KeyFlags, SymmetricAlgorithm};
# use openpgp::serialize::stream::*;
# use openpgp::parse::stream::*;
#
@@ -299,7 +299,7 @@ implements [`io::Write`], and we simply write the plaintext to it.
#
# extern crate sequoia_openpgp as openpgp;
# use openpgp::crypto::SessionKey;
-# use openpgp::constants::{KeyFlags, SymmetricAlgorithm};
+# use openpgp::types::{KeyFlags, SymmetricAlgorithm};
# use openpgp::serialize::stream::*;
# use openpgp::parse::stream::*;
#
@@ -456,7 +456,7 @@ Decrypted data can be read from this using [`io::Read`].
#
# extern crate sequoia_openpgp as openpgp;
# use openpgp::crypto::SessionKey;
-# use openpgp::constants::{KeyFlags, SymmetricAlgorithm};
+# use openpgp::types::{KeyFlags, SymmetricAlgorithm};
# use openpgp::serialize::stream::*;
# use openpgp::parse::stream::*;
#
diff --git a/ipc/examples/gpg-agent-decrypt.rs b/ipc/examples/gpg-agent-decrypt.rs
index e9874726..2b8b7049 100644
--- a/ipc/examples/gpg-agent-decrypt.rs
+++ b/ipc/examples/gpg-agent-decrypt.rs
@@ -8,7 +8,7 @@ extern crate sequoia_openpgp as openpgp;
extern crate sequoia_ipc as ipc;
use crate::openpgp::crypto::SessionKey;
-use crate::openpgp::constants::SymmetricAlgorithm;
+use crate::openpgp::types::SymmetricAlgorithm;
use crate::openpgp::parse::{
Parse,
stream::{
diff --git a/ipc/src/gnupg.rs b/ipc/src/gnupg.rs
index 068ae1c7..1a274278 100644
--- a/ipc/src/gnupg.rs
+++ b/ipc/src/gnupg.rs
@@ -12,7 +12,7 @@ use futures::{Async, Future, Stream};
extern crate libc;
extern crate tempfile;
-use crate::openpgp::constants::HashAlgorithm;
+use crate::openpgp::types::HashAlgorithm;
use crate::openpgp::conversions::hex;
use crate::openpgp::crypto;
use crate::openpgp::crypto::sexp::Sexp;
@@ -719,7 +719,7 @@ impl<'a, R> crypto::Signer<R> for KeyPair<'a, R>
fn sign(&mut self, hash_algo: HashAlgorithm, digest: &[u8])
-> Result<openpgp::crypto::mpis::Signature>
{
- use crate::openpgp::constants::PublicKeyAlgorithm::*;
+ use crate::openpgp::types::PublicKeyAlgorithm::*;
use crate::openpgp::crypto::mpis::PublicKey;
#[allow(deprecated)]
diff --git a/ipc/tests/gpg-agent.rs b/ipc/tests/gpg-agent.rs
index 01adcc6f..69d45afb 100644
--- a/ipc/tests/gpg-agent.rs
+++ b/ipc/tests/gpg-agent.rs
@@ -7,12 +7,12 @@ use futures::future::Future;
use futures::stream::Stream;
extern crate sequoia_openpgp as openpgp;
-use crate::openpgp::constants::{
+use crate::openpgp::types::{
HashAlgorithm,
SymmetricAlgorithm,
};
use crate::openpgp::crypto::SessionKey;
-use crate::openpgp::constants::KeyFlags;
+use crate::openpgp::types::KeyFlags;
use crate::openpgp::parse::stream::*;
use crate::openpgp::serialize::{Serialize, stream::*};
use crate::openpgp::tpk::{TPKBuilder, CipherSuite};
diff --git a/openpgp-ffi/src/parse/stream.rs b/openpgp-ffi/src/parse/stream.rs
index 87582ee6..0dbe3408 100644
--- a/openpgp-ffi/src/parse/stream.rs
+++ b/openpgp-ffi/src/parse/stream.rs
@@ -17,7 +17,7 @@ extern crate sequoia_openpgp as openpgp;
use self::openpgp::{
crypto::SessionKey,
- constants::SymmetricAlgorithm,
+ types::SymmetricAlgorithm,
packet::{
PKESK,
SKESK,
diff --git a/openpgp-ffi/src/serialize.rs b/openpgp-ffi/src/serialize.rs
index d2244bab..29de025c 100644
--- a/openpgp-ffi/src/serialize.rs
+++ b/openpgp-ffi/src/serialize.rs
@@ -12,7 +12,7 @@ use libc::{c_char, size_t, ssize_t};
extern crate sequoia_openpgp as openpgp;
-use self::openpgp::constants::{
+use self::openpgp::types::{
AEADAlgorithm,
SymmetricAlgorithm,
};
diff --git a/openpgp-ffi/src/tpk.rs b/openpgp-ffi/src/tpk.rs
index 75c51b88..ed834a90 100644
--- a/openpgp-ffi/src/tpk.rs
+++ b/openpgp-ffi/src/tpk.rs
@@ -13,7 +13,7 @@ extern crate sequoia_openpgp as openpgp;
use self::openpgp::{
autocrypt::Autocrypt,
crypto,
- constants::ReasonForRevocation,
+ types::ReasonForRevocation,
parse::{
PacketParserResult,
Parse,
diff --git a/openpgp/examples/decrypt-with.rs b/openpgp/examples/decrypt-with.rs
index 99ec1fd7..e3b861e5 100644
--- a/openpgp/examples/decrypt-with.rs
+++ b/openpgp/examples/decrypt-with.rs
@@ -9,7 +9,7 @@ extern crate failure;
extern crate sequoia_openpgp as openpgp;
use crate::openpgp::crypto::{KeyPair, SessionKey};
-use crate::openpgp::constants::SymmetricAlgorithm;
+use crate::openpgp::types::SymmetricAlgorithm;
use crate::openpgp::packet::key;
use crate::openpgp::parse::{
Parse,
diff --git a/openpgp/examples/encrypt-for.rs b/openpgp/examples/encrypt-for.rs
index 82f636d9..50f9e35b 100644
--- a/openpgp/examples/encrypt-for.rs
+++ b/openpgp/examples/encrypt-for.rs
@@ -6,7 +6,7 @@ use std::io;
extern crate sequoia_openpgp as openpgp;
use crate::openpgp::armor;
-use crate::openpgp::constants::KeyFlags;
+use crate::openpgp::types::KeyFlags;
use crate::openpgp::parse::Parse;
use crate::openpgp::serialize::stream::{
Message, LiteralWriter, Encryptor,
diff --git a/openpgp/examples/generate-encrypt-decrypt.rs b/openpgp/examples/generate-encrypt-decrypt.rs
index a2577906..995ecabd 100644
--- a/openpgp/examples/generate-encrypt-decrypt.rs
+++ b/openpgp/examples/generate-encrypt-decrypt.rs
@@ -4,7 +4,7 @@ use std::io::{self, Write};
extern crate sequoia_openpgp as openpgp;
use crate::openpgp::crypto::SessionKey;
-use crate::openpgp::constants::{KeyFlags, SymmetricAlgorithm};
+use crate::openpgp::types::{KeyFlags, SymmetricAlgorithm};
use crate::openpgp::serialize::stream::*;
use crate::openpgp::parse::stream::*;
diff --git a/openpgp/examples/pad.rs b/openpgp/examples/pad.rs
index 6a3d7c96..f63cb105 100644
--- a/openpgp/examples/pad.rs
+++ b/openpgp/examples/pad.rs
@@ -7,7 +7,7 @@ use std::io;
extern crate sequoia_openpgp as openpgp;
use crate::openpgp::armor;
use crate::openpgp::KeyID;
-use crate::openpgp::constants::KeyFlags;
+use crate::openpgp::types::KeyFlags;
use crate::openpgp::parse::Parse;
use crate::openpgp::serialize::stream::{
Message, LiteralWriter, Encryptor, Recipient,
diff --git a/openpgp/examples/statistics.rs b/openpgp/examples/statistics.rs
index 138497e3..acea38c1 100644
--- a/openpgp/examples/statistics.rs
+++ b/openpgp/examples/statistics.rs
@@ -11,7 +11,7 @@ use std::env;
use std::collections::HashMap;
extern crate sequoia_openpgp as openpgp;
use crate::openpgp::Packet;
-use crate::openpgp::constants::*;
+use crate::openpgp::types::*;
use crate::openpgp::packet::{user_attribute, header::BodyLength, Tag};
use crate::openpgp::packet::signature::subpacket::SubpacketTag;
use crate::openpgp::parse::{Parse, PacketParserResult, PacketParser};
diff --git a/openpgp/src/crypto/aead.rs b/openpgp/src/crypto/aead.rs
index 72d029a4..50255d2f 100644
--- a/openpgp/src/crypto/aead.rs
+++ b/openpgp/src/crypto/aead.rs
@@ -5,7 +5,7 @@ use std::io;
use nettle::{aead, cipher};
use buffered_reader::BufferedReader;
-use crate::constants::{
+use crate::types::{
AEADAlgorithm,
SymmetricAlgorithm,
};
diff --git a/openpgp/src/crypto/asymmetric.rs b/openpgp/src/crypto/asymmetric.rs
index 41d61014..e67461ce 100644
--- a/openpgp/src/crypto/asymmetric.rs
+++ b/openpgp/src/crypto/asymmetric.rs
@@ -5,7 +5,7 @@ use nettle::{dsa, ecc, ecdsa, ed25519, rsa, Yarrow};
use crate::packet::{self, key, Key};
use crate::crypto::SessionKey;
use crate::crypto::mpis::{self, MPI};
-use crate::constants::{Curve, HashAlgorithm};
+use crate::types::{Curve, HashAlgorithm};
use crate::Error;
use crate::Result;
diff --git a/openpgp/src/crypto/ecdh.rs b/openpgp/src/crypto/ecdh.rs
index 15228f59..9f281865 100644
--- a/openpgp/src/crypto/ecdh.rs
+++ b/openpgp/src/crypto/ecdh.rs
@@ -7,7 +7,7 @@ use crate::packet::{
key,
};
use crate::Result;
-use crate::constants::{
+use crate::types::{
Curve,
HashAlgorithm,
SymmetricAlgorithm,
diff --git a/openpgp/src/crypto/keygrip.rs b/openpgp/src/crypto/keygrip.rs
index 66240b92..08afb12a 100644
--- a/openpgp/src/crypto/keygrip.rs
+++ b/openpgp/src/crypto/keygrip.rs
@@ -2,7 +2,7 @@ use std::fmt;
use crate::Error;
use crate::Result;
-use crate::constants::{Curve, HashAlgorithm};
+use crate::types::{Curve, HashAlgorithm};
use crate::crypto::mpis::{MPI, PublicKey};
/// A proprietary, protocol agnostic identifier for public keys.
diff --git a/openpgp/src/crypto/mem.rs b/openpgp/src/crypto/mem.rs
index aab9abee..dd4fc244 100644
--- a/openpgp/src/crypto/mem.rs
+++ b/openpgp/src/crypto/mem.rs
@@ -130,7 +130,7 @@ const ENCRYPTED_MEMORY_PAGE_SIZE: usize = 4096;
mod has_access_to_prekey {
use std::io::{self, Cursor, Write};
use lazy_static;
- use crate::constants::{AEADAlgorithm, HashAlgorithm, SymmetricAlgorithm};
+ use crate::types::{AEADAlgorithm, HashAlgorithm, SymmetricAlgorithm};
use crate::crypto::{aead, SessionKey};
use super::*;
diff --git a/openpgp/src/crypto/mod.rs b/openpgp/src/crypto/mod.rs
index 150014cc..fd43481c 100644
--- a/openpgp/src/crypto/mod.rs
+++ b/openpgp/src/crypto/mod.rs
@@ -6,7 +6,7 @@ use std::fmt;
use nettle::{Random, Yarrow};
-use crate::constants::HashAlgorithm;
+use crate::types::HashAlgorithm;
use crate::Result;
pub(crate) mod aead;
diff --git a/openpgp/src/crypto/mpis.rs b/openpgp/src/crypto/mpis.rs
index e3a7f483..8500a1ed 100644
--- a/openpgp/src/crypto/mpis.rs
+++ b/openpgp/src/crypto/mpis.rs
@@ -6,7 +6,7 @@ use std::cmp::Ordering;
use quickcheck::{Arbitrary, Gen};
use rand::Rng;
-use crate::constants::{
+use crate::types::{
Curve,
HashAlgorithm,
PublicKeyAlgorithm,
diff --git a/openpgp/src/lib.rs b/openpgp/src/lib.rs
index a4c54f6e..7f03e08e 100644
--- a/openpgp/src/lib.rs
+++ b/openpgp/src/lib.rs
@@ -135,8 +135,8 @@ pub mod serialize;
mod packet_pile;
pub mod message;
-pub mod constants;
-use crate::constants::{
+pub mod types;
+use crate::types::{
PublicKeyAlgorithm,
SymmetricAlgorithm,
HashAlgorithm,
@@ -196,7 +196,7 @@ pub enum Error {
/// Unsupported elliptic curve ASN.1 OID.
#[fail(display = "Unsupported elliptic curve: {}", _0)]
- UnsupportedEllipticCurve(constants::Curve),
+ UnsupportedEllipticCurve(types::Curve),
/// Unsupported symmetric key algorithm.
#[fail(display = "Unsupported symmetric algorithm: {}", _0)]
@@ -204,11 +204,11 @@ pub enum Error {
/// Unsupported AEAD algorithm.
#[fail(display = "Unsupported AEAD algorithm: {}", _0)]
- UnsupportedAEADAlgorithm(constants::AEADAlgorithm),
+ UnsupportedAEADAlgorithm(types::AEADAlgorithm),
/// Unsupported Compression algorithm.
#[fail(display = "Unsupported Compression algorithm: {}", _0)]
- UnsupportedCompressionAlgorithm(constants::CompressionAlgorithm),
+ UnsupportedCompressionAlgorithm(types::CompressionAlgorithm),
/// Unsupported signature type.
#[fail(display = "Unsupported signature type: {}", _0)]
diff --git a/openpgp/src/message/mod.rs b/openpgp/src/message/mod.rs
index 2e1981e0..e3b3992b 100644
--- a/openpgp/src/message/mod.rs
+++ b/openpgp/src/message/mod.rs
@@ -444,9 +444,9 @@ impl ::std::ops::Deref for Message {
mod tests {
use super::*;
- use crate::constants::DataFormat::Text;
+ use crate::types::DataFormat::Text;
use crate::HashAlgorithm;
- use crate::constants::CompressionAlgorithm;
+ use crate::types::CompressionAlgorithm;
use crate::SymmetricAlgorithm;
use crate::PublicKeyAlgorithm;
use crate::SignatureType;
@@ -807,9 +807,9 @@ mod tests {
let mut lit = Literal::new(Text);
lit.set_body(b"data".to_vec());
- let hash = crate::constants::HashAlgorithm::SHA512;
+ let hash = crate::types::HashAlgorithm::SHA512;
let key: key::SecretKey =
- crate::packet::key::Key4::generate_ecc(true, crate::constants::Curve::Ed25519)
+ crate::packet::key::Key4::generate_ecc(true, crate::types::Curve::Ed25519)
.unwrap().into();
let mut pair = key.clone().into_keypair().unwrap();
let sig = crate::packet::signature::Builder::new(SignatureType::Binary)
@@ -919,9 +919,9 @@ mod tests {