[Announce] GPGME 0.4.1 released

Marcus Brinkmann Marcus.Brinkmann@ruhr-uni-bochum.de
Fri Jun 6 14:30:25 2003


We are pleased to announce version 0.4.1 of GnuPG Made Easy,
a library designed to make access to GnuPG easier for applications.
It may be found in the file (about 705 KB compressed)
ftp://ftp.gnupg.org/gcrypt/alpha/gpgme/gpgme-0.4.1.tar.gz.

It should soon appear on the mirrors listed at
http://www.gnupg.org/mirrors.html.

Bug reports and requests for assistance should be sent to
gnupg-devel@gnupg.org.

The md5sum checksums for this distibution are
a1bbbf4cb23e66799fcd638c1d9437d1  gpgme-0.4.1.tar.gz
4e72820a640cfb6fa6f6a253b631e3ee  gpgme-0.4.1.tar.gz.sig

PLEASE NOTE: This is an unstable development version for testing.
The latest stable release is 0.3.15 and available from
ftp://ftp.gnupg.org/gcrypt/gpgme/.

Noteworthy changes in version 0.4.1 (2003-06-06)
------------------------------------------------

 This is the release that 0.4.0 should have been.  There are many
 interface changes, please see below for the details.  The changes are
 sometimes the result of new functionality, but more often express a
 paradigm shift.  Others are an overdue cleanup to get GPGME in line
 with the GNU coding standards and to make the interface more
 self-consistent.  Here is an overview on the changes:

 All types have been renamed to conform to the GNU coding standards,
 most of the time by keeping the whole name in lowercase and inserting
 underscores between words.

 All operations consistently only accept input parameters in their
 invocation function, and return only an error code directly.  Further
 information about the result of the operation has to be retrieved
 afterwards by calling one of the result functions.  This unifies the
 synchronous and the asynchronous interface.

 The error values have been completely replaced by a more
 sophisticated model that allows GPGME to transparently and accurately
 report all errors from the other GnuPG components, irregardless of
 process boundaries.  This is achieved by using the library
 libgpg-errors, which is shared by all GnuPG components.  This library
 is now required for GPGME.

 The results of all operations are now provided by pointers to C
 structs rather than by XML structs or in other ways.

 Objects which used to be opaque (for example a key) are now pointers
 to accessible structs, so no accessor functions are necessary.

 Backward compatibility is provided where it was possible without too
 much effort and did not collide with the overall sanitization effort.
 However, this is only for ease of transition.  NO DEPRECATED FUNCTION
 OR DATA TYPE IS CONSIDERED A PART OF THE API OR ABI AND WILL BE
 DROPPED IN THE FUTURE WITHOUT CHANGING THE SONAME OF THE LIBRARY.
 Recommendations how to replace deprecated or removed functionality
 can be found within the description of each change.

 What follows are all changes to the interface and behaviour of GPGME
 in detail.

 * If gpgme.h is included in sources compiled by GCC 3.1 or later,
   deprecated attributes will warn about use of obsolete functions and
   type definitions.  You can suppress these warnings by passing
   -Wno-deprecated-declarations to the gcc command.

 * The following types have been renamed.  The old types are still
   available as aliases, but they are deprecated now:
   Old name:		New name:
   GpgmeCtx		gpgme_ctx_t
   GpgmeData		gpgme_data_t
   GpgmeError		gpgme_error_t
   GpgmeDataEncoding	gpgme_data_encoding_t
   GpgmeSigStat		gpgme_sig_stat_t
   GpgmeSigMode		gpgme_sig_mode_t
   GpgmeAttr		gpgme_attr_t
   GpgmeValidity	gpgme_validity_t
   GpgmeProtocol	gpgme_protocol_t
   GpgmeKey		gpgme_key_t
   GpgmePassphraseCb	gpgme_passphrase_cb_t
   GpgmeProgressCb	gpgme_progress_cb_t
   GpgmeIOCb		gpgme_io_cb_t
   GpgmeRegisterIOCb	gpgme_register_io_cb_t
   GpgmeRemoveIOCb	gpgme_remove_io_cb_t
   GpgmeEventIO		gpgme_event_io_t
   GpgmeEventIOCb	gpgme_event_io_cb_t
   GpgmeIOCbs		gpgme_io_cbs
   GpgmeDataReadCb	gpgme_data_read_cb_t
   GpgmeDataWriteCb	gpgme_data_write_cb_t
   GpgmeDataSeekCb	gpgme_data_seek_cb_t
   GpgmeDataReleaseCb	gpgme_data_release_cb_t
   GpgmeDataCbs		gpgme_data_cbs_t
   GpgmeTrustItem	gpgme_trust_item_t
   GpgmeStatusCode	gpgme_status_code_t

 * gpgme_error_t is now identical to gpg_error_t, the error type
   provided by libgpg-error.  More about using libgpg-error with GPGME
   can be found in the manual.  All error symbols have been removed!

 * All functions and types in libgpg-error have been wrapped in GPGME.
   The new types are gpgme_err_code_t and gpgme_err_source_t.  The new
   functions are gpgme_err_code, gpgme_err_source, gpgme_error,
   gpgme_err_make, gpgme_error_from_errno, gpgme_err_make_from_errno,
   gpgme_err_code_from_errno, gpgme_err_code_to_errno,
   gpgme_strsource.

 * GPGME_ATTR_IS_SECRET is not anymore representable as a string.

 * GnuPG 1.2.2 is required.  The progress callback is now also invoked
   for encrypt, sign, encrypt-sign, decrypt, verify, and
   decrypt-verify operations.  For verify operations on detached
   signatures, the progress callback is invoked for both the detached
   signature and the plaintext message, though.

 * gpgme_passphrase_cb_t has been changed to not provide a complete
   description, but the UID hint, passphrase info and a flag
   indicating if this is a repeated attempt individually, so the user
   can compose his own description from this information.

   The passphrase is not returned as a C string, but must be written
   to a file descriptor directly.  This allows for secure passphrase
   entries.

   The return type has been changed to gpgme_error_t value.  This
   allowed to remove the gpgme_cancel function; just return
   the error code GPG_ERR_CANCELED in the passphrase callback directly.

 * gpgme_edit_cb_t has been changed to take a file descriptor argument.
   The user is expected to write the response to the file descriptor,
   followed by a newline.

 * The recipients interface has been removed.  Instead, you use
   NULL-terminated lists of keys for specifying the recipients of an
   encryption operation.  Use the new encryption flag
   GPGME_ENCRYPT_ALWAYS_TRUST if you want to override the validity of
   the keys (but note that in general this is not a good idea).

   This change has been made to the prototypes of gpgme_op_encrypt,
   gpgme_op_encrypt_start, gpgme_op_encrypt_sign and
   gpgme_op_encrypt_sign_start.

   The export interface has been changed to use pattern strings like
   the keylist interface.  Thus, new functions gpgme_op_export_ext and
   gpgme_op_export_ext_start have been added as well.  Now the
   prototypes of gpgme_op_export_start and gpgme_op_export finally
   make sense.

 * gpgme_op_verify and gpgme_op_decrypt_verify don't return a status
   summary anymore.  Use gpgme_get_sig_status to retrieve the individual
   stati.

 * gpgme_io_cb_t changed from a void function to a function returning
   a gpgme_error_t value.  However, it will always return 0, so you
   can safely ignore the return value.

 * A new I/O callback event GPGME_EVENT_START has been added.  The new
   requirement is that you must wait until this event until you are
   allowed to call the I/O callback handlers previously registered for
   this context operation.  Calling I/O callback functions for this
   context operation before the start event happened is unsafe because
   it can lead to race conditions in a multi-threaded environment.

 * The idle function feature has been removed.  It was not precisely
   defined in a multi-threaded environment and is obsoleted by the
   user I/O callback functions.  If you still need a simple way to
   call something while waiting on one or multiple asynchronous
   operations to complete, don't set the HANG flag in gpgme_wait (note
   that this will return to your program more often than the idle
   function did).

 * gpgme_wait can return NULL even if hang is true, if an error
   occurs.  In that case *status contains the error code.

 * gpgme_get_engine_info was radically changed.  Instead an XML
   string, an info structure of the new type gpgme_engine_info_t is
   returned.  This makes it easier and more robust to evaluate the
   information in an application.

 * The new function gpgme_get_protocol_name can be used to convert a
   gpgme_protocol_t value into a string.

 * The status of a context operation is not checked anymore.  Starting
   a new operation will silently cancel the previous one.  Calling a
   function that requires you to have started an operation before without
   doing so is undefined.

 * The FPR argument to gpgme_op_genkey was removed.  Instead, use the
   gpgme_op_genkey_result function to retrieve a gpgme_genkey_result_t
   pointer to a structure which contains the fingerprint.  This also
   works with gpgme_op_genkey_start.  The structure also provides
   other information about the generated keys.

   So, instead:

   char *fpr;
   err = gpgme_op_genkey (ctx, NULL, NULL, &fpr); 
   if (!err && fpr)
     printf ("%s\n", fpr);

   you should now do:

   gpgme_genkey_result_t result;
   err = gpgme_op_genkey (ctx, NULL, NULL);
   if (!err)
     {
       result = gpgme_op_genkey_result (ctx);
       if (result->fpr)
         printf ("%s\n", result->fpr);
     }

 * The new gpgme_op_import_result function provides detailed
   information about the result of an import operation in
   gpgme_import_result_t and gpgme_import_status_t objects.
   Thus, the gpgme_op_import_ext variant is deprecated.

 * The new gpgme_op_sign_result function provides detailed information
   about the result of a signing operation in gpgme_sign_result_t,
   gpgme_invalid_key_t and gpgme_new_signature_t objects.

 * The new gpgme_op_encrypt_result function provides detailed
   information about the result of an encryption operation in
   a GpgmeEncryptResult object.

 * The new gpgme_op_decrypt_result function provides detailed
   information about the result of a decryption operation in
   a GpgmeDecryptResult object.

 * The new gpgme_op_verify_result function provides detailed
   information about the result of an verify operation in
   a GpgmeVerifyResult object.  Because of this, the GPGME_SIG_STAT_*
   values, gpgme_get_sig_status, gpgme_get_sig_ulong_attr,
   gpgme_get_sig_string_attr and gpgme_get_sig_key are now deprecated,
   and gpgme_get_notation is removed.

 * GpgmeTrustItem objects have now directly accessible data, so the
   gpgme_trust_item_get_string_attr and gpgme_trust_item_get_ulong_attr
   accessor functions are deprecated.  Also, reference counting is
   available through gpgme_trust_item_ref and gpgme_trust_item_unref
   (the gpgme_trust_item_release alias for the latter is deprecated).

 * Keys are not cached internally anymore, so the force_update argument
   to gpgme_get_key has been removed.

 * GpgmeKey objects have now directly accessible data so the
   gpgme_key_get_string_attr, gpgme_key_get_ulong_attr,
   gpgme_key_sig_get_string_attr and gpgme_key_sig_get_ulong_attr
   functions are deprecated.  Also, gpgme_key_release is now
   deprecated.  The gpgme_key_get_as_xml function has been dropped.

 * Because all interfaces using attributes are deprecated, the
   GpgmeAttr data type is also deprecated.

 * The new gpgme_op_keylist_result function provides detailed
   information about the result of a key listing operation in
   a GpgmeKeyListResult object.

 * Now that each function comes with its own result retrieval
   interface, the generic gpgme_get_op_info interface is not useful
   anymore and dropped.

 * The type and mode of data objects is not available anymore.

 * Interface changes relative to the 0.4.0 release:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
