mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
* g10.c (main): Add --symmetric --sign --encrypt.
* main.h, encode.c (setup_symkey): New. Prompt for a passphrase and create a DEK for symmetric encryption. (write_symkey_enc): New. Write out symmetrically encrypted session keys. (encode_crypt, encrypt_filter): Use them here here when creating a message that can be decrypted with a passphrase or a pk. * sign.c (sign_file): Call setup_symkey if we are doing a --symmetric --sign --encrypt.
This commit is contained in:
parent
fef77d93b7
commit
bc1e4357a9
5 changed files with 128 additions and 50 deletions
15
g10/main.h
15
g10/main.h
|
@ -1,5 +1,6 @@
|
|||
/* main.h
|
||||
* Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
|
||||
* Copyright (C) 1998, 1999, 2000, 2001, 2002,
|
||||
* 2003 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
|
@ -32,10 +33,13 @@
|
|||
#define DEFAULT_DIGEST_ALGO DIGEST_ALGO_SHA1
|
||||
#define DEFAULT_COMPRESS_ALGO COMPRESS_ALGO_ZIP
|
||||
|
||||
typedef struct {
|
||||
int header_okay;
|
||||
PK_LIST pk_list;
|
||||
cipher_filter_context_t cfx;
|
||||
typedef struct
|
||||
{
|
||||
int header_okay;
|
||||
PK_LIST pk_list;
|
||||
DEK *symkey_dek;
|
||||
STRING2KEY *symkey_s2k;
|
||||
cipher_filter_context_t cfx;
|
||||
} encrypt_filter_context_t;
|
||||
|
||||
struct groupitem
|
||||
|
@ -110,6 +114,7 @@ int parse_options(char *str,unsigned int *options,struct parse_options *opts);
|
|||
void display_online_help( const char *keyword );
|
||||
|
||||
/*-- encode.c --*/
|
||||
int setup_symkey(STRING2KEY **symkey_s2k,DEK **symkey_dek);
|
||||
int encode_symmetric( const char *filename );
|
||||
int encode_store( const char *filename );
|
||||
int encode_crypt( const char *filename, STRLIST remusr, int use_symkey );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue