GPG and PGP5
brian moore
bem at cmc.net
Sun Oct 18 00:04:55 CEST 1998
And the patch for the --force-v3 option that makes PGP5 happy with
GPG signatures.
--
Brian Moore | "The Zen nature of a spammer resembles
Sysadmin, C/Perl Hacker | a cockroach, except that the cockroach
Usenet Vandal | is higher up on the evolutionary chain."
Netscum, Bane of Elves. Peter Olson, Delphi Postmaster
-------------- next part --------------
diff -uNr gnupg-0.4.1/g10/armor.c gnupg-0.4.1b/g10/armor.c
--- gnupg-0.4.1/g10/armor.c Wed Sep 23 05:28:02 1998
+++ gnupg-0.4.1b/g10/armor.c Sat Oct 17 00:04:29 1998
@@ -1048,7 +1048,7 @@
iobuf_put(a, c);
c = bintoasc[radbuf[2]&077];
iobuf_put(a, c);
- if( ++idx2 >= (72/4) ) {
+ if( ++idx2 >= (64/4) ) {
iobuf_put(a, '\n');
idx2=0;
}
diff -uNr gnupg-0.4.1/g10/g10.c gnupg-0.4.1b/g10/g10.c
--- gnupg-0.4.1/g10/g10.c Tue Oct 6 06:56:24 1998
+++ gnupg-0.4.1b/g10/g10.c Sat Oct 17 22:57:50 1998
@@ -139,6 +139,7 @@
oS2KMode,
oS2KDigest,
oS2KCipher,
+ oForceV3,
aTest };
@@ -200,6 +201,7 @@
#endif
{ oOutput, "output", 2, N_("use as output file")},
{ oVerbose, "verbose", 0, N_("verbose") },
+ { oForceV3, "force-v3", 0, N_("force v3 packets") },
/* { oDryRun, "dry-run", 0, N_("do not make any changes") }, */
{ oBatch, "batch", 0, N_("batch mode: never ask")},
{ oAnswerYes, "yes", 0, N_("assume yes on most questions")},
@@ -730,6 +732,7 @@
case oCipherAlgo: def_cipher_string = m_strdup(pargs.r.ret_str); break;
case oDigestAlgo: def_digest_string = m_strdup(pargs.r.ret_str); break;
case oNoSecmemWarn: secmem_set_flags( secmem_get_flags() | 1 ); break;
+ case oForceV3: opt.forcev3 = 1; break;
#else
case oCipherAlgo:
case oDigestAlgo:
diff -uNr gnupg-0.4.1/g10/options.h gnupg-0.4.1b/g10/options.h
--- gnupg-0.4.1/g10/options.h Mon Sep 28 11:01:35 1998
+++ gnupg-0.4.1b/g10/options.h Sat Oct 17 22:20:33 1998
@@ -58,6 +58,7 @@
int s2k_mode;
int s2k_digest_algo;
int s2k_cipher_algo;
+ int forcev3;
} opt;
diff -uNr gnupg-0.4.1/g10/sign.c gnupg-0.4.1b/g10/sign.c
--- gnupg-0.4.1/g10/sign.c Fri Sep 18 06:08:32 1998
+++ gnupg-0.4.1b/g10/sign.c Sat Oct 17 22:56:49 1998
@@ -108,6 +108,9 @@
SK_LIST sk_rover = NULL;
int old_style = 0;
+ if (opt.forcev3)
+ return 1;
+
/* if there are only old style capable key we use the old sytle */
for( sk_rover = sk_list; sk_rover; sk_rover = sk_rover->next ) {
PKT_secret_key *sk = sk_rover->sk;
@@ -367,7 +370,10 @@
/* build the signature packet */
/* fixme: this code is partly duplicated in make_keysig_packet */
sig = m_alloc_clear( sizeof *sig );
- sig->version = sk->version;
+ if (!old_style)
+ sig->version = sk->version;
+ else
+ sig->version = 3;
keyid_from_sk( sk, sig->keyid );
sig->digest_algo = hash_for(sk->pubkey_algo);
sig->pubkey_algo = sk->pubkey_algo;
More information about the Gnupg-devel
mailing list