diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-05-15 16:28:11 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-05-15 16:29:55 +0200 |
commit | a25ef6974e0ba3989f6205c19a1f9ccfc81db584 (patch) | |
tree | 4ce3b386923515a662051c40f67a135ee15681f6 /net | |
parent | 36e2d97ac013e023feb27df939c3f6d6e32d8669 (diff) |
core, store, tool: Use realm instead of domain.
- Remove the domain parameter from core::Context.
- Replace it with a realm to be passed in when opening a store.
- For sq, merge store name and realm into the --store parameter.
- Fixes #105.
Diffstat (limited to 'net')
-rw-r--r-- | net/src/lib.rs | 6 | ||||
-rw-r--r-- | net/tests/hkp.rs | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/net/src/lib.rs b/net/src/lib.rs index db52333d..c9f7cd0a 100644 --- a/net/src/lib.rs +++ b/net/src/lib.rs @@ -22,7 +22,7 @@ //! # use sequoia_net::{KeyServer, Result}; //! # fn main() { f().unwrap(); } //! # fn f() -> Result<()> { -//! let ctx = Context::new("org.sequoia-pgp.example")?; +//! let ctx = Context::new()?; //! let mut ks = KeyServer::sks_pool(&ctx)?; //! let keyid = KeyID::from_hex("31855247603831FD").unwrap(); //! println!("{:?}", ks.get(&keyid)); @@ -195,7 +195,7 @@ mod tests { #[test] fn uris() { - let ctx = Context::configure("foo") + let ctx = Context::configure() .network_policy(sequoia_core::NetworkPolicy::Insecure) .build().unwrap(); @@ -203,7 +203,7 @@ mod tests { assert!(KeyServer::new(&ctx, "hkp://keys.openpgp.org").is_ok()); assert!(KeyServer::new(&ctx, "hkps://keys.openpgp.org").is_ok()); - let ctx = Context::configure("foo") + let ctx = Context::configure() .network_policy(sequoia_core::NetworkPolicy::Encrypted) .build().unwrap(); diff --git a/net/tests/hkp.rs b/net/tests/hkp.rs index bbdf8f43..0faf40a5 100644 --- a/net/tests/hkp.rs +++ b/net/tests/hkp.rs @@ -142,7 +142,7 @@ fn start_server() -> SocketAddr { #[test] fn get() { - let ctx = Context::configure("org.sequoia-pgp.api.tests") + let ctx = Context::configure() .ephemeral() .network_policy(NetworkPolicy::Insecure) .build().unwrap(); @@ -161,7 +161,7 @@ fn get() { #[test] fn send() { - let ctx = Context::configure("org.sequoia-pgp.api.tests") + let ctx = Context::configure() .ephemeral() .network_policy(NetworkPolicy::Insecure) .build().unwrap(); |