diff --git a/Cargo.toml b/Cargo.toml
index 941b781..13de392 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -89,7 +89,7 @@ version = "<0.26"
 default-features = false
 
 [dependencies.sequoia-gpg-agent]
-version = "0.4"
+version = "0.5"
 default-features = false
 
 [dependencies.sequoia-ipc]
@@ -97,7 +97,7 @@ version = "0.35"
 default-features = false
 
 [dependencies.sequoia-net]
-version = "0.28"
+version = "0.29"
 default-features = false
 
 [dependencies.sequoia-openpgp]
@@ -108,7 +108,7 @@ default-features = false
 version = "0.1"
 
 [dependencies.sequoia-policy-config]
-version = ">=0.6, <=0.7"
+version = "0.7"
 
 [dependencies.sequoia-wot]
 version = ">=0.12, <0.14"
diff --git a/src/gpg.rs b/src/gpg.rs
index 043bcca..7f6def9 100644
--- a/src/gpg.rs
+++ b/src/gpg.rs
@@ -149,10 +149,10 @@ pub fn make_context() -> Result<Ctx> {
 pub fn agent_keypair(policy: &dyn Policy,
                      cert: &Option<Cert>,
                      key: &Key<PublicParts, UnspecifiedRole>)
-                     -> openpgp::Result<gnupg::KeyPair>
+                     -> openpgp::Result<sequoia_gpg_agent::KeyPair>
 {
     let agent = gnupg::Context::new()?;
-    let mut s = gnupg::KeyPair::new(&agent, key)?;
+    let mut s = sequoia_gpg_agent::KeyPair::new_for_gnupg_context(&agent, key)?;
     if let Some(cert) = cert.as_ref() {
         if let Ok(vcert) = cert.with_policy(policy, None) {
             s = s.with_cert(&vcert);
diff --git a/src/op_verify.rs b/src/op_verify.rs
index 9c2855f..af6929e 100644
--- a/src/op_verify.rs
+++ b/src/op_verify.rs
@@ -996,7 +996,7 @@ impl<'a> DecryptionHelper for Helper<'a> {
             let keyid = pkesk.recipient();
             t!("trying to decrypt PKESK with recipient {}", keyid);
             if let Some((cert, key)) = self.get_public_key(keyid) {
-                let mut pair = gnupg::KeyPair::new(
+                let mut pair = sequoia_gpg_agent::KeyPair::new_for_gnupg_context(
                     &gnupg::Context::new()?, key.parts_as_public())?;
                 if let Ok(vcert) = cert.with_policy(&*self.ctx.policy(), None) {
                     pair = pair.with_cert(&vcert);
