* 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
This commit is contained in:
parent
0d3ffd103d
commit
506ae14290
@ -1,5 +1,14 @@
|
|||||||
2002-05-03 Werner Koch <wk@gnupg.org>
|
2002-05-03 Werner Koch <wk@gnupg.org>
|
||||||
|
|
||||||
|
* 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
|
* verify.c (_gpgme_verify_status_handler): Handle TRUST_* status
|
||||||
lines so that a claim can be made without looking up the key.
|
lines so that a claim can be made without looking up the key.
|
||||||
(gpgme_get_sig_string_attr): New.
|
(gpgme_get_sig_string_attr): New.
|
||||||
|
@ -557,7 +557,7 @@ gpgme_data_rewind (GpgmeData dh)
|
|||||||
* error code GPGME_EOF.
|
* error code GPGME_EOF.
|
||||||
**/
|
**/
|
||||||
GpgmeError
|
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;
|
size_t nbytes;
|
||||||
|
|
||||||
@ -679,12 +679,12 @@ _gpgme_data_get_as_string (GpgmeData dh)
|
|||||||
* Return value: 0 on success or an error code
|
* Return value: 0 on success or an error code
|
||||||
**/
|
**/
|
||||||
GpgmeError
|
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)
|
if (!dh || !buffer)
|
||||||
return mk_error (Invalid_Value);
|
return mk_error (Invalid_Value);
|
||||||
|
|
||||||
return _gpgme_data_append (dh, buffer, length );
|
return _gpgme_data_append (dh, (const char *)buffer, length );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -300,8 +300,9 @@ _gpgme_gpgsm_new (GpgsmObject *r_gpgsm)
|
|||||||
argv[1] = "--server";
|
argv[1] = "--server";
|
||||||
argv[2] = NULL;
|
argv[2] = NULL;
|
||||||
|
|
||||||
err = assuan_pipe_connect (&gpgsm->assuan_ctx,
|
err = assuan_pipe_connect2 (&gpgsm->assuan_ctx,
|
||||||
_gpgme_get_gpgsm_path (), argv, child_fds);
|
_gpgme_get_gpgsm_path (), argv, child_fds,
|
||||||
|
1 /* dup stderr to /dev/null */);
|
||||||
|
|
||||||
dft_display = getenv ("DISPLAY");
|
dft_display = getenv ("DISPLAY");
|
||||||
if (dft_display)
|
if (dft_display)
|
||||||
|
@ -212,6 +212,16 @@ gpgme_set_protocol (GpgmeCtx ctx, GpgmeProtocol protocol)
|
|||||||
return 0;
|
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:
|
* gpgme_set_armor:
|
||||||
|
@ -233,6 +233,9 @@ char *gpgme_get_notation (GpgmeCtx ctx);
|
|||||||
/* Set the protocol to be used by CTX to PROTO. */
|
/* Set the protocol to be used by CTX to PROTO. */
|
||||||
GpgmeError gpgme_set_protocol (GpgmeCtx ctx, GpgmeProtocol 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. */
|
/* If YES is non-zero, enable armor mode in CTX, disable it otherwise. */
|
||||||
void gpgme_set_armor (GpgmeCtx ctx, int yes);
|
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
|
/* Read LENGTH bytes from the data object DH and store them in the
|
||||||
memory starting at BUFFER. The number of bytes actually read is
|
memory starting at BUFFER. The number of bytes actually read is
|
||||||
returned in NREAD. */
|
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);
|
size_t length, size_t *nread);
|
||||||
|
|
||||||
/* Write LENGTH bytes starting from BUFFER into the data object DH. */
|
/* 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. */
|
/* Key and trust functions. */
|
||||||
|
@ -553,6 +553,7 @@ gpgme_get_sig_key (GpgmeCtx c, int idx, GpgmeKey *r_key)
|
|||||||
err = gpgme_new (&listctx);
|
err = gpgme_new (&listctx);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
gpgme_set_protocol (listctx, gpgme_get_protocol (c));
|
||||||
gpgme_set_keylist_mode (listctx, c->keylist_mode);
|
gpgme_set_keylist_mode (listctx, c->keylist_mode);
|
||||||
err = gpgme_op_keylist_start (listctx, result->fpr, 0);
|
err = gpgme_op_keylist_start (listctx, result->fpr, 0);
|
||||||
if (!err)
|
if (!err)
|
||||||
|
Loading…
Reference in New Issue
Block a user