GpgmeCtx			DEPRECATED: Use gpgme_ctx_t.
GpgmeData			DEPRECATED: Use gpgme_data_t.
GpgmeError			DEPRECATED: Use gpgme_error_t.
GpgmeDataEncoding		DEPRECATED: Use gpgme_data_encoding_t.
GpgmeSigStat			DEPRECATED: Use gpgme_sig_stat_t.
GpgmeSigMode			DEPRECATED: Use gpgme_sig_mode_t.
GpgmeAttr			DEPRECATED: Use gpgme_attr_t.
GpgmeValidity			DEPRECATED: Use gpgme_validity_t.
GpgmeProtocol			DEPRECATED: Use gpgme_protocol_t.
GpgmeKey			DEPRECATED: Use gpgme_key_t.
GpgmePassphraseCb		DEPRECATED: Use gpgme_passphrase_cb_t.
GpgmeProgressCb			DEPRECATED: Use gpgme_progress_cb_t.
GpgmeIOCb			DEPRECATED: Use gpgme_io_cb_t.
GpgmeRegisterIOCb		DEPRECATED: Use gpgme_register_io_cb_t.
GpgmeRemoveIOCb			DEPRECATED: Use gpgme_remove_io_cb_t.
GpgmeEventIO			DEPRECATED: Use gpgme_event_io_t.
GpgmeEventIOCb			DEPRECATED: Use gpgme_event_io_cb_t.
GpgmeIOCbs			DEPRECATED: Use gpgme_io_cbs.
GpgmeDataReadCb			DEPRECATED: Use gpgme_data_read_cb_t.
GpgmeDataWriteCb		DEPRECATED: Use gpgme_data_write_cb_t.
GpgmeDataSeekCb			DEPRECATED: Use gpgme_data_seek_cb_t.
GpgmeDataReleaseCb		DEPRECATED: Use gpgme_data_release_cb_t.
GpgmeDataCbs			DEPRECATED: Use gpgme_data_cbs_t.
GpgmeTrustItem			DEPRECATED: Use gpgme_trust_item_t.
GpgmeStatusCode			DEPRECATED: Use gpgme_status_code_t.
gpgme_ctx_t			NEW
gpgme_data_t			NEW
gpgme_recipients_t		NEW
gpgme_error_t			NEW
gpgme_data_encoding_t		NEW
gpgme_sig_stat_t		NEW
gpgme_sig_mode_t		NEW
gpgme_attr_t			NEW
gpgme_validity_t		NEW
gpgme_protocol_t		NEW
gpgme_key_t			NEW
gpgme_passphrase_cb_t		NEW
gpgme_progress_cb_t		NEW
gpgme_io_cb_t			NEW
gpgme_register_io_cb_t		NEW
gpgme_remove_io_cb_t		NEW
gpgme_event_io_t		NEW
gpgme_event_io_cb_t		NEW
gpgme_io_cbs			NEW
gpgme_data_read_cb_t		NEW
gpgme_data_write_cb_t		NEW
gpgme_data_seek_cb_t		NEW
gpgme_data_release_cb_t		NEW
gpgme_data_cbs_t		NEW
gpgme_trust_item_t		NEW
gpgme_status_code_t		NEW
GPGME_{some error code}		REMOVED! Use GPG_ERR_* from libgpg-error.
gpgme_err_code_t		NEW
gpgme_err_source_t		NEW
gpgme_err_code			NEW
gpgme_err_source		NEW
gpgme_error			NEW
gpgme_err_make			NEW
gpgme_error_from_errno		NEW
gpgme_err_make_from_errno	NEW
gpgme_err_code_from_errno	NEW
gpgme_err_code_to_errno		NEW
gpgme_strsource			NEW
gpgme_io_cb_t			CHANGED: Return type from void to GpgmeError.
gpgme_event_io_t		CHANGED: New event type (all numbers changed).
gpgme_passphrase_cb_t		CHANGED: Desc decomposed, write directly to FD.
gpgme_edit_cb_t			CHANGED: Write directly to FD.
gpgme_key_get_string_attr	CHANGED: Don't handle GPGME_ATTR_IS_SECRET.
gpgme_op_verify			CHANGED: Drop R_STAT argument.
gpgme_op_decrypt_verify		CHANGED: Drop R_STAT argument.
gpgme_wait			CHANGED: Can return NULL even if hang is true.
GpgmeIdleFunc                   REMOVED
gpgme_register_idle             REMOVED
GpgmeRecipients			REMOVED
gpgme_recipients_new		REMOVED
gpgme_recipients_release	REMOVED
gpgme_recipients_add_name	REMOVED
gpgme_recipients_add_name_with_validity	REMOVED
gpgme_recipients_count		REMOVED
gpgme_recipients_enum_open	REMOVED
gpgme_recipients_enum_read	REMOVED
gpgme_recipients_enum_close	REMOVED
gpgme_encrypt_flags_t		NEW
GPGME_ENCRYPT_ALWAYS_TRUST	NEW
gpgme_op_encrypt		CHANGED: Recipients passed as gpgme_key_t[].
gpgme_op_encrypt_start		CHANGED: Recipients passed as gpgme_key_t[].
gpgme_op_encrypt_sign		CHANGED: Recipients passed as gpgme_key_t[].
gpgme_op_encrypt_sign_start	CHANGED: Recipients passed as gpgme_key_t[].
gpgme_op_export_start		CHANGED: User IDs passed as patterns.
gpgme_op_export			CHANGED: User IDs passed as patterns.
gpgme_op_export_ext_start	NEW
gpgme_op_export_ext		NEW
gpgme_keylist_mode_t		NEW
gpgme_sigsum_t			NEW
gpgme_engine_info_t		NEW
gpgme_get_engine_info		CHANGED: Return info structure instead XML.
gpgme_get_protocol_name		NEW
gpgme_cancel			REMOVED: Return error in callback directly.
gpgme_op_genkey			CHANGED: FPR argument dropped.
gpgme_op_genkey_result		NEW
gpgme_genkey_result_t		NEW
gpgme_op_import_ext		DEPRECATED: Use gpgme_op_import_result.
gpgme_op_import_result		NEW
gpgme_import_status_t		NEW
gpgme_import_result_t		NEW
gpgme_pubkey_algo_t		NEW
gpgme_hash_algo_t		NEW
gpgme_invalid_key_t		NEW
gpgme_new_signature_t		NEW
gpgme_sign_result_t		NEW
gpgme_op_sign_result		NEW
gpgme_pubkey_algo_name		NEW
gpgme_hash_algo_name		NEW
gpgme_encrypt_result_t		NEW
gpgme_op_encrypt_result		NEW
gpgme_decrypt_result_t		NEW
gpgme_op_decrypt_result		NEW
gpgme_verify_result_t		NEW
gpgme_op_verify_result		NEW
gpgme_get_notation		REMOVED: Access verify result directly instead.
gpgme_get_sig_key		DEPRECATED: Use gpgme_get_key with fingerprint.
gpgme_get_sig_ulong_attr	DEPRECATED: Use verify result directly.
gpgme_get_sig_string_attr	DEPRECATED: Use verify result directly.
GPGME_SIG_STAT_*		DEPRECATED: Use error value in sig status.
gpgme_get_sig_status		DEPRECATED: Use verify result directly.
gpgme_trust_item_t		CHANGED: Now has user accessible data members.
gpgme_trust_item_ref		NEW
gpgme_trust_item_unref		NEW
gpgme_trust_item_release	DEPRECATED: Use gpgme_trust_item_unref.
gpgme_trust_item_get_string_attr DEPRECATED
gpgme_trust_item_get_ulong_attr	DEPRECATED
gpgme_get_key			CHANGED: Removed force_update argument.
gpgme_sub_key_t			NEW
gpgme_key_sig_t			NEW
gpgme_user_id_t			NEW
gpgme_key_t			CHANGED: Now has user accessible data members.
gpgme_key_get_string_attr	DEPRECATED
gpgme_key_get_ulong_attr	DEPRECATED
gpgme_key_sig_get_string_attr	DEPRECATED
gpgme_key_sig_get_ulong_attr	DEPRECATED
gpgme_key_get_as_xml		REMOVED
gpgme_key_list_result_t		NEW
gpgme_op_keylist_result		NEW
gpgme_get_op_info		REMOVED
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Marcus Brinkmann
mb@g10code.de