diff options
Diffstat (limited to 'g10/encode.c')
-rw-r--r-- | g10/encode.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/g10/encode.c b/g10/encode.c index a1fa0fb00..abc25c9ca 100644 --- a/g10/encode.c +++ b/g10/encode.c @@ -345,7 +345,7 @@ encode_crypt( const char *filename, STRLIST remusr ) { log_info(_("you can only encrypt to RSA keys of 2048 bits or " "less in --pgp2 mode\n")); - log_info(_("this message may not be usable by PGP 2.x\n")); + log_info(_("this message may not be usable by %s\n"),"PGP 2.x"); opt.pgp2=0; break; } @@ -407,7 +407,7 @@ encode_crypt( const char *filename, STRLIST remusr ) if( opt.pgp2 ) { log_info(_("unable to use the IDEA cipher for all of the keys " "you are encrypting to.\n")); - log_info(_("this message may not be usable by PGP 2.x\n")); + log_info(_("this message may not be usable by %s\n"),"PGP 2.x"); opt.pgp2=0; } } @@ -627,6 +627,18 @@ write_pubkey_enc_from_list( PK_LIST pk_list, DEK *dek, IOBUF out ) keyid_from_pk( pk, enc->keyid ); enc->throw_keyid = opt.throw_keyid; + if(opt.throw_keyid && (opt.pgp2 || opt.pgp6 || opt.pgp7)) + { + log_info(_("you may not use %s while in %s mode\n"), + "throw-keyid", + opt.pgp2?"--pgp2":opt.pgp6?"--pgp6":"--pgp7"); + + log_info(_("this message may not be usable by %s\n"), + opt.pgp2?"PGP 2.x":opt.pgp6?"PGP 6.x":"PGP 7.x"); + + opt.pgp2=opt.pgp6=opt.pgp7=0; + } + /* Okay, what's going on: We have the session key somewhere in * the structure DEK and want to encode this session key in * an integer value of n bits. pubkey_nbits gives us the |