aboutsummaryrefslogtreecommitdiffstats
path: root/g10/import.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/import.c')
-rw-r--r--g10/import.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/g10/import.c b/g10/import.c
index 90fc2d678..441dcca9d 100644
--- a/g10/import.c
+++ b/g10/import.c
@@ -1175,6 +1175,12 @@ import_secret_one( 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_sk(sk));