diff options
| author | Werner Koch <[email protected]> | 2002-05-03 18:20:06 +0000 | 
|---|---|---|
| committer | Werner Koch <[email protected]> | 2002-05-03 18:20:06 +0000 | 
| commit | 506ae142900ffb7aaf745ce79e6e9465fda4630b (patch) | |
| tree | cb3c487a8f341e9dd9e42f49a3e4811c35d21278 | |
| parent | * assuan-pipe-connect.c (assuan_pipe_connect2): New to extend (diff) | |
| download | gpgme-506ae142900ffb7aaf745ce79e6e9465fda4630b.tar.gz gpgme-506ae142900ffb7aaf745ce79e6e9465fda4630b.zip  | |
* engine-gpgsm.c (_gpgme_gpgsm_new): Redirect any gpgsm error
output to /dev/null.
* verify.c (gpgme_get_sig_key): Set the protocol of the listctx.
* gpgme.c (gpgme_get_protocol): New.
* data.c (gpgme_data_write): Changed type of BUFFER to void*.
(gpgme_data_read): Ditto.
* verify.c (_gpgme_verify_status_handler): Handle TRUST_* status
lines so that a claim can be made without looking up the key.
(gpgme_get_sig_string_attr): New.
(gpgme_get_sig_ulong_attr): New.
* gpgme.h (GpgmeAttr): Added GPGME_ATTR_SIG_STATUS.
* gpgme.h (GpgmeSigStat): Add _GOOD_EXP and _GOOD_EXPKEY.
* verify.c (_gpgme_verify_status_handler, finish_sig): Handle
these new status codes.  Store the expiration time
| -rw-r--r-- | gpgme/ChangeLog | 9 | ||||
| -rw-r--r-- | gpgme/data.c | 6 | ||||
| -rw-r--r-- | gpgme/engine-gpgsm.c | 5 | ||||
| -rw-r--r-- | gpgme/gpgme.c | 10 | ||||
| -rw-r--r-- | gpgme/gpgme.h | 7 | ||||
| -rw-r--r-- | gpgme/verify.c | 1 | 
6 files changed, 31 insertions, 7 deletions
diff --git a/gpgme/ChangeLog b/gpgme/ChangeLog index d22b3617..9ece8fbf 100644 --- a/gpgme/ChangeLog +++ b/gpgme/ChangeLog @@ -1,5 +1,14 @@  2002-05-03  Werner Koch  <[email protected]> +	* engine-gpgsm.c (_gpgme_gpgsm_new): Redirect any gpgsm error +	output to /dev/null. + +	* verify.c (gpgme_get_sig_key): Set the protocol of the listctx. +	* gpgme.c (gpgme_get_protocol): New. + +	* data.c (gpgme_data_write): Changed type of BUFFER to void*. +	(gpgme_data_read): Ditto. +  	* verify.c (_gpgme_verify_status_handler): Handle TRUST_* status  	lines so that a claim can be made without looking up the key.  	(gpgme_get_sig_string_attr): New.  diff --git a/gpgme/data.c b/gpgme/data.c index ac827576..fb94f328 100644 --- a/gpgme/data.c +++ b/gpgme/data.c @@ -557,7 +557,7 @@ gpgme_data_rewind (GpgmeData dh)   * error code GPGME_EOF.   **/  GpgmeError -gpgme_data_read (GpgmeData dh, char *buffer, size_t length, size_t *nread) +gpgme_data_read (GpgmeData dh, void *buffer, size_t length, size_t *nread)  {    size_t nbytes; @@ -679,12 +679,12 @@ _gpgme_data_get_as_string (GpgmeData dh)   * Return value: 0 on success or an error code   **/  GpgmeError -gpgme_data_write (GpgmeData dh, const char *buffer, size_t length) +gpgme_data_write (GpgmeData dh, const void *buffer, size_t length)  {    if (!dh || !buffer)      return mk_error (Invalid_Value); -  return _gpgme_data_append (dh, buffer, length ); +  return _gpgme_data_append (dh, (const char *)buffer, length );  } diff --git a/gpgme/engine-gpgsm.c b/gpgme/engine-gpgsm.c index a4675ac0..7ecbf43d 100644 --- a/gpgme/engine-gpgsm.c +++ b/gpgme/engine-gpgsm.c @@ -300,8 +300,9 @@ _gpgme_gpgsm_new (GpgsmObject *r_gpgsm)    argv[1] = "--server";    argv[2] = NULL; -  err = assuan_pipe_connect (&gpgsm->assuan_ctx, -			     _gpgme_get_gpgsm_path (), argv, child_fds); +  err = assuan_pipe_connect2 (&gpgsm->assuan_ctx, +                              _gpgme_get_gpgsm_path (), argv, child_fds, +                              1 /* dup stderr to /dev/null */);    dft_display = getenv ("DISPLAY");    if (dft_display) diff --git a/gpgme/gpgme.c b/gpgme/gpgme.c index 21578cad..50546de6 100644 --- a/gpgme/gpgme.c +++ b/gpgme/gpgme.c @@ -212,6 +212,16 @@ gpgme_set_protocol (GpgmeCtx ctx, GpgmeProtocol protocol)    return 0;  } +GpgmeProtocol +gpgme_get_protocol (GpgmeCtx ctx) +{ +  if (!ctx) +    return 0; /* well, this is OpenPGP */ +  if (ctx->use_cms) +    return GPGME_PROTOCOL_CMS; +  return GPGME_PROTOCOL_OpenPGP; +} +  /**   * gpgme_set_armor: diff --git a/gpgme/gpgme.h b/gpgme/gpgme.h index 976eb8ba..e9453830 100644 --- a/gpgme/gpgme.h +++ b/gpgme/gpgme.h @@ -233,6 +233,9 @@ char *gpgme_get_notation (GpgmeCtx ctx);  /* Set the protocol to be used by CTX to PROTO.  */  GpgmeError gpgme_set_protocol (GpgmeCtx ctx, GpgmeProtocol proto); +/* Get the protocol used with CTX */ +GpgmeProtocol gpgme_get_protocol (GpgmeCtx ctx); +  /* If YES is non-zero, enable armor mode in CTX, disable it otherwise.  */  void gpgme_set_armor (GpgmeCtx ctx, int yes); @@ -409,11 +412,11 @@ GpgmeError gpgme_data_rewind (GpgmeData dh);  /* Read LENGTH bytes from the data object DH and store them in the     memory starting at BUFFER.  The number of bytes actually read is     returned in NREAD.  */ -GpgmeError gpgme_data_read (GpgmeData dh, char *buffer, +GpgmeError gpgme_data_read (GpgmeData dh, void *buffer,  			    size_t length, size_t *nread);  /* Write LENGTH bytes starting from BUFFER into the data object DH.  */ -GpgmeError gpgme_data_write (GpgmeData dh, const char *buffer, size_t length); +GpgmeError gpgme_data_write (GpgmeData dh, const void *buffer, size_t length);  /* Key and trust functions.  */ diff --git a/gpgme/verify.c b/gpgme/verify.c index 5c6a3f72..d00800fa 100644 --- a/gpgme/verify.c +++ b/gpgme/verify.c @@ -553,6 +553,7 @@ gpgme_get_sig_key (GpgmeCtx c, int idx, GpgmeKey *r_key)        err = gpgme_new (&listctx);        if (err)  	return err; +      gpgme_set_protocol (listctx, gpgme_get_protocol (c));        gpgme_set_keylist_mode (listctx, c->keylist_mode);        err = gpgme_op_keylist_start (listctx, result->fpr, 0);        if (!err)  | 
