aboutsummaryrefslogtreecommitdiff
path: root/src/mailman_pgp/workflows/base.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman_pgp/workflows/base.py')
-rw-r--r--src/mailman_pgp/workflows/base.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/mailman_pgp/workflows/base.py b/src/mailman_pgp/workflows/base.py
index 4ca1525..ace8f91 100644
--- a/src/mailman_pgp/workflows/base.py
+++ b/src/mailman_pgp/workflows/base.py
@@ -65,11 +65,21 @@ class PubkeyMixin:
def _step_pubkey_checks(self):
self.push('restore_subscriber')
- if not self.pubkey:
- self.push('send_key_request')
+
+ pgp_address = PGPAddress.for_address(self.address)
+
+ if pgp_address is not None:
+ if not pgp_address.key:
+ self.push('send_key_request')
+ else:
+ if not pgp_address.key_confirmed:
+ self.push('send_key_confirm_request')
else:
- if not self.pubkey_confirmed:
- self.push('send_key_confirm_request')
+ if not self.pubkey:
+ self.push('send_key_request')
+ else:
+ if not self.pubkey_confirmed:
+ self.push('send_key_confirm_request')
def _step_send_key_request(self):
self._set_token(TokenOwner.subscriber)