Minor cleanups.
selftest failed (for example, if -mms-bitfields was not used on
MingW32 targets).
+ * New functions gpgme_io_read and gpgme_io_write for use with
+ gpgme_passphrase_cb_t and gpgme_edit_cb_t functions.
+
+
* Interface changes relative to the 1.1.7 release:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
GPGME_KEYLIST_MODE_EPHEMERAL NEW.
GPGME_ENCRYPT_NO_ENCRYPT_TO NEW.
gpgme_check_version CHANGED: Is now a macro.
gpgme_new EXTENDED: More failure codes.
+ gpgme_io_read NEW.
+ gpgme_io_write NEW.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2009-06-09 Werner Koch <wk@g10code.com>
+ * version.c (gpgme_check_version_internal): Make result const.
+
+ * gpgme.c: Include priv-io.h.
+ (gpgme_io_read, gpgme_io_write): New.
+ * libgpgme.vers (GPGME_1.1): Add them.
+ * gpgme.def: Ditto.
+
* Makefile.am (main_sources): Remove gpgme.h.
(include_HEADERS): Rename to nodist_include_HEADERS so that a
VPATH build won't use the distributed one.
#include "ops.h"
#include "wait.h"
#include "debug.h"
+#include "priv-io.h"
\f
/* The default locale. */
}
+/* This function provides access to the internal read function; it is
+ normally not used. */
+ssize_t
+gpgme_io_read (int fd, void *buffer, size_t count)
+{
+ int ret;
+
+ ret = _gpgme_io_read (fd, buffer, count);
+
+ return ret;
+}
+
+
+/* This function provides access to the internal write function. It
+ is to be used by user callbacks to return data to gpgme. See
+ gpgme_passphrase_cb_t and gpgme_edit_cb_t. */
+ssize_t
+gpgme_io_write (int fd, const void *buffer, size_t count)
+{
+ int ret;
+
+ ret = _gpgme_io_write (fd, buffer, count);
+
+ return ret;
+}
+
+
/* This function returns the callback function for I/O. */
void
gpgme_get_io_cbs (gpgme_ctx_t ctx, gpgme_io_cbs_t io_cbs)
gpgme_op_assuan_transact @134
gpgme_check_version_internal @135
+
+ gpgme_io_read @136
+ gpgme_io_write @137
+
; END
/* Get the current I/O callback functions. */
void gpgme_get_io_cbs (gpgme_ctx_t ctx, gpgme_io_cbs_t io_cbs);
+/* Wrappers around the internal I/O functions for use with
+ gpgme_passphrase_cb_t and gpgme_edit_cb_t. */
+ssize_t gpgme_io_read (int fd, void *buffer, size_t count);
+ssize_t gpgme_io_write (int fd, const void *buffer, size_t count);
+
/* Process the pending operation and, if HANG is non-zero, wait for
the pending operation to finish. */
gpgme_ctx_t gpgme_wait (gpgme_ctx_t ctx, gpgme_error_t *status, int hang);
gpgme_op_assuan_transact_start;
gpgme_check_version_internal;
+
+ gpgme_io_read;
+ gpgme_io_write;
+
};
gpgme_check_version_internal (const char *req_version,
size_t offset_sig_validity)
{
- char *result;
+ const char *result;
TRACE2 (DEBUG_INIT, "gpgme_check_version_internal: ", 0,
"req_version=%s, offset_sig_validity=%i",
+2009-06-09 Werner Koch <wk@g10code.com>
+
+ * gpg/Makefile.am (./pubring.gpg): Ignore errors in case of
+ already imported keys. Add --no-permission-warning and remove
+ obsolete --allow-secret-key-import.
+ * gpg/mkdemodirs.in (GPG): Add --no-permission-warning.
+
+ * gpg/t-edit.c (edit_fnc): Use gpgme_io_write.
+
2009-04-19 Moritz <moritz@gnu.org>
* gpg/Makefile.am (EXTRA_DIST): Replaced mkdemodirs with mkdemodirs.in.
all-local: ./pubring.gpg ./gpg.conf ./gpg-agent.conf
./pubring.gpg: $(srcdir)/pubdemo.asc ./Alpha/Secret.gpg
- $(GPG) --homedir . --import $(srcdir)/pubdemo.asc
- $(GPG) --homedir . --allow-secret-key-import \
+ -$(GPG) --homedir . --no-permission-warning \
+ --import $(srcdir)/pubdemo.asc
+ -$(GPG) --homedir . --no-permission-warning \
--import Alpha/Secret.gpg Zulu/Secret.gpg
./Alpha/Secret.gpg: mkdemodirs secdemo.asc
set -e
-GPG="@GPG@ --batch --quiet --no-secmem-warning"
+GPG="@GPG@ --batch --quiet --no-secmem-warning --no-permission-warning"
NAMES='Alpha Bravo Charlie Delta Echo Foxtrot Golf Hotel India
Juliet Kilo Lima Mike November Oscar Papa Quebec Romeo
Sierra Tango Uniform Victor Whisky XRay Yankee Zulu'
[ -d $name ] && rm -r $name
mkdir $name
$GPGDEMO --export-secret-key -o - $name > $name/Secret.gpg
- $GPG --homedir $name --allow-secret-key-import --import $name/Secret.gpg
+ $GPG --homedir $name --import $name/Secret.gpg
$GPGDEMO --export -o - $name > $name/Public.gpg
$GPG --homedir $name --import $name/Public.gpg
[ -f $name/pubring.gpg~ ] && rm $name/pubring.gpg~
if (result)
{
- write (fd, result, strlen (result));
- write (fd, "\n", 1);
+ gpgme_io_write (fd, result, strlen (result));
+ gpgme_io_write (fd, "\n", 1);
}
return 0;
}