aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2005-09-20 03:34:32 +0000
committerDavid Shaw <[email protected]>2005-09-20 03:34:32 +0000
commit8e17d6437d38cab37057fef3612a5a122be7a9f1 (patch)
tree795efdf24d652ae102fad20044bdfa564c904be7
parent* main.h, misc.c (parse_options): Add the ability to have help (diff)
downloadgnupg-8e17d6437d38cab37057fef3612a5a122be7a9f1.tar.gz
gnupg-8e17d6437d38cab37057fef3612a5a122be7a9f1.zip
* keylist.c (reorder_keyblock, do_reorder_keyblock): Reorder attribute
IDs as well as regular text IDs. * plaintext.c (ask_for_detached_datafile): Use make_filename() on filename so tilde expansion works.
Diffstat (limited to '')
-rw-r--r--g10/ChangeLog8
-rw-r--r--g10/keylist.c14
-rw-r--r--g10/plaintext.c6
3 files changed, 24 insertions, 4 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index 57134e67b..bea12dac7 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,11 @@
+2005-09-19 David Shaw <[email protected]>
+
+ * keylist.c (reorder_keyblock, do_reorder_keyblock): Reorder
+ attribute IDs as well as regular text IDs.
+
+ * plaintext.c (ask_for_detached_datafile): Use make_filename() on
+ filename so tilde expansion works.
+
2005-09-14 David Shaw <[email protected]>
* main.h, misc.c (parse_options): Add the ability to have help
diff --git a/g10/keylist.c b/g10/keylist.c
index b5ba537de..610a83911 100644
--- a/g10/keylist.c
+++ b/g10/keylist.c
@@ -1379,15 +1379,16 @@ list_keyblock_colon( KBNODE keyblock, int secret, int fpr )
* Reorder the keyblock so that the primary user ID (and not attribute
* packet) comes first. Fixme: Replace this by a generic sort
* function. */
-void
-reorder_keyblock (KBNODE keyblock)
+static void
+do_reorder_keyblock (KBNODE keyblock,int attr)
{
KBNODE primary = NULL, primary0 = NULL, primary2 = NULL;
KBNODE last, node;
for (node=keyblock; node; primary0=node, node = node->next) {
if( node->pkt->pkttype == PKT_USER_ID &&
- !node->pkt->pkt.user_id->attrib_data &&
+ ((attr && node->pkt->pkt.user_id->attrib_data) ||
+ (!attr && !node->pkt->pkt.user_id->attrib_data)) &&
node->pkt->pkt.user_id->is_primary ) {
primary = primary2 = node;
for (node=node->next; node; primary2=node, node = node->next ) {
@@ -1419,6 +1420,13 @@ reorder_keyblock (KBNODE keyblock)
}
void
+reorder_keyblock (KBNODE keyblock)
+{
+ do_reorder_keyblock(keyblock,1);
+ do_reorder_keyblock(keyblock,0);
+}
+
+void
list_keyblock( KBNODE keyblock, int secret, int fpr, void *opaque )
{
reorder_keyblock (keyblock);
diff --git a/g10/plaintext.c b/g10/plaintext.c
index e3ea3695e..dec3b532c 100644
--- a/g10/plaintext.c
+++ b/g10/plaintext.c
@@ -446,12 +446,16 @@ ask_for_detached_datafile( MD_HANDLE md, MD_HANDLE md2,
int any=0;
tty_printf(_("Detached signature.\n"));
do {
+ char *name;
xfree(answer);
tty_enable_completion(NULL);
- answer = cpr_get("detached_signature.filename",
+ name = cpr_get("detached_signature.filename",
_("Please enter name of data file: "));
tty_disable_completion();
cpr_kill_prompt();
+ answer=make_filename(name,(void *)NULL);
+ xfree(name);
+
if( any && !*answer ) {
rc = G10ERR_READ_FILE;
goto leave;