diff options
author | David Shaw <[email protected]> | 2003-11-13 02:54:12 +0000 |
---|---|---|
committer | David Shaw <[email protected]> | 2003-11-13 02:54:12 +0000 |
commit | bc1e4357a91b98b39db7f0a5310f9d3f8861aa66 (patch) | |
tree | 53c69e38b06721474b1781acd6f7370096b00655 /g10/main.h | |
parent | * configure.ac: Make sure that the resolver API actually compiles, and not (diff) | |
download | gnupg-bc1e4357a91b98b39db7f0a5310f9d3f8861aa66.tar.gz gnupg-bc1e4357a91b98b39db7f0a5310f9d3f8861aa66.zip |
* 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.
Diffstat (limited to 'g10/main.h')
-rw-r--r-- | g10/main.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/g10/main.h b/g10/main.h index 1288790db..8afde1104 100644 --- a/g10/main.h +++ b/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 ); |