* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, see <http://www.gnu.org/licenses/>.
+ * along with this program; if not, see <https://www.gnu.org/licenses/>.
*/
/* GnuPG comes with a shell script gpg-zip which creates archive files
enum cmd_and_opt_values
{
aNull = 0,
+ aCreate = 600,
+ aExtract,
aEncrypt = 'e',
aDecrypt = 'd',
aSign = 's',
static ARGPARSE_OPTS opts[] = {
ARGPARSE_group (300, N_("@Commands:\n ")),
- ARGPARSE_c (aEncrypt, "encrypt", N_("create an archive")),
- ARGPARSE_c (aDecrypt, "decrypt", N_("extract an archive")),
+ ARGPARSE_c (aCreate, "create", N_("create an archive")),
+ ARGPARSE_c (aExtract, "extract", N_("extract an archive")),
+ ARGPARSE_c (aEncrypt, "encrypt", N_("create an encrypted archive")),
+ ARGPARSE_c (aDecrypt, "decrypt", N_("extract an encrypted archive")),
ARGPARSE_c (aSign, "sign", N_("create a signed archive")),
ARGPARSE_c (aList, "list-archive", N_("list an archive")),
\f
-/* Print usage information and and provide strings for help. */
+/* Print usage information and provide strings for help. */
static const char *
my_strusage( int level )
{
return 1;
for (i = 0; list; i++)
- (*r_argv)[i] = list->d, list = list->next;
+ {
+ gpgrt_annotate_leaked_object (list);
+ (*r_argv)[i] = list->d;
+ list = list->next;
+ }
+ gpgrt_annotate_leaked_object (*r_argv);
return 0;
}
\f
set_cmd (&cmd, pargs->r_opt);
break;
+ case aCreate:
+ set_cmd (&cmd, aEncrypt);
+ skip_crypto = 1;
+ break;
+
+ case aExtract:
+ set_cmd (&cmd, aDecrypt);
+ skip_crypto = 1;
+ break;
+
case oRecipient:
add_to_strlist (&opt.recipients, pargs->r.ret_str);
break;
gnupg_reopen_std (GPGTAR_NAME);
set_strusage (my_strusage);
- log_set_prefix (GPGTAR_NAME, 1);
+ log_set_prefix (GPGTAR_NAME, GPGRT_LOG_WITH_PREFIX);
/* Make sure that our subsystems are ready. */
i18n_init();
/* Read the next record from STREAM. RECORD is a buffer provided by
the caller and must be at leadt of size RECORDSIZE. The function
- return 0 on success and and error code on failure; a diagnostic
+ return 0 on success and error code on failure; a diagnostic
printed as well. Note that there is no need for an EOF indicator
because a tarball has an explicit EOF record. */
gpg_error_t