From 159e801043de479d9899fccb07a79fbbcc76e751 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 29 Jan 2025 18:06:15 +0100 Subject: gpgsm: Allow unattended PKCS#12 export without passphrase. * sm/gpgsm.c (oNoProtection): New. (opts): Add "--no-protection". (main): PArse it. * sm/gpgsm.h (struct server_control_s): Add field no_protection. * sm/server.c (option_handler): Add option "no-protection". (reset_notify): Clear option. * sm/export.c (export_p12): Use empty passphrase if option is set. --- sm/gpgsm.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sm/gpgsm.h') diff --git a/sm/gpgsm.h b/sm/gpgsm.h index be5e79c9a..23cba59e1 100644 --- a/sm/gpgsm.h +++ b/sm/gpgsm.h @@ -284,6 +284,8 @@ struct server_control_s * progress info and to decide on how to allocate buffers. */ uint64_t input_size_hint; + int no_protection; /* No passphrase for PKCS#12 export. */ + int create_base64; /* Create base64 encoded output */ int create_pem; /* create PEM output */ const char *pem_name; /* PEM name to use */ -- cgit v1.2.3