aboutsummaryrefslogtreecommitdiffstats
path: root/g10/main.h
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2003-10-26 03:26:14 +0000
committerDavid Shaw <[email protected]>2003-10-26 03:26:14 +0000
commitbb7986e9a6a43a8732797ecf72f6759b1c4feaa4 (patch)
treecc638268722b231d80fa97b9d22e87778b01e5dd /g10/main.h
parentUpdated to 0.12.1 (diff)
downloadgnupg-bb7986e9a6a43a8732797ecf72f6759b1c4feaa4.tar.gz
gnupg-bb7986e9a6a43a8732797ecf72f6759b1c4feaa4.zip
* g10.c (main): Add --symmetric --encrypt command. This generates a
message that can be decrypted via a passphrase or public key system. * main.h, encode.c (encode_seskey): Allow passing in an already-created session key dek. (encode_simple): Use the actual symmetric cipher when encrypting a session key for a symmetric message. (encode_crypt): Add a flag to trigger a hybrid mode that can be decrypted via a passphrase or a pk. Change all callers. * mainproc.c (symkey_decrypt_sesskey): There is no way to tell the difference here between a bad passphrase and a cipher algorithm that we don't have, so use a error message that makes that clear. Use the actual list of ciphers when checking whether a cipher is invalid. Return error if the decrypted cipher algorithm is invalid. (proc_symkey_enc): In a mixed passphrase/pk message, if a valid dek already exists from decrypting via pk, do not try to process the passphrase. (proc_symkey_enc): Indicate when we're decrypting a session key as opposed to decrypting data. If a passphrase is invalid, discard the dek so we'll keep trying.
Diffstat (limited to 'g10/main.h')
-rw-r--r--g10/main.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/g10/main.h b/g10/main.h
index b64e33577..5ea89b18d 100644
--- a/g10/main.h
+++ b/g10/main.h
@@ -112,7 +112,7 @@ void display_online_help( const char *keyword );
/*-- encode.c --*/
int encode_symmetric( const char *filename );
int encode_store( const char *filename );
-int encode_crypt( const char *filename, STRLIST remusr );
+int encode_crypt( const char *filename, STRLIST remusr, int use_symkey );
void encode_crypt_files(int nfiles, char **files, STRLIST remusr);
int encrypt_filter( void *opaque, int control,
IOBUF a, byte *buf, size_t *ret_len);