diff options
Diffstat (limited to 'doc/gpgme.info-1')
-rw-r--r-- | doc/gpgme.info-1 | 46 |
1 files changed, 36 insertions, 10 deletions
diff --git a/doc/gpgme.info-1 b/doc/gpgme.info-1 index 839678b..f7503b3 100644 --- a/doc/gpgme.info-1 +++ b/doc/gpgme.info-1 @@ -19,8 +19,8 @@ END-INFO-DIR-ENTRY This file documents the GPGME library. - This is Edition 1.7.0-beta361, last updated 26 August 2015, of ‘The -‘GnuPG Made Easy’ Reference Manual’, for Version 1.7.0-beta361. + This is Edition 1.7.1, last updated 26 August 2015, of ‘The ‘GnuPG +Made Easy’ Reference Manual’, for Version 1.7.1. Copyright © 2002–2008, 2010, 2012–2016 g10 Code GmbH. @@ -41,9 +41,8 @@ File: gpgme.info, Node: Top, Next: Introduction, Up: (dir) Main Menu ********* -This is Edition 1.7.0-beta361, last updated 26 August 2015, of ‘The -‘GnuPG Made Easy’ Reference Manual’, for Version 1.7.0-beta361 of the -GPGME library. +This is Edition 1.7.1, last updated 26 August 2015, of ‘The ‘GnuPG Made +Easy’ Reference Manual’, for Version 1.7.1 of the GPGME library. * Menu: @@ -4694,6 +4693,21 @@ File: gpgme.info, Node: Decrypt and Verify, Next: Sign, Prev: Verify, Up: Cr CTX, CIPHER, PLAIN or R_STAT is not a valid pointer, and ‘GPG_ERR_NO_DATA’ if CIPHER does not contain any data to decrypt. + When processing mails it is sometimes useful to extract the actual +mail address (the “addr-spec”) from a string. GPGME provides this +helper function which uses the same semantics as the internal functions +in GPGME and GnuPG: + + -- Function: char * gpgme_addrspec_from_uid (const char *UID) + + Return the mail address (called “addr-spec” in RFC-5322) from the + string UID which is assumed to be a user id (called “address” in + RFC-5322). All plain ASCII characters (i.e. those with bit 7 + cleared) in the result are converted to lowercase. Caller must + free the result using ‘gpgme_free’. Returns ‘NULL’ if no valid + address was found (in which case ‘ERRNO’ is set to ‘EINVAL’) or for + other errors. + File: gpgme.info, Node: Sign, Next: Encrypt, Prev: Decrypt and Verify, Up: Crypto Operations @@ -5550,6 +5564,7 @@ next. We only support waiting for the success of a single operation. fd_set wfds; int i, n; int any = 0; + struct timeval tv; struct one_fd *fdlist = loop->fds; pthread_mutex_lock (&loop->lock); @@ -5558,11 +5573,14 @@ next. We only support waiting for the success of a single operation. for (i = 0; i < MAX_FDS; i++) if (fdlist[i].fd != -1) FD_SET (fdlist[i].fd, fdlist[i].dir ? &rfds : &wfds); - pthread_mutex_unlock (&loop->unlock); + pthread_mutex_unlock (&loop->lock); + + tv.tv_sec = 0; + tv.tv_usec = 1000; do { - n = select (FD_SETSIZE, &rfds, &wfds, NULL, 0); + n = select (FD_SETSIZE, &rfds, &wfds, NULL, &tv); } while (n < 0 && errno == EINTR); @@ -5614,6 +5632,7 @@ next. We only support waiting for the success of a single operation. gpgme_error_t err; gpgme_data_t sig, text; int i; + pthread_mutexattr_t attr; struct gpgme_io_cbs io_cbs = { add_io_cb, @@ -5623,12 +5642,19 @@ next. We only support waiting for the success of a single operation. &result }; - init_gpgme (void); + init_gpgme (); /* Initialize the loop structure. */ - pthread_mutex_init (&loop.lock, NULL); + + /* The mutex must be recursive, since remove_io_cb (which acquires a + lock) can be called while holding a lock acquired in do_select. */ + pthread_mutexattr_init (&attr); + pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_RECURSIVE); + pthread_mutex_init (&loop.lock, &attr); + pthread_mutexattr_destroy (&attr); + for (i = 0; i < MAX_FDS; i++) - loop->fds[i].fd = -1; + loop.fds[i].fd = -1; /* Initialize the result structure. */ result.done = 0; |