aboutsummaryrefslogtreecommitdiffstats
path: root/g10
diff options
context:
space:
mode:
Diffstat (limited to 'g10')
-rw-r--r--g10/ChangeLog19
-rw-r--r--g10/build-packet.c2
-rw-r--r--g10/g10.c6
-rw-r--r--g10/keygen.c8
-rw-r--r--g10/ringedit.c6
-rw-r--r--g10/status.c1
6 files changed, 33 insertions, 9 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index 79cdc09cc..dd94799ce 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,5 +1,24 @@
+2001-03-21 Werner Koch <[email protected]>
+
+ * status.c: Add sys/types.h so that it runs on Ultrix. Reported
+ by Georg Schwarz.x
+
+ * build-packet.c (build_sig_subpkt): Fixed generaton of packet
+ length header in case where 2 bytes headers are needed. Thanks to
+ Piotr Krukowiecki.
+
+2001-03-19 Werner Koch <[email protected]>
+
+ * g10.c (main): the default keyring is no always used unless
+ --no-default-keyring is given.
+
+ * ringedit.c (add_keyblock_resource): invalidate cache after file
+ creation.
+
2001-03-15 Werner Koch <[email protected]>
+ * keygen.c (ask_algo): Changed the warning of the ElGamal S+E Algo.
+
* keylist.c (print_capabilities): New.
(list_keyblock_colon): and use it here.
diff --git a/g10/build-packet.c b/g10/build-packet.c
index 79af6401a..e48770e83 100644
--- a/g10/build-packet.c
+++ b/g10/build-packet.c
@@ -818,7 +818,7 @@ build_sig_subpkt( PKT_signature *sig, sigsubpkttype_t type,
}
else if( nlen == 2 ) {
data[n0+2] = (buflen+1-192) / 256 + 192;
- data[n0+3] = (buflen+1-192) & 256;
+ data[n0+3] = (buflen+1-192) % 256;
data[n0+4] = type;
memcpy(data+n0+5, buffer, buflen );
}
diff --git a/g10/g10.c b/g10/g10.c
index e960384ff..af3e7f5c6 100644
--- a/g10/g10.c
+++ b/g10/g10.c
@@ -605,7 +605,7 @@ main( int argc, char **argv )
char *configname = NULL;
unsigned configlineno;
int parse_debug = 0;
- int default_config =1;
+ int default_config = 1;
int default_keyring = 1;
int greeting = 0;
int nogreeting = 0;
@@ -1128,11 +1128,11 @@ main( int argc, char **argv )
if( cmd != aDeArmor && cmd != aEnArmor
&& !(cmd == aKMode && argc == 2 ) ) {
- if( !sec_nrings && default_keyring ) /* add default secret rings */
+ if( !sec_nrings || default_keyring ) /* add default secret rings */
add_keyblock_resource("secring.gpg", 0, 1);
for(sl = sec_nrings; sl; sl = sl->next )
add_keyblock_resource( sl->d, 0, 1 );
- if( !nrings && default_keyring ) /* add default ring */
+ if( !nrings || default_keyring ) /* add default ring */
add_keyblock_resource("pubring.gpg", 0, 0);
for(sl = nrings; sl; sl = sl->next )
add_keyblock_resource( sl->d, 0, 0 );
diff --git a/g10/keygen.c b/g10/keygen.c
index 4afd06a56..727bca385 100644
--- a/g10/keygen.c
+++ b/g10/keygen.c
@@ -416,8 +416,10 @@ gen_dsa(unsigned int nbits, KBNODE pub_root, KBNODE sec_root, DEK *dek,
}
#if 0
-/* we can't enable generation right now, becuase we first need to implement
- * the keyflags */
+/* we can't enable generation right now, becuase we first need to
+ * implement the keyflags - the problem is that we need to change all
+ * signature editing function to keep the ketflags associated with an
+ * RSA key. */
static int
gen_rsa(int algo, unsigned nbits, KBNODE pub_root, KBNODE sec_root, DEK *dek,
STRING2KEY *s2k, PKT_secret_key **ret_sk, u32 expireval )
@@ -568,7 +570,7 @@ ask_algo( int addmode )
#endif
else if( algo == 4 ) {
if( cpr_get_answer_is_yes("keygen.algo.elg_se",_(
- "Do you really want to create a sign and encrypt key? "))) {
+ "The use of this algorithm is deprecated - create anyway? "))){
algo = PUBKEY_ALGO_ELGAMAL;
break;
}
diff --git a/g10/ringedit.c b/g10/ringedit.c
index a4cf263de..5e9102477 100644
--- a/g10/ringedit.c
+++ b/g10/ringedit.c
@@ -198,7 +198,7 @@ add_keyblock_resource( const char *url, int force, int secret )
char *filename = NULL;
int rc = 0;
enum resource_type rt = rt_UNKNOWN;
-
+ const char *created_fname = NULL;
/* Do we have an URL?
* gnupg-gdbm:filename := this is a GDBM resource
@@ -317,12 +317,14 @@ add_keyblock_resource( const char *url, int force, int secret )
#endif
if( !opt.quiet )
log_info(_("%s: keyring created\n"), filename );
+ created_fname = filename;
}
}
#if HAVE_DOSISH_SYSTEM || 1
iobuf_close( iobuf );
iobuf = NULL;
- /* must close it again */
+ if (created_fname) /* must invalidate that ugly cache */
+ iobuf_ioctl (NULL, 2, 0, (char*)created_fname);
#endif
break;
diff --git a/g10/status.c b/g10/status.c
index f6c1d1a02..44b858761 100644
--- a/g10/status.c
+++ b/g10/status.c
@@ -30,6 +30,7 @@
#include <sys/capability.h>
#endif
#ifdef HAVE_SYS_IPC_H
+ #include <sys/types.h>
#include <sys/ipc.h>
#endif
#ifdef HAVE_SYS_SHM_H