diff options
Diffstat (limited to 'g10/import.c')
-rw-r--r-- | g10/import.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/g10/import.c b/g10/import.c index 74443ef10..c3ad53632 100644 --- a/g10/import.c +++ b/g10/import.c @@ -1563,6 +1563,12 @@ import_secret_one (ctrl_t ctrl, const char *fname, KBNODE keyblock, } stats->secret_read++; + if ((options & IMPORT_NO_SECKEY)) + { + log_error (_("importing secret keys not allowed\n")); + return 0; + } + if (!uidnode) { log_error( _("key %s: no user ID\n"), keystr_from_pk (pk)); |