aboutsummaryrefslogtreecommitdiffstats
path: root/g10/keygen.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/keygen.c')
-rw-r--r--g10/keygen.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/g10/keygen.c b/g10/keygen.c
index 7742fd3ac..437a61abf 100644
--- a/g10/keygen.c
+++ b/g10/keygen.c
@@ -2072,9 +2072,11 @@ generate_subkeypair( KBNODE pub_keyblock, KBNODE sec_keyblock )
}
}
- if (sk->version < 4)
+ if (sk->version < 4) {
log_info (_("NOTE: creating subkeys for v3 keys "
"is not OpenPGP compliant\n"));
+ goto leave;
+ }
/* unprotect to get the passphrase */
switch( is_secret_key_protected( sk ) ) {