+2001-04-05 Werner Koch <wk@gnupg.org>
+
+ * configure.in (NEED_GPG_VERSION): Set to 1.0.4g
+
2001-04-02 Werner Koch <wk@gnupg.org>
Released 0.2.1.
# AGE, set REVISION to 0.
# 3. Interfaces removed (BAD, breaks upward compatibility): Increment
# CURRENT, set AGE and REVISION to 0.
-AM_INIT_AUTOMAKE(gpgme,0.2.1)
+AM_INIT_AUTOMAKE(gpgme,0.2.1a)
LIBGPGME_LT_CURRENT=3
LIBGPGME_LT_AGE=3
LIBGPGME_LT_REVISION=0
-NEED_GPG_VERSION=1.0.4f
+NEED_GPG_VERSION=1.0.4h
##############################################
AC_SUBST(LIBGPGME_LT_CURRENT)
+2001-04-19 Werner Koch <wk@gnupg.org>
+
+ * keylist.c (parse_timestamp): Adjusted for the changed
+ --fixed-list-mode of gpg 1.0.4h.
+
+2001-04-05 Werner Koch <wk@gnupg.org>
+
+ * verify.c (gpgme_op_verify_start): Enabled pipemode for detached sigs.
+
+2001-04-04 Werner Koch <wk@gnupg.org>
+
+ * w32-io.c (_gpgme_io_select): Don't select on the writer if there
+ are still bytes pending. Timo found this not easy to track down
+ race condition.
+
+2001-04-02 Werner Koch <wk@gnupg.org>
+
+ * gpgme.h: Add GPGME_ATTR_KEY_{EXPIRED,DISABLED}.
+ * key.c (gpgme_key_get_ulong_attr): And return those attribs.
+
+ * verify.c (gpgme_get_sig_key): Set keyliosting mode depending on
+ the mode set in the current context. Suggested by Timo.
+
+ * key.c (gpgme_key_get_ulong_attr): Return can_certify and not
+ can_encrypt. By Timo.
+
2001-03-30 Werner Koch <wk@gnupg.org>
* debug.c (debug_init): Allow to specify a debug file.
* let autoconf (using the AM_PATH_GPGME macro) check that this
* header matches the installed library.
* Warning: Do not edit the next line. configure will do that for you! */
-#define GPGME_VERSION "0.2.1"
+#define GPGME_VERSION "0.2.1a"
GPGME_ATTR_KEY_CAPS = 20,
GPGME_ATTR_CAN_ENCRYPT = 21,
GPGME_ATTR_CAN_SIGN = 22,
- GPGME_ATTR_CAN_CERTIFY = 23
+ GPGME_ATTR_CAN_CERTIFY = 23,
+ GPGME_ATTR_KEY_EXPIRED = 24,
+ GPGME_ATTR_KEY_DISABLED= 25
} GpgmeAttr;
typedef enum {
case GPGME_ATTR_TYPE:
case GPGME_ATTR_KEY_REVOKED:
case GPGME_ATTR_KEY_INVALID:
+ case GPGME_ATTR_KEY_EXPIRED:
+ case GPGME_ATTR_KEY_DISABLED:
case GPGME_ATTR_UID_REVOKED:
case GPGME_ATTR_UID_INVALID:
case GPGME_ATTR_CAN_ENCRYPT:
if (k)
val = k->flags.invalid;
break;
+ case GPGME_ATTR_KEY_EXPIRED:
+ for (k=&key->keys; k && idx; k=k->next, idx-- )
+ ;
+ if (k)
+ val = k->flags.expired;
+ break;
+ case GPGME_ATTR_KEY_DISABLED:
+ for (k=&key->keys; k && idx; k=k->next, idx-- )
+ ;
+ if (k)
+ val = k->flags.disabled;
+ break;
case GPGME_ATTR_UID_REVOKED:
for (u=key->uids; u && idx; u=u->next, idx-- )
;
val = u->invalid;
break;
case GPGME_ATTR_CAN_ENCRYPT:
- val = key->gloflags.can_encrypt;
+ val = key->gloflags.can_certify;
break;
case GPGME_ATTR_CAN_SIGN:
val = key->gloflags.can_sign;
static time_t
parse_timestamp ( char *p )
{
- struct tm tm;
- int i;
-
if (!*p )
return 0;
- if (strlen(p) < 10 || p[4] != '-' || p[7] != '-' )
- return (time_t)-1;
- p[4] = 0;
- p[7] = 0;
- p[10] = 0; /* just in case the time part follows */
- memset (&tm, 0, sizeof tm);
-
- i = atoi (p);
- if ( i < 1900 )
- return (time_t)-1;
- tm.tm_year = i - 1900;
-
- i = atoi (p+5);
- if ( i < 1 || i > 12 )
- return (time_t)-1;
- tm.tm_mon = i-1;
-
- i = atoi (p+8);
- if ( i < 1 || i > 31 )
- return (time_t)-1;
- tm.tm_mday = i;
-
- return mktime (&tm);
+ return (time_t)strtoul (p, NULL, 10);
}
if ( strlen (p) == DIM(key->keys.keyid)-1 )
strcpy (key->keys.keyid, p);
break;
- case 6: /* timestamp (1998-02-28) */
+ case 6: /* timestamp (seconds) */
key->keys.timestamp = parse_timestamp (p);
break;
case 7: /* valid for n days */
if ( strlen (p) == DIM(sk->keyid)-1 )
strcpy (sk->keyid, p);
break;
- case 6: /* timestamp (1998-02-28) */
+ case 6: /* timestamp (seconds) */
sk->timestamp = parse_timestamp (p);
break;
case 7: /* valid for n days */
if ( *p == '\n' ) {
/* (we require that the last line is terminated by a LF) */
*p = 0;
- /* fprintf (stderr, "read_status: `%s'\n", buffer); */
+ fflush (stdout); fprintf (stderr, "read_status: `%s'\n", buffer);
if (!strncmp (buffer, "[GNUPG:] ", 9 )
&& buffer[9] >= 'A' && buffer[9] <= 'Z' ) {
struct status_table_s t, *r;
{
int rc = 0;
int i;
- int pipemode = 0 /*!!text*/; /* use pipemode for detached sigs */
+ int pipemode = !!text; /* use pipemode for detached sigs */
fail_on_pending_request( c );
c->pending = 1;
* an internal context used for such key listings */
if ( (err=gpgme_new (&listctx)) )
return err;
+ gpgme_set_keylist_mode( listctx, c->keylist_mode );
if ( !(err=gpgme_op_keylist_start (listctx, res->fpr, 0 )) )
err=gpgme_op_keylist_next ( listctx, r_key );
gpgme_release (listctx);
DEBUG0 ("Too many objects for WFMO!" );
return -1;
}
- waitidx[nwait] = i;
- waitbuf[nwait++] = c->is_empty;
+ LOCK (c->mutex);
+ if ( !c->nbytes ) {
+ waitidx[nwait] = i;
+ waitbuf[nwait++] = c->is_empty;
+ DEBUG_ADD1 (dbg_help, "w%d ", fds[i].fd );
+ any = 1;
+ }
+ else {
+ DEBUG_ADD1 (dbg_help, "w%d(ignored) ", fds[i].fd );
+ }
+ UNLOCK (c->mutex);
}
- DEBUG_ADD1 (dbg_help, "w%d ", fds[i].fd );
- any = 1;
}
}
}