Page Menu
Home
GnuPG
Search
Configure Global Search
Log In
Files
F18826545
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Size
114 KB
Subscribers
None
View Options
diff --git a/NEWS b/NEWS
index 6d7a2d0b..057543cb 100644
--- a/NEWS
+++ b/NEWS
@@ -1,1127 +1,1138 @@
+Noteworthy changes in version 1.x.y (unreleased)
+------------------------------------------------
+
+ * bla bla bla ...
+
+ * Interface changes relative to the 1.0.3 release:
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+something changed
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
Noteworthy changes in version 1.1.0 (2005-10-01)
------------------------------------------------
* You can now configure the backend engine file name and home
directory to be used, as default and per context.
* Information about the recipients of an encrypted text is now
available at decryption time.
* New status GPGME_STATUS_PLAINTEXT. This is analyzed by the decrypt
and verify handlers, the information about the plaintext filename,
if available is made available in the new field file_name of the
respective result structure.
* The code for "automagically detecting the thread library" has been
removed from libgpgme. It is deprecated since version 0.4.3.
Since then, you had to link against libgpgme-pthread for
applications using pthread and libgpgme-pth for applications using
GNU Pth.
The code was removed because it caused compilation problems on
systems where the pthread.h header from GNU Pth is available in
addition to the system header (FreeBSD 6 and later for example).
* "./autogen.sh --build-w32" does now build gpgme.dll.
* [W32] The environment variable GPGME_DEBUG now uses a semicolon as
delimiter. The standard install directory is used when locating
gpg or gpgsm before finally falling back to the hardwired name.
* There is a new flag for keys and subkeys, is_qualified, which
indicates if a key can be used for qualified signatures according
to local government regulations.
* You can associate a filename with a data object using the new
function gpgme_data_set_file_name(). This filename will be stored
in the output when encrypting or signing the data and will be
returned when decrypting or verifying the output data.
* You can now set notation data at signature creation with the new
function gpgme_sig_notation_add().
* Interface changes relative to the 1.0.3 release:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gpgme_set_engine_info NEW
gpgme_ctx_get_engine_info NEW
gpgme_ctx_set_engine_info NEW
gpgme_recipient_t NEW
gpgme_decrypt_result_t EXTENDED: New field recipients.
gpgme_verify_result_t EXTENDED: New fields pubkey_algo, hash_algo.
gpgme_decrypt_result_t EXTENDED: New field plaintext_filename.
gpgme_verify_result_t EXTENDED: New field plaintext_filename.
GPGME_STATUS_PLAINTEXT NEW
gpgme_key_t EXTENDED: New field is_qualified.
gpgme_subkey_t EXTENDED: New field is_qualified.
gpgme_data_get_file_name NEW
gpgme_data_set_file_name NEW
gpgme_sig_notation_flags_t NEW
GPGME_SIG_NOTATION_HUMAN_READABLE NEW
GPGME_SIG_NOTATAION_CRITICAL NEW
gpgme_sig_notation_clear NEW
gpgme_sig_notation_add NEW
gpgme_sig_notation_get NEW
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Noteworthy changes in version 1.0.3 (2005-06-20)
------------------------------------------------
* Previousy, GPGME would use a default "include certs" of 1. This
has been changed. Now GPGME will use the crypto backend engines
default unless you set the value with gpgme_set_include_certs()
explicitely. A new macro GPGME_INCLUDE_CERTS_DEFAULT can be used
as a value to explicitely request the new default behaviour.
Because the default changes, this is a slight change of the API
semantics. We consider it to be a bug fix.
* A bug which made GPGME hang has been fixed. If you have
experienced hanging before, please try out this version and let me
know if you still experience hanging problems.
* Interface changes relative to the 0.9.0 release:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gpgme_set_include_certs CHANGED DEFAULT
GPGME_INCLUDE_CERTS_DEFAULT NEW
GPGME_STATUS_SIG_SUBPACKET NEW
GPGME_STATUS_NEED_PASSPHRASE_PIN NEW
GPGME_STATUS_SC_OP_FAILURE NEW
GPGME_STATUS_SC_OP_SUCCESS NEW
GPGME_STATUS_CARDCTRL NEW
GPGME_STATUS_BACKUP_KEY_CREATED NEW
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Noteworthy changes in version 1.0.2 (2004-12-28)
------------------------------------------------
* Changed the license of the library to the GNU Lesser General Public
License (LGPL), version 2.1 or later.
Noteworthy changes in version 1.0.1 (2004-10-22)
------------------------------------------------
* Only bug fixes.
Noteworthy changes in version 1.0.0 (2004-09-30)
------------------------------------------------
* Version 1.0.0! We are proud to present you with a thoroughly
tested and stable version of the GPGME library. A big Thank You!
to all the people who made this possible.
The development will be branched into a stable 1.x.y series and the
head.
* The gpgme.m4 macro supports checking the API version. Just prepend
it to the required version string, separated by a colon. For
example, this release has the version "1:1.0.0". The last release
to which this version is (mostly) ABI compatible is "1:0.4.2",
which is the default required version.
Noteworthy changes in version 0.9.0 (2004-06-08)
------------------------------------------------
* The type gpgme_key_t has now a new field keylist_mode that contains
the keylist mode that was active at the time the key was retrieved.
* The type gpgme_decrypt_result_t has a new field "wrong_key_usage"
that contains a flag indicating that the key should not have been
used for encryption.
* Verifying a signature of a revoked key gives the correct result now
(GPG_ERR_CERT_REVOKED error code).
* Clarified that the error code GPG_ERR_NO_DATA from the decrypt &
verify operations still allows you to look at the signature
verification result.
* Clarified that patterns in keylisting operations have an upper
limit, and thus are not suited to list many keys at once by their
fingerprint. Also improve the error message if the pattern is too
long for the CMS protocol to handle.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gpgme_key_t EXTENDED: New field keylist_mode.
gpgme_decrypt_result_t EXTENDED: New field wrong_key_usage.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Noteworthy changes in version 0.4.7 (2004-04-29)
------------------------------------------------
* Correctly initialize the fields expired, revoked, invalid, and
disabled in the gpgme_key_t structures.
* A bug fix: The flag wrong_key_usage of gpgme_signature_t was
accidently of type int instead unsigned int.
* Interface changes relative to the 0.4.5 release:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gpgme_signature_t CHANGED: wrong_key_usage is unsigned int now.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Noteworthy changes in version 0.4.6 (2004-04-06)
------------------------------------------------
* Bug fixes
Noteworthy changes in version 0.4.5 (2004-03-07)
------------------------------------------------
* GPGME is now compiled with LFS (large file support) by default.
This means that _all_ programs using GPGME must be compiled with
LFS support enabled by default. You can do this easily with
autoconf, by using the AC_SYS_LARGEFILE macro. Or you can do this
without autoconf by defining the preprocessor symbol
_FILE_OFFSET_BITS to 64 (by passing the -D_FILE_OFFSET_BITS=64 to
the C compiler command line, or by defining this preprocessor
symbol before including any system header files). For more
details, read the section on LFS in the manual.
Up to now, it was undocumented that GPGME was not using LFS.
But the public interfaces use off_t, and file descriptors are
exchanged between the application and GPGME. This was an oversight,
and bound to cause troubles in the future.
Writing GPGME as a dual mode library that seamlessly supports LFS
while keeping backwards compatibility is possible, but does not
solve the problem: Many applications already expect GPGME to have
LFS (they are compiled with off_t being a 64bit value). This is true
in particular for the popular Gtk+ and Qt programs.
So, although this is an ABI (but not an API) break, we will not
change the library version to reflect that. Because the interfaces
affected are probably not used yet in any GPGME 0.4 based
application, we don't expect any real failures from this change.
In fact, applications already using LFS will have some subtle bugs
fixed.
However, if you encounter an application using GPGME 0.4.x that
does _not_ use LFS by default (off_t is a 32bit value), _and_
uses at least one of the functions gpgme_data_seek,
gpgme_data_new_from_filepart, or a gpgme_data_seek_cb_t with
gpgme_data_new_from_cbs, then indeed this library will be ABI
incompatible with the program. As said above, we don't believe
such a program exists. If we are in error, then you have two
options: As a quick hack, you can configure GPGME with the
--disable-largefile option. This will revert the change, and GPGME
will not use LFS. However, GPGME will be incompatible with
programs that expect GPGME to use LFS. All applications are
required to use LFS when using GPGME, so this is only good as a
temporary local work-around.
The other option is to change the versioning of the library and
recompile all applications. We have reserved a special version of
the library for that, so you can do that without expecting a
version clash in the future. Furthermore, everyone who does this
will agree on the version to use (this is important for
distribution makers). Read the comment in configure.ac (before
LIBGPGME_LT_AGE) if you want to do this. Please don't do this
blindly: As stated above, we think it is unlikely this measure is
needed. Still, it is there if necessary. If in doubt, contact us
and we will give our advise for your specific situation.
* New key listing mode GPGME_KEYLIST_MODE_VALIDATE for validation of
the listed keys.
* New interface gpgme_cancel() that can be used to cancel
asynchronous operations.
* Interface changes relative to the 0.4.4 release:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gpgme_data_seek_cb_t CHANGED: off_t is now a largefile type.
gpgme_data_seek CHANGED: off_t is now a largefile type.
gpgme_data_new_from_filepart CHANGED: off_t is now a largefile type.
GPGME_KEYLIST_MODE_VALIDATE NEW
gpgme_cancel NEW
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Noteworthy changes in version 0.4.4 (2004-01-12)
------------------------------------------------
* The member "class" in gpgme_key_sig_t and gpgme_new_signature_t has
been renamed to "sig_class", to avoid clash with C++ compilers. In
the C API, the old name "class" has been preserved for backwards
compatibility, but is deprecated.
* Interface changes relative to the 0.4.3 release:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gpgme_key_sig_t CHANGED: class deprecated, use new sig_class.
gpgme_new_signature_t CHANGED: class deprecated, use new sig_class.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Noteworthy changes in version 0.4.3 (2003-10-06)
------------------------------------------------
* libgpgme should not be used for threaded programs anymore. This
never worked reliably in all cases, because you had to
be careful about the linking order and libtool wouldn't do that for
you automatically. Instead, now you have to link against
libgpgme-pthread for applications using pthread and libgpgme-pth for
applications using GNU Pth.
The old code for automagically detecting the thread library is
still part of libgpgme, but it is DEPRECATED.
* There are new automake macros AM_PATH_GPGME_PTH and
AM_PATH_GPGME_PTHREAD, which support checking for thread-enabled
versions of GPGME. They define GPGME_PTH_CFLAGS, GPGME_PTH_LIBS,
GPGME_PTHREAD_CFLAGS and GPGME_PTHREAD_LIBS respectively. These
variables of course also include the configuration for the thread
package itself. Alternatively, use libtool.
* gpgme_strerror_r as a thread safe variant of gpgme_strerror was
added.
* gpgme-config doesn't support setting the prefix or exec prefix
anymore. I don't think it ever worked correctly, and it seems to
be pointless.
* gpgme_get_key fails with GPG_ERR_AMBIGUOUS_NAME if the key ID
provided was not unique, instead returning the first matching key.
* gpgme_key_t and gpgme_subkey_t have a new field, can_authenticate,
that indicates if the key can be used for authentication.
* gpgme_signature_t's status field is now correctly set to an error
with error code GPG_ERR_NO_PUBKEY if public key is not found.
* gpgme_new_signature_t's class field is now an unsigned int, rather
than an unsigned long (the old class field is preserved for
backwards compatibility).
* A new function gpgme_set_locale() is provided to allow configuring
the locale for the crypto backend. This is necessary for text
terminals so that programs like the pinentry can be started with
the right locale settings for the terminal the application is running
on, in case the terminal has different settings than the system
default (for example, if it is a remote terminal). You are highly
recommended to call the following functions directly after
gpgme_check_version:
#include <locale.h>
setlocale (LC_ALL, "");
gpgme_set_locale (NULL, LC_CTYPE, setlocale (LC_CTYPE, NULL));
gpgme_set_locale (NULL, LC_MESSAGES, setlocale (LC_MESSAGES, NULL));
GPGME can not do this for you, as setlocale is not thread safe, and
there is no alternative.
* The signal action for SIGPIPE is now set to SIG_IGN by
gpgme_check_version, instead the first time a crypto engine is
started (which is not well defined).
* In the output of gpgme_hash_algo_name, change RMD160 to RIPEMD160,
TIGER to TIGER192, CRC32-RFC1510 to CRC32RFC1510, and CRC24-RFC2440
to CRC24RFC2440. For now, these strings can be used as the MIC
parameter for PGP/MIME (if appropriately modified).
* Interface changes relative to the 0.4.2 release:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gpgme_strerror_t NEW
gpgme_get_key CHANGED: Fails correctly if key ID not unique.
gpgme_key_t EXTENDED: New field can_authenticate.
gpgme_subkey_t EXTENDED: New field can_authenticate.
gpgme_new_signature_t CHANGED: New type for class field.
gpgme_set_locale NEW
gpgme_hash_algo_name CHANGED: Slight adjustment of algo names.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Noteworthy changes in version 0.4.2 (2003-07-30)
------------------------------------------------
* Allow gpg-error to be in non-standard place when linking the test suite.
* Configure will fail now if gpg-error can not be found.
* Fixed initialized memory backed data objects for writing, which
caused the test program to crash (but only on Mac OS, surprisingly).
* Eliminate use of C99 constructs.
* Small improvements to the manual.
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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Noteworthy changes in version 0.4.0 (2002-12-23)
------------------------------------------------
* Key generation returns the fingerprint of the generated key.
* New convenience function gpgme_get_key.
* Supports signatures of user IDs in keys via the new
GPGME_KEYLIST_MODE_SIGS keylist mode and the
gpgme_key_sig_get_string_attr and gpgme_key_sig_get_ulong_attr
interfaces. The XML info about a key also includes the signatures
if available.
* New data object interface, which is more flexible and transparent.
* Interface changes relative to the 0.3.9 release:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
GpgmeDataReadCb NEW
GpgmeDataWriteCb NEW
GpgmeDataSeekCb NEW
GpgmeDataReleaseCb NEW
GpgmeDataCbs NEW
gpgme_data_read CHANGED: Match read() closely.
gpgme_data_write CHANGED: Match write() closely.
gpgme_data_seek NEW
gpgme_data_new_from_fd NEW
gpgme_data_new_from_stream NEW
gpgme_data_new_from_cbs NEW
gpgme_data_rewind DEPRECATED: Replaced by gpgme_data_seek().
gpgme_data_new_from_read_cb DEPRECATED: Replaced by gpgme_data_from_cbs().
gpgme_data_get_type REMOVED: No replacement.
gpgme_op_verify CHANGED: Take different data objects for
signed text and plain text.
gpgme_op_verify_start CHANGED: See gpgme_op_verify.
gpgme_check_engine REMOVED: Deprecated since 0.3.0.
gpgme_op_genkey CHANGED: New parameter FPR.
GPGME_KEYLIST_MODE_SIGS NEW
gpgme_key_sig_get_string_attr NEW
gpgme_key_sig_get_ulong_attr NEW
gpgme_get_key NEW
GPGME_ATTR_SIG_CLASS NEW
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Noteworthy changes in version 0.3.16 (2003-11-19)
-------------------------------------------------
* Compatibility fixes for GnuPG 1.9.x
Noteworthy changes in version 0.3.15 (2003-02-18)
-------------------------------------------------
* The progress status is sent via the progress callbacks in
gpgme_op_edit.
* Bug fix for signing operations with explicit signer settings for
the CMS protocol.
Noteworthy changes in version 0.3.14 (2002-12-04)
-------------------------------------------------
* GPGME-Plug is now in its own package "cryptplug".
* Workaround for a setlocale problem. Fixed a segv related to not
correctly as closed marked file descriptors.
Noteworthy changes in version 0.3.13 (2002-11-20)
-------------------------------------------------
* Release due to changes in gpgmeplug.
Noteworthy changes in version 0.3.12 (2002-10-15)
-------------------------------------------------
* Fixed some bux with key listings.
* The development has been branched to clean up some API issues.
This 0.3 series will be kept for compatibility reasons; so do don't
expect new features.
Noteworthy changes in version 0.3.11 (2002-09-20)
-------------------------------------------------
* Bug fixes.
Noteworthy changes in version 0.3.10 (2002-09-02)
-------------------------------------------------
* Setting the signing keys for the CMS protocol does now work.
* The signers setting is honoured by gpgme_op_edit.
Noteworthy changes in version 0.3.9 (2002-08-21)
------------------------------------------------
* A spec file for creating RPMs has been added.
* An experimental interface to GnuPG's --edit-key functionality is
introduced, see gpgme_op_edit.
* The new gpgme_import_ext function provides a convenient access to
the number of processed keys.
* Interface changes relative to the 0.3.8 release:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
GpgmeStatusCode NEW
GpgmeEditCb NEW
gpgme_op_edit_start NEW
gpgme_op_edit NEW
gpgme_op_import_ext NEW
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Noteworthy changes in version 0.3.8 (2002-06-25)
------------------------------------------------
* It is possible to use an outside event loop for the I/O to the
crypto engine by setting the I/O callbacks with gpgme_set_io_cbs.
* Interface changes relative to the 0.3.6 release:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
GpgmeIOCb NEW
GpgmeRegisterIOCb NEW
GpgmeRemoveIOCb NEW
GpgmeEventIO NEW
GpgmeEventIOCb NEW
struct GpgmeIOCbs NEW
gpgme_set_io_cbs NEW
gpgme_get_io_cbs NEW
GPGME_ATTR_ERRTOK NEW
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Noteworthy changes in version 0.3.7 (2002-06-04)
------------------------------------------------
* GPGME_ATTR_OTRUST is implemented now.
* A first step toward thread safeness has been achieved, see the
documentation for details. Supported thread libraries are pthread
and Pth.
Noteworthy changes in version 0.3.6 (2002-05-03)
------------------------------------------------
* All error output of the gpgsm backend is send to the bit bucket.
* The signature verification functions are extended. Instead of
always returning GPGME_SIG_STATUS_GOOD, the functions new codes for
expired signatures. 2 new functions may be used to retrieve more
detailed information like the signature expiration time and a
validity information of the key without an extra key looking.
* The current passphrase callback and progress meter callback can be
retrieved with the new functions gpgme_get_passphrase_cb and
gpgme_get_progress_cb respectively.
* Interface changes relative to the 0.3.5 release:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gpgme_get_passphrase_cb NEW
gpgme_get_progress_cb NEW
GpgmeDataEncoding NEW
gpgme_data_set_encoding NEW
gpgme_data_get_encoding NEW
GPGME_SIG_STAT_GOOD_EXP NEW
GPGME_SIG_STAT_GOOD_EXPKEY NEW
gpgme_op_verify CHANGED: Returns more status codes.
GPGME_ATTR_SIG_STATUS NEW
gpgme_get_sig_string_attr NEW
gpgme_get_sig_ulong_attr NEW
gpgme_get_protocol NEW
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Noteworthy changes in version 0.3.5 (2002-04-01)
------------------------------------------------
* gpgme_op_encrypt can be called with RECIPIENTS being 0. In this
case, symmetric encryption is performed. Note that this requires a
passphrase from the user.
* More information is returned for X.509 certificates.
* Interface changes relative to the 0.3.4 release:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gpgme_op_encrypt EXTENDED: Symmetric encryption possible
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Noteworthy changes in version 0.3.4 (2002-03-04)
------------------------------------------------
* gpgme_op_encrypt does now fail with GPGME_Invalid_Recipients if
some recipients have been invalid, whereas earlier versions
succeeded in this case. The plaintext is still encrypted for all valid
recipients, so the application might take this error as a hint that
the ciphertext is not usable for all requested recipients.
Information about invalid recipients is available with gpgme_get_op_info.
* gpgme_op_verify now allows to pass an uninitialized data object as
its plaintext argument to check for normal and cleartext
signatures. The plaintext is then returned in the data object.
* New interfaces gpgme_set_include_certs and gpgme_get_include_certs
to set and get the number of certifications to include in S/MIME
signed messages.
* New interfaces gpgme_op_encrypt_sign and gpgme_op_encrypt_sign_start
to encrypt and sign a message in a combined operation.
* New interface gpgme_op_keylist_ext_start to search for multiple patterns.
* gpgme_key_get_ulong_attr supports the GPGME_ATTR_EXPIRE attribute.
* Interface changes relative to the 0.3.3 release:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gpgme_op_encrypt CHANGED: Can fail with GPGME_Invalid_Recipients
gpgme_op_verify EXTENDED: Accepts uninitialized text argument
gpgme_key_get_ulong_attr EXTENDED: Supports GPGME_ATTR_EXPIRE
gpgme_set_include_certs NEW
gpgme_get_include_certs NEW
gpgme_op_encrypt_sign NEW
gpgme_op_encrypt_sign_start NEW
gpgme_op_keylist_ext_start NEW
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Noteworthy changes in version 0.3.3 (2002-02-12)
------------------------------------------------
* Fix the Makefile in jnlib.
* Fix the test suite (hopefully). It should clean up all its state
with `make check' now.
Noteworthy changes in version 0.3.2 (2002-02-10)
------------------------------------------------
* Remove erroneous dependency on libgcrypt in jnlib.
Noteworthy changes in version 0.3.1 (2002-02-09)
------------------------------------------------
* There is a Texinfo manual documenting the API.
* The gpgme_set_keylist_mode function returns an error, and changed
its meaning. It is no longer usable to select between normal and
fast mode (newer versions of GnuPG will always be fast), but
selects between local keyring, remote keyserver, or both.
For this, two new macros are defined, GPGME_KEYLIST_MODE_LOCAL
and GPGME_KEYLIST_MODE_EXTERN. To make it possible to modify the
current setting, a fucntion gpgme_get_keylist_mode was added to
retrieve the current mode.
* gpgme_wait accepts a new argument STATUS to return the error status
of the operation on the context. Its definition is closer to
waitpid() now than before.
* The LENGTH argument to gpgme_data_new_from_filepart changed its
type from off_t to the unsigned size_t.
* The R_HD argument to the GpgmePassphraseCb type changed its type
from void* to void**.
* New interface gpgme_op_trustlist_end() to match
gpgme_op_keylist_end().
* The CryptPlug modules have been renamed to gpgme-openpgp and
gpgme-smime, and they are installed in pkglibdir by `make install'.
* An idle function can be registered with gpgme_register_idle().
* The GpgSM backend supports key generation with gpgme_op_genkey().
* Interface changes relative to the 0.3.0 release:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gpgme_data_new_from_filepart CHANGED: Type of LENGTH is size_t.
GpgmePassphraseCb CHANGED: Type of R_HD is void **.
gpgme_wait CHANGED: New argument STATUS.
gpgme_set_keylist_mode CHANGED: Type of return value is GpgmeError.
The function has a new meaning!
gpgme_get_keylist_mode NEW
GPGME_KEYLIST_MODE_LOCAL NEW
GPGME_KEYLIST_MODE_EXTERN NEW
gpgme_op_trustlist_next NEW
GpgmeIdleFunc NEW
gpgme_register_idle NEW
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Noteworthy changes in version 0.3.0 (2001-12-19)
------------------------------------------------
* New interface gpgme_set_protocol() to set the protocol and thus the
crypto engine to be used by the context. Currently, the OpenPGP
and the CMS protocols are supported. They are specified by the new
preprocessor symbols GPGME_PROTOCOL_OpenPGP and GPGME_PROTOCOL_CMS.
A new context uses the OpenPGP engine by default.
* gpgme_get_engine_info() returns information for all crypto engines
compiled into the library. The XML format has changed. To
reliably get the version of a crypto engine, the <version> tag
after the appropriate <protocol> tag has to be looked for.
* New interface gpgme_engine_check_version(), obsoleting
gpgme_check_engine(). Check the version of all engines you are
supporting in your software.
* GpgmeKey lists the user ids in the order as they are returned by
GnuPG, first the primary key with index 0, then the sub-user ids.
* New operation gpgme_op_decrypt_verify() to decrypt and verify
signatures simultaneously.
* The new interface gpgme_op_keylist_end() terminates a pending
keylist operation. A keylist operation is also terminated when
gpgme_op_keylist_next() returns GPGME_EOF.
* GPGME can be compiled without GnuPG being installed (`--with-gpg=PATH'),
cross-compiled, or even compiled without support for GnuPG
(`--without-gpg').
* GPGME can be compiled with support for GpgSM (GnuPG for S/MIME,
`--with-gpgsm=PATH'). It is enabled by default if the `gpgsm' is found
in the path, but it can also be compiled without support for GpgSM
(`--without-gpgsm').
* CryptPlug modules for GPGME are included and can be enabled at
configure time (`--enable-gpgmeplug'). There is one module which
uses the GnuPG engine (`gpgmeplug') and one module which uses the
GpgSM engine (`gpgsmplug').
* Interface changes relative to the latest 0.2.x release:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gpgme_key_get_as_xml CHANGED: Sub-user ids reversed in order.
gpgme_key_get_string_attr CHANGED: User ids reversed in order.
gpgme_key_get_ulong_attr CHANGED: User ids reversed in order.
gpgme_get_engine_info CHANGED: New format, extended content.
gpgme_engine_check_version NEW
gpgme_decrypt_verify_start NEW
gpgme_decrypt_verify NEW
gpgme_op_keylist_next NEW
gpgme_set_protocol NEW
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Noteworthy changes in version 0.2.3 (2001-09-17)
------------------------------------------------
* New function gpgme_get_op_info which can be used to get the micalg
parameter needed for MOSS.
* New functions gpgme_get_armor and gpgme_get_textmode.
* The usual bug fixes and some minor functionality improvements.
* Added a simple encryption component for MS-Windows; however the
build procedure might have some problems.
Noteworthy changes in version 0.2.2 (2001-06-12)
------------------------------------------------
* Implemented a key cache.
* Fixed a race condition under W32 and some other bug fixes.
Noteworthy changes in version 0.2.1 (2001-04-02)
------------------------------------------------
* Changed debug output and GPGME_DEBUG variable (gpgme/debug.c)
* Handle GnuPG's new key capabilities output and support revocation
et al. attributes
* Made the W32 support more robust.
Copyright 2001, 2002, 2003, 2004, 2005 g10 Code GmbH
This file is free software; as a special exception the author gives
unlimited permission to copy and/or distribute it, with or without
modifications, as long as this notice is preserved.
This file is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/configure.ac b/configure.ac
index 547ff457..9288b260 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,517 +1,517 @@
# configure.ac for GPGME
# Copyright (C) 2000 Werner Koch (dd9jn)
# Copyright (C) 2001, 2002, 2003, 2004, 2005 g10 Code GmbH
#
# This file is part of GPGME.
#
# GPGME is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation; either version 2.1 of the
# License, or (at your option) any later version.
#
# GPGME is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
# Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
# (Process this file with autoconf to produce a configure script.)
AC_PREREQ(2.59)
min_automake_version="1.9.3"
# Version number: Remember to change it immediately *after* a release.
-AC_INIT(gpgme, 1.1.0, [bug-gpgme@gnupg.org])
+AC_INIT(gpgme, 1.2.0-cvs, [bug-gpgme@gnupg.org])
# LT Version numbers, remember to change them just *before* a release.
# (Code changed: REVISION++)
# (Interfaces added/removed/changed: CURRENT++, REVISION=0)
# (Interfaces added: AGE++)
# (Interfaces removed/changed: AGE=0)
#
LIBGPGME_LT_CURRENT=16
# Subtract 2 from this value if you want to make the LFS transition an
# ABI break. [Note to self: Remove this comment with the next regular break.]
LIBGPGME_LT_AGE=5
LIBGPGME_LT_REVISION=0
# If the API is changed in an incompatible way: increment the next counter.
GPGME_CONFIG_API_VERSION=1
NEED_GPG_VERSION=1.2.2
NEED_GPGSM_VERSION=1.9.6
##############################################
PACKAGE=$PACKAGE_NAME
VERSION=$PACKAGE_VERSION
AC_CONFIG_SRCDIR(gpgme/gpgme.h)
dnl FIXME: Enable this with autoconf 2.59.
dnl AC_CONFIG_MACRO_DIR(m4)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
AM_MAINTAINER_MODE
AC_CANONICAL_HOST
# Enable GNU extensions on systems that have them.
AC_GNU_SOURCE
AH_VERBATIM([_REENTRANT],
[/* To allow the use of GPGME in multithreaded programs we have to use
special features from the library.
IMPORTANT: gpgme is not yet fully reentrant and you should use it
only from one thread. */
#ifndef _REENTRANT
# define _REENTRANT 1
#endif])
AC_PROG_CC
AC_CHECK_TOOL(DLLTOOL, dlltool, :)
AC_CHECK_TOOL(WINDRES, windres, :)
AC_SUBST(LIBGPGME_LT_CURRENT)
AC_SUBST(LIBGPGME_LT_AGE)
AC_SUBST(LIBGPGME_LT_REVISION)
AC_DEFINE_UNQUOTED(NEED_GPG_VERSION, "$NEED_GPG_VERSION",
[Min. needed GnuPG version.])
AC_DEFINE_UNQUOTED(NEED_GPGSM_VERSION, "$NEED_GPGSM_VERSION",
[Min. needed GPGSM version.])
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of this package])
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version of this package])
# Don't default to build static libs.
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
# For now we hardcode the use of version scripts. It would be better
# to write a test for this or even implement this within libtool.
have_ld_version_script=no
case "${host}" in
*-*-linux*)
have_ld_version_script=yes
;;
*-*-gnu*)
have_ld_version_script=yes
;;
esac
AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
GPG_DEFAULT=no
GPGSM_DEFAULT=no
component_system=None
have_dosish_system=no
have_w32_system=no
case "${host}" in
*-mingw32*)
# special stuff for Windoze NT
have_dosish_system=yes
have_w32_system=yes
GPG_DEFAULT='c:\\gnupg\\gpg.exe'
# XXX Assuan is not supported in this configuration.
#GPGSM_DEFAULT='c:\\gnupg\\gpgsm.exe'
#component_system='COM+'
;;
*)
AC_CHECK_PTH(1.2.0,,,no,have_pth=yes)
if test "$have_pth" = yes; then
AC_DEFINE(HAVE_PTH, ,[Define if we have Pth.])
fi
AC_CHECK_LIB(pthread,pthread_create,have_pthread=yes)
if test "$have_pthread" = yes; then
AC_DEFINE(HAVE_PTHREAD, ,[Define if we have pthread.])
fi
# XXX: Probably use exec-prefix here?
# GPG_DEFAULT='/usr/bin/gpg'
# GPGSM_DEFAULT='/usr/bin/gpgsm'
;;
esac
if test "$have_dosish_system" = yes; then
AC_DEFINE(HAVE_DOSISH_SYSTEM,1,
[Defined if we run on some of the PCDOS like systems
(DOS, Windoze. OS/2) with special properties like
no file modes])
fi
AM_CONDITIONAL(HAVE_DOSISH_SYSTEM, test "$have_dosish_system" = yes)
if test "$have_w32_system" = yes; then
AC_DEFINE(HAVE_W32_SYSTEM,1, [Defined if we run on a W32 API based system])
fi
AM_CONDITIONAL(HAVE_W32_SYSTEM, test "$have_w32_system" = yes)
AM_CONDITIONAL(HAVE_PTH, test "$have_pth" = "yes")
AM_CONDITIONAL(HAVE_PTHREAD, test "$have_pthread" = "yes")
# Checks for header files.
AC_CHECK_HEADERS(sys/select.h)
# Type checks.
AC_CHECK_SIZEOF(unsigned int)
AC_SYS_LARGEFILE
AC_TYPE_OFF_T
# Checks for compiler features.
if test "$GCC" = yes; then
CFLAGS="$CFLAGS -Wall -Wcast-align -Wshadow -Wstrict-prototypes"
fi
# Checks for library functions.
AC_FUNC_FSEEKO
AC_CHECK_FUNCS(stpcpy)
AC_REPLACE_FUNCS(vasprintf)
if test "$ac_cv_func_vasprintf" != yes; then
GNUPG_CHECK_VA_COPY
fi
# Try to find a thread-safe version of ttyname().
AC_REPLACE_FUNCS(ttyname_r)
if test "$ac_cv_func_ttyname_r" != yes; then
AC_MSG_WARN([
***
*** ttyname() is not thread-safe and ttyname_r() does not exist
***])
fi
# Try to find a thread-safe version of getenv().
have_thread_safe_getenv=no
jm_GLIBC21
if test $GLIBC21 = yes; then
have_thread_safe_getenv=yes
fi
if test $have_thread_safe_getenv = yes; then
AC_DEFINE(HAVE_THREAD_SAFE_GETENV, [1], [Define if getenv() is thread-safe])
fi
have_getenv_r=no
AC_CHECK_FUNCS(getenv_r, have_getenv_r=yes)
if test $have_getenv_r = no && test $have_thread_safe_getenv = no; then
AC_MSG_WARN([
***
*** getenv() is not thread-safe and getenv_r() does not exist
***])
fi
# For converting time strings to seconds since Epoch, we need the timegm
# function.
AC_CHECK_FUNCS(timegm)
if test "$ac_cv_func_timegm" != yes; then
AC_MSG_WARN([
***
*** timegm() not available - a non-thread-safe kludge will be used
*** and the TZ variable might be changed at runtime.
***])
fi
# Checking for libgpg-error.
AM_PATH_GPG_ERROR(0.5,, AC_MSG_ERROR([libgpg-error was not found]))
AC_DEFINE(GPG_ERR_SOURCE_DEFAULT, GPG_ERR_SOURCE_GPGME,
[The default error source for GPGME.])
# Checks for system services
NO_OVERRIDE=no
AC_ARG_WITH(gpg,
AC_HELP_STRING([--with-gpg=PATH], [use GnuPG binary at PATH]),
GPG=$withval, NO_OVERRIDE=yes)
if test "$NO_OVERRIDE" = "yes" || test "$GPG" = "yes"; then
GPG=
NO_OVERRIDE=yes
if test "$cross_compiling" != "yes"; then
AC_PATH_PROG(GPG, gpg)
fi
if test -z "$GPG"; then
GPG="$GPG_DEFAULT"
fi
fi
if test "$GPG" = no; then
if test "$NO_OVERRIDE" = "yes"; then
if test "$cross_compiling" != "yes"; then
AC_MSG_WARN([
***
*** Could not find GnuPG, install GnuPG or use --with-gpg=PATH to enable it
***])
else
AC_MSG_ERROR([
***
*** Can not determine path to GnuPG when cross-compiling, use --with-gpg=PATH
***])
fi
fi
else
AC_DEFINE_UNQUOTED(GPG_PATH, "$GPG", [Path to the GnuPG binary.])
AC_SUBST(GPG)
fi
dnl Check for GnuPG version requirement.
GPG_VERSION=unknown
ok=maybe
if test -z "$GPG" -o "x$GPG" = "xno"; then
ok=no
else
if test "$cross_compiling" = "yes"; then
AC_MSG_WARN([GnuPG version can not be checked when cross compiling])
ok=no
else
if test ! -x "$GPG"; then
AC_MSG_WARN([GnuPG not executable, version check disabled])
ok=no
fi
fi
fi
if test "$ok" = "maybe"; then
AC_MSG_CHECKING(for GnuPG >= $NEED_GPG_VERSION)
req_major=`echo $NEED_GPG_VERSION | \
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
req_minor=`echo $NEED_GPG_VERSION | \
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
req_micro=`echo $NEED_GPG_VERSION | \
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
gpg_version=`$GPG --version | grep ^gpg`
major=`echo $gpg_version | \
sed 's/^gpg (GnuPG) \([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
minor=`echo $gpg_version | \
sed 's/^gpg (GnuPG) \([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
micro=`echo $gpg_version | \
sed 's/^gpg (GnuPG) \([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
GPG_VERSION=`echo $gpg_version | sed 's/^gpg (GnuPG) //'`
if test "$major" -gt "$req_major"; then
ok=yes
else
if test "$major" -eq "$req_major"; then
if test "$minor" -gt "$req_minor"; then
ok=yes
else
if test "$minor" -eq "$req_minor"; then
if test "$micro" -ge "$req_micro"; then
ok=yes
fi
fi
fi
fi
fi
if test "$ok" = "yes"; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
AC_MSG_WARN([GnuPG must be at least version $NEED_GPG_VERSION])
fi
fi
AM_CONDITIONAL(RUN_GPG_TESTS, test "$ok" = "yes")
AC_SUBST(GPG_PATH)
NO_OVERRIDE=no
AC_ARG_WITH(gpgsm,
AC_HELP_STRING([--with-gpgsm=PATH], [use GpgSM binary at PATH]),
GPGSM=$withval, NO_OVERRIDE=yes)
if test "$NO_OVERRIDE" = "yes" || test "$GPGSM" = "yes"; then
GPGSM=
NO_OVERRIDE=yes
if test "$cross_compiling" != "yes"; then
AC_PATH_PROG(GPGSM, gpgsm)
fi
if test -z "$GPGSM"; then
GPGSM="$GPGSM_DEFAULT"
fi
fi
if test "$GPGSM" = no; then
if test "$NO_OVERRIDE" = "yes"; then
if test "$cross_compiling" != "yes"; then
AC_MSG_WARN([
***
*** Could not find GpgSM, install GpgSM or use --with-gpgsm=PATH to enable it
***])
else
AC_MSG_ERROR([
***
*** Can not determine path to GpgSM when cross-compiling, use --with-gpgsm=PATH
***])
fi
fi
else
AC_DEFINE_UNQUOTED(GPGSM_PATH, "$GPGSM", [Path to the GPGSM binary.])
AC_DEFINE(ENABLE_GPGSM,1,[Whether GPGSM support is enabled])
fi
AM_CONDITIONAL(HAVE_GPGSM, test "$GPGSM" != "no")
dnl Check for GPGSM version requirement.
GPGSM_VERSION=unknown
ok=maybe
if test -z "$GPGSM" -o "x$GPGSM" = "xno"; then
ok=no
else
if test "$cross_compiling" = "yes"; then
AC_MSG_WARN([GPGSM version can not be checked when cross compiling])
ok=no
else
if test ! -x "$GPGSM"; then
AC_MSG_WARN([GPGSM not executable, version check disabled])
ok=no
fi
fi
fi
if test "$ok" = "maybe"; then
AC_MSG_CHECKING(for GPGSM >= $NEED_GPGSM_VERSION)
req_major=`echo $NEED_GPGSM_VERSION | \
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
req_minor=`echo $NEED_GPGSM_VERSION | \
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
req_micro=`echo $NEED_GPGSM_VERSION | \
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
gpgsm_version=`$GPGSM --version | grep ^gpgsm`
major=`echo $gpgsm_version | \
sed 's/^gpgsm (GnuPG) \([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
minor=`echo $gpgsm_version | \
sed 's/^gpgsm (GnuPG) \([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
micro=`echo $gpgsm_version | \
sed 's/^gpgsm (GnuPG) \([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
GPGSM_VERSION=`echo $gpgsm_version | sed 's/^gpgsm (GnuPG) //'`
if test "$major" -gt "$req_major"; then
ok=yes
else
if test "$major" -eq "$req_major"; then
if test "$minor" -gt "$req_minor"; then
ok=yes
else
if test "$minor" -eq "$req_minor"; then
if test "$micro" -ge "$req_micro"; then
ok=yes
fi
fi
fi
fi
fi
if test "$ok" = "yes"; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
AC_MSG_WARN([GPGSM must be at least version $NEED_GPGSM_VERSION])
fi
fi
AM_CONDITIONAL(RUN_GPGSM_TESTS, test "$ok" = "yes")
# FIXME: Only build if supported.
AM_CONDITIONAL(BUILD_ASSUAN, test "$GPGSM" != "no")
# The assuan code uses funopen but it will also build without it. So
# test for it. Frankly, this is not required in gpgme, but thats the
# way we handle it in libassuan.
AC_CHECK_FUNCS(funopen)
if test $ac_cv_func_funopen != yes; then
# No funopen but we can implement that in terms of fopencookie.
AC_CHECK_FUNCS(fopencookie)
if test $ac_cv_func_fopencookie = yes; then
AC_LIBOBJ([funopen])
else
AC_MSG_WARN([
***
*** No implementation of fopencookie or funopen available
***])
fi
fi
# More assuan replacement functions.
AC_REPLACE_FUNCS(isascii)
AC_REPLACE_FUNCS(putc_unlocked)
AC_REPLACE_FUNCS(memrchr)
# More assuan checks.
AC_CHECK_HEADERS([sys/uio.h])
# End of assuan checks.
AM_CONDITIONAL(BUILD_COMPLUS, test "$component_system" = "COM+")
# Make the version number in gpgme/gpgme.h the same as the one here.
# (this is easier than to have a *.in file just for one substitution)
GNUPG_FIX_HDR_VERSION(gpgme/gpgme.h, GPGME_VERSION)
# Generate values for the DLL version info
if test "$have_w32_system" = yes; then
BUILD_TIMESTAMP=`date --iso-8601=minutes`
changequote(,)dnl
BUILD_FILEVERSION=`echo "$VERSION" | sed 's/\([0-9.]*\).*/\1./;s/\./,/g'`
changequote([,])dnl
case "$VERSION" in
*-cvs) BUILD_FILEVERSION="${BUILD_FILEVERSION}0" ;;
*-rc*) BUILD_FILEVERSION="${BUILD_FILEVERSION}1" ;;
*) BUILD_FILEVERSION="${BUILD_FILEVERSION}2" ;;
esac
fi
AC_SUBST(BUILD_TIMESTAMP)
AC_SUBST(BUILD_FILEVERSION)
# Add a few constants to help porting to W32
AH_VERBATIM([SEPCONSTANTS],
[
/* Separators as used in file names and $PATH. Please note that the
string version must not contain more than one character because
the using code assumes strlen()==1 */
#ifdef HAVE_DOSISH_SYSTEM
#define DIRSEP_C '\\\\'
#define EXTSEP_C '.'
#define DIRSEP_S "\\\\"
#define EXTSEP_S "."
#define PATHSEP_C ';'
#define PATHSEP_S ";"
#else
#define DIRSEP_C '/'
#define EXTSEP_C '.'
#define DIRSEP_S "/"
#define EXTSEP_S "."
#define PATHSEP_C ':'
#define PATHSEP_S ":"
#endif
])
# Substitution used for gpgme-config
GPGME_CONFIG_LIBS="-lgpgme"
GPGME_CONFIG_CFLAGS=""
AC_SUBST(GPGME_CONFIG_API_VERSION)
AC_SUBST(GPGME_CONFIG_LIBS)
AC_SUBST(GPGME_CONFIG_CFLAGS)
# Frob'da Variables
LTLIBOBJS=`echo "$LIB@&t@OBJS" |
sed 's,\.[[^.]]* ,.lo ,g;s,\.[[^.]]*$,.lo,'`
AC_SUBST(LTLIBOBJS)
#
# Create config files
AC_CONFIG_FILES(Makefile assuan/Makefile gpgme/Makefile
tests/Makefile tests/gpg/Makefile tests/gpgsm/Makefile
doc/Makefile complus/Makefile
gpgme/versioninfo.rc)
AC_CONFIG_FILES(gpgme/gpgme-config, chmod +x gpgme/gpgme-config)
AC_OUTPUT
echo "
GPGME v${VERSION} has been configured as follows:
GnuPG path: $GPG
GnuPG version: $GPG_VERSION, min. $NEED_GPG_VERSION
GpgSM path: $GPGSM
GpgSM version: $GPGSM_VERSION, min. $NEED_GPGSM_VERSION
GPGME Pthread: $have_pthread
GPGME Pth: $have_pth
"
diff --git a/gpgme/gpgme.h b/gpgme/gpgme.h
index 619ed6af..48d722d7 100644
--- a/gpgme/gpgme.h
+++ b/gpgme/gpgme.h
@@ -1,1688 +1,1688 @@
/* gpgme.h - Public interface to GnuPG Made Easy.
Copyright (C) 2000 Werner Koch (dd9jn)
Copyright (C) 2001, 2002, 2003, 2004, 2005 g10 Code GmbH
This file is part of GPGME.
GPGME is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of
the License, or (at your option) any later version.
GPGME is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
#ifndef GPGME_H
#define GPGME_H
#ifdef __GNUC__
#define _GPGME_INLINE __inline__
#elif __STDC_VERSION__ >= 199901L
#define _GPGME_INLINE inline
#else
#define _GPGME_INLINE
#endif
/* Include stdio.h for the FILE type definition. */
#include <stdio.h>
#ifdef _MSC_VER
typedef long off_t;
typedef long ssize_t;
#else
# include <sys/types.h>
#endif
#ifdef __cplusplus
extern "C" {
#if 0 /* just to make Emacs auto-indent happy */
}
#endif
#endif /* __cplusplus */
#include <gpg-error.h>
/* Check for compiler features. */
#if __GNUC__
#define _GPGME_GCC_VERSION (__GNUC__ * 10000 \
+ __GNUC_MINOR__ * 100 \
+ __GNUC_PATCHLEVEL__)
#if _GPGME_GCC_VERSION > 30100
#define _GPGME_DEPRECATED __attribute__ ((__deprecated__))
#endif
#endif
#ifndef _GPGME_DEPRECATED
#define _GPGME_DEPRECATED
#endif
/* The version of this header should match the one of the library. Do
not use this symbol in your application, use gpgme_check_version
instead. The purpose of this macro is to let autoconf (using the
AM_PATH_GPGME macro) check that this header matches the installed
library. Warning: Do not edit the next line. configure will do
that for you! */
-#define GPGME_VERSION "1.1.0"
+#define GPGME_VERSION "1.2.0-cvs"
/* Some opaque data types used by GPGME. */
/* The context holds some global state and configration options, as
well as the results of a crypto operation. */
struct gpgme_context;
typedef struct gpgme_context *gpgme_ctx_t;
/* The data object is used by GPGME to exchange arbitrary data. */
struct gpgme_data;
typedef struct gpgme_data *gpgme_data_t;
/* Wrappers for the libgpg-error library. */
typedef gpg_error_t gpgme_error_t;
typedef gpg_err_code_t gpgme_err_code_t;
typedef gpg_err_source_t gpgme_err_source_t;
static _GPGME_INLINE gpgme_error_t
gpgme_err_make (gpgme_err_source_t source, gpgme_err_code_t code)
{
return gpg_err_make (source, code);
}
/* The user can define GPGME_ERR_SOURCE_DEFAULT before including this
file to specify a default source for gpgme_error. */
#ifndef GPGME_ERR_SOURCE_DEFAULT
#define GPGME_ERR_SOURCE_DEFAULT GPG_ERR_SOURCE_USER_1
#endif
static _GPGME_INLINE gpgme_error_t
gpgme_error (gpgme_err_code_t code)
{
return gpgme_err_make (GPGME_ERR_SOURCE_DEFAULT, code);
}
static _GPGME_INLINE gpgme_err_code_t
gpgme_err_code (gpgme_error_t err)
{
return gpg_err_code (err);
}
static _GPGME_INLINE gpgme_err_source_t
gpgme_err_source (gpgme_error_t err)
{
return gpg_err_source (err);
}
/* Return a pointer to a string containing a description of the error
code in the error value ERR. This function is not thread safe. */
const char *gpgme_strerror (gpgme_error_t err);
/* Return the error string for ERR in the user-supplied buffer BUF of
size BUFLEN. This function is, in contrast to gpg_strerror,
thread-safe if a thread-safe strerror_r() function is provided by
the system. If the function succeeds, 0 is returned and BUF
contains the string describing the error. If the buffer was not
large enough, ERANGE is returned and BUF contains as much of the
beginning of the error string as fits into the buffer. */
int gpgme_strerror_r (gpg_error_t err, char *buf, size_t buflen);
/* Return a pointer to a string containing a description of the error
source in the error value ERR. */
const char *gpgme_strsource (gpgme_error_t err);
/* Retrieve the error code for the system error ERR. This returns
GPG_ERR_UNKNOWN_ERRNO if the system error is not mapped (report
this). */
gpgme_err_code_t gpgme_err_code_from_errno (int err);
/* Retrieve the system error for the error code CODE. This returns 0
if CODE is not a system error code. */
int gpgme_err_code_to_errno (gpgme_err_code_t code);
/* Return an error value with the error source SOURCE and the system
error ERR. */
gpgme_error_t gpgme_err_make_from_errno (gpgme_err_source_t source, int err);
/* Return an error value with the system error ERR. */
gpgme_err_code_t gpgme_error_from_errno (int err);
/* The possible encoding mode of gpgme_data_t objects. */
typedef enum
{
GPGME_DATA_ENCODING_NONE = 0, /* Not specified. */
GPGME_DATA_ENCODING_BINARY = 1,
GPGME_DATA_ENCODING_BASE64 = 2,
GPGME_DATA_ENCODING_ARMOR = 3 /* Either PEM or OpenPGP Armor. */
}
gpgme_data_encoding_t;
/* Public key algorithms from libgcrypt. */
typedef enum
{
GPGME_PK_RSA = 1,
GPGME_PK_RSA_E = 2,
GPGME_PK_RSA_S = 3,
GPGME_PK_ELG_E = 16,
GPGME_PK_DSA = 17,
GPGME_PK_ELG = 20
}
gpgme_pubkey_algo_t;
/* Hash algorithms from libgcrypt. */
typedef enum
{
GPGME_MD_NONE = 0,
GPGME_MD_MD5 = 1,
GPGME_MD_SHA1 = 2,
GPGME_MD_RMD160 = 3,
GPGME_MD_MD2 = 5,
GPGME_MD_TIGER = 6, /* TIGER/192. */
GPGME_MD_HAVAL = 7, /* HAVAL, 5 pass, 160 bit. */
GPGME_MD_SHA256 = 8,
GPGME_MD_SHA384 = 9,
GPGME_MD_SHA512 = 10,
GPGME_MD_MD4 = 301,
GPGME_MD_CRC32 = 302,
GPGME_MD_CRC32_RFC1510 = 303,
GPGME_MD_CRC24_RFC2440 = 304
}
gpgme_hash_algo_t;
/* The possible signature stati. Deprecated, use error value in sig
status. */
typedef enum
{
GPGME_SIG_STAT_NONE = 0,
GPGME_SIG_STAT_GOOD = 1,
GPGME_SIG_STAT_BAD = 2,
GPGME_SIG_STAT_NOKEY = 3,
GPGME_SIG_STAT_NOSIG = 4,
GPGME_SIG_STAT_ERROR = 5,
GPGME_SIG_STAT_DIFF = 6,
GPGME_SIG_STAT_GOOD_EXP = 7,
GPGME_SIG_STAT_GOOD_EXPKEY = 8
}
_gpgme_sig_stat_t;
typedef _gpgme_sig_stat_t gpgme_sig_stat_t _GPGME_DEPRECATED;
/* The available signature modes. */
typedef enum
{
GPGME_SIG_MODE_NORMAL = 0,
GPGME_SIG_MODE_DETACH = 1,
GPGME_SIG_MODE_CLEAR = 2
}
gpgme_sig_mode_t;
/* The available key and signature attributes. Deprecated, use the
individual result structures instead. */
typedef enum
{
GPGME_ATTR_KEYID = 1,
GPGME_ATTR_FPR = 2,
GPGME_ATTR_ALGO = 3,
GPGME_ATTR_LEN = 4,
GPGME_ATTR_CREATED = 5,
GPGME_ATTR_EXPIRE = 6,
GPGME_ATTR_OTRUST = 7,
GPGME_ATTR_USERID = 8,
GPGME_ATTR_NAME = 9,
GPGME_ATTR_EMAIL = 10,
GPGME_ATTR_COMMENT = 11,
GPGME_ATTR_VALIDITY = 12,
GPGME_ATTR_LEVEL = 13,
GPGME_ATTR_TYPE = 14,
GPGME_ATTR_IS_SECRET = 15,
GPGME_ATTR_KEY_REVOKED = 16,
GPGME_ATTR_KEY_INVALID = 17,
GPGME_ATTR_UID_REVOKED = 18,
GPGME_ATTR_UID_INVALID = 19,
GPGME_ATTR_KEY_CAPS = 20,
GPGME_ATTR_CAN_ENCRYPT = 21,
GPGME_ATTR_CAN_SIGN = 22,
GPGME_ATTR_CAN_CERTIFY = 23,
GPGME_ATTR_KEY_EXPIRED = 24,
GPGME_ATTR_KEY_DISABLED = 25,
GPGME_ATTR_SERIAL = 26,
GPGME_ATTR_ISSUER = 27,
GPGME_ATTR_CHAINID = 28,
GPGME_ATTR_SIG_STATUS = 29,
GPGME_ATTR_ERRTOK = 30,
GPGME_ATTR_SIG_SUMMARY = 31,
GPGME_ATTR_SIG_CLASS = 32
}
_gpgme_attr_t;
typedef _gpgme_attr_t gpgme_attr_t _GPGME_DEPRECATED;
/* The available validities for a trust item or key. */
typedef enum
{
GPGME_VALIDITY_UNKNOWN = 0,
GPGME_VALIDITY_UNDEFINED = 1,
GPGME_VALIDITY_NEVER = 2,
GPGME_VALIDITY_MARGINAL = 3,
GPGME_VALIDITY_FULL = 4,
GPGME_VALIDITY_ULTIMATE = 5
}
gpgme_validity_t;
/* The available protocols. */
typedef enum
{
GPGME_PROTOCOL_OpenPGP = 0, /* The default mode. */
GPGME_PROTOCOL_CMS = 1
}
gpgme_protocol_t;
/* The available keylist mode flags. */
#define GPGME_KEYLIST_MODE_LOCAL 1
#define GPGME_KEYLIST_MODE_EXTERN 2
#define GPGME_KEYLIST_MODE_SIGS 4
#define GPGME_KEYLIST_MODE_VALIDATE 256
typedef unsigned int gpgme_keylist_mode_t;
/* Signature notations. */
/* The available signature notation flags. */
#define GPGME_SIG_NOTATION_HUMAN_READABLE 1
#define GPGME_SIG_NOTATION_CRITICAL 2
typedef unsigned int gpgme_sig_notation_flags_t;
struct _gpgme_sig_notation
{
struct _gpgme_sig_notation *next;
/* If NAME is a null pointer, then VALUE contains a policy URL
rather than a notation. */
char *name;
/* The value of the notation data. */
char *value;
/* The length of the name of the notation data. */
int name_len;
/* The length of the value of the notation data. */
int value_len;
/* The accumulated flags. */
gpgme_sig_notation_flags_t flags;
/* Notation data is human-readable. */
unsigned int human_readable : 1;
/* Notation data is critical. */
unsigned int critical : 1;
/* Internal to GPGME, do not use. */
int _unused : 30;
};
typedef struct _gpgme_sig_notation *gpgme_sig_notation_t;
/* The possible stati for the edit operation. */
typedef enum
{
GPGME_STATUS_EOF,
/* mkstatus processing starts here */
GPGME_STATUS_ENTER,
GPGME_STATUS_LEAVE,
GPGME_STATUS_ABORT,
GPGME_STATUS_GOODSIG,
GPGME_STATUS_BADSIG,
GPGME_STATUS_ERRSIG,
GPGME_STATUS_BADARMOR,
GPGME_STATUS_RSA_OR_IDEA,
GPGME_STATUS_KEYEXPIRED,
GPGME_STATUS_KEYREVOKED,
GPGME_STATUS_TRUST_UNDEFINED,
GPGME_STATUS_TRUST_NEVER,
GPGME_STATUS_TRUST_MARGINAL,
GPGME_STATUS_TRUST_FULLY,
GPGME_STATUS_TRUST_ULTIMATE,
GPGME_STATUS_SHM_INFO,
GPGME_STATUS_SHM_GET,
GPGME_STATUS_SHM_GET_BOOL,
GPGME_STATUS_SHM_GET_HIDDEN,
GPGME_STATUS_NEED_PASSPHRASE,
GPGME_STATUS_VALIDSIG,
GPGME_STATUS_SIG_ID,
GPGME_STATUS_ENC_TO,
GPGME_STATUS_NODATA,
GPGME_STATUS_BAD_PASSPHRASE,
GPGME_STATUS_NO_PUBKEY,
GPGME_STATUS_NO_SECKEY,
GPGME_STATUS_NEED_PASSPHRASE_SYM,
GPGME_STATUS_DECRYPTION_FAILED,
GPGME_STATUS_DECRYPTION_OKAY,
GPGME_STATUS_MISSING_PASSPHRASE,
GPGME_STATUS_GOOD_PASSPHRASE,
GPGME_STATUS_GOODMDC,
GPGME_STATUS_BADMDC,
GPGME_STATUS_ERRMDC,
GPGME_STATUS_IMPORTED,
GPGME_STATUS_IMPORT_OK,
GPGME_STATUS_IMPORT_PROBLEM,
GPGME_STATUS_IMPORT_RES,
GPGME_STATUS_FILE_START,
GPGME_STATUS_FILE_DONE,
GPGME_STATUS_FILE_ERROR,
GPGME_STATUS_BEGIN_DECRYPTION,
GPGME_STATUS_END_DECRYPTION,
GPGME_STATUS_BEGIN_ENCRYPTION,
GPGME_STATUS_END_ENCRYPTION,
GPGME_STATUS_DELETE_PROBLEM,
GPGME_STATUS_GET_BOOL,
GPGME_STATUS_GET_LINE,
GPGME_STATUS_GET_HIDDEN,
GPGME_STATUS_GOT_IT,
GPGME_STATUS_PROGRESS,
GPGME_STATUS_SIG_CREATED,
GPGME_STATUS_SESSION_KEY,
GPGME_STATUS_NOTATION_NAME,
GPGME_STATUS_NOTATION_DATA,
GPGME_STATUS_POLICY_URL,
GPGME_STATUS_BEGIN_STREAM,
GPGME_STATUS_END_STREAM,
GPGME_STATUS_KEY_CREATED,
GPGME_STATUS_USERID_HINT,
GPGME_STATUS_UNEXPECTED,
GPGME_STATUS_INV_RECP,
GPGME_STATUS_NO_RECP,
GPGME_STATUS_ALREADY_SIGNED,
GPGME_STATUS_SIGEXPIRED,
GPGME_STATUS_EXPSIG,
GPGME_STATUS_EXPKEYSIG,
GPGME_STATUS_TRUNCATED,
GPGME_STATUS_ERROR,
GPGME_STATUS_NEWSIG,
GPGME_STATUS_REVKEYSIG,
GPGME_STATUS_SIG_SUBPACKET,
GPGME_STATUS_NEED_PASSPHRASE_PIN,
GPGME_STATUS_SC_OP_FAILURE,
GPGME_STATUS_SC_OP_SUCCESS,
GPGME_STATUS_CARDCTRL,
GPGME_STATUS_BACKUP_KEY_CREATED,
GPGME_STATUS_PLAINTEXT
}
gpgme_status_code_t;
/* The engine information structure. */
struct _gpgme_engine_info
{
struct _gpgme_engine_info *next;
/* The protocol ID. */
gpgme_protocol_t protocol;
/* The file name of the engine binary. */
char *file_name;
/* The version string of the installed engine. */
char *version;
/* The minimum version required for GPGME. */
const char *req_version;
/* The home directory used, or NULL if default. */
char *home_dir;
};
typedef struct _gpgme_engine_info *gpgme_engine_info_t;
/* A subkey from a key. */
struct _gpgme_subkey
{
struct _gpgme_subkey *next;
/* True if subkey is revoked. */
unsigned int revoked : 1;
/* True if subkey is expired. */
unsigned int expired : 1;
/* True if subkey is disabled. */
unsigned int disabled : 1;
/* True if subkey is invalid. */
unsigned int invalid : 1;
/* True if subkey can be used for encryption. */
unsigned int can_encrypt : 1;
/* True if subkey can be used for signing. */
unsigned int can_sign : 1;
/* True if subkey can be used for certification. */
unsigned int can_certify : 1;
/* True if subkey is secret. */
unsigned int secret : 1;
/* True if subkey can be used for authentication. */
unsigned int can_authenticate : 1;
/* True if subkey is qualified for signatures according to German law. */
unsigned int is_qualified : 1;
/* Internal to GPGME, do not use. */
unsigned int _unused : 22;
/* Public key algorithm supported by this subkey. */
gpgme_pubkey_algo_t pubkey_algo;
/* Length of the subkey. */
unsigned int length;
/* The key ID of the subkey. */
char *keyid;
/* Internal to GPGME, do not use. */
char _keyid[16 + 1];
/* The fingerprint of the subkey in hex digit form. */
char *fpr;
/* The creation timestamp, -1 if invalid, 0 if not available. */
long int timestamp;
/* The expiration timestamp, 0 if the subkey does not expire. */
long int expires;
};
typedef struct _gpgme_subkey *gpgme_subkey_t;
/* A signature on a user ID. */
struct _gpgme_key_sig
{
struct _gpgme_key_sig *next;
/* True if the signature is a revocation signature. */
unsigned int revoked : 1;
/* True if the signature is expired. */
unsigned int expired : 1;
/* True if the signature is invalid. */
unsigned int invalid : 1;
/* True if the signature should be exported. */
unsigned int exportable : 1;
/* Internal to GPGME, do not use. */
unsigned int _unused : 28;
/* The public key algorithm used to create the signature. */
gpgme_pubkey_algo_t pubkey_algo;
/* The key ID of key used to create the signature. */
char *keyid;
/* Internal to GPGME, do not use. */
char _keyid[16 + 1];
/* The creation timestamp, -1 if invalid, 0 if not available. */
long int timestamp;
/* The expiration timestamp, 0 if the subkey does not expire. */
long int expires;
/* Same as in gpgme_signature_t. */
gpgme_error_t status;
#ifdef __cplusplus
unsigned int _obsolete_class _GPGME_DEPRECATED;
#else
/* Must be set to SIG_CLASS below. */
unsigned int class _GPGME_DEPRECATED;
#endif
/* The user ID string. */
char *uid;
/* The name part of the user ID. */
char *name;
/* The email part of the user ID. */
char *email;
/* The comment part of the user ID. */
char *comment;
/* Crypto backend specific signature class. */
unsigned int sig_class;
};
typedef struct _gpgme_key_sig *gpgme_key_sig_t;
/* An user ID from a key. */
struct _gpgme_user_id
{
struct _gpgme_user_id *next;
/* True if the user ID is revoked. */
unsigned int revoked : 1;
/* True if the user ID is invalid. */
unsigned int invalid : 1;
/* Internal to GPGME, do not use. */
unsigned int _unused : 30;
/* The validity of the user ID. */
gpgme_validity_t validity;
/* The user ID string. */
char *uid;
/* The name part of the user ID. */
char *name;
/* The email part of the user ID. */
char *email;
/* The comment part of the user ID. */
char *comment;
/* The signatures of the user ID. */
gpgme_key_sig_t signatures;
/* Internal to GPGME, do not use. */
gpgme_key_sig_t _last_keysig;
};
typedef struct _gpgme_user_id *gpgme_user_id_t;
/* A key from the keyring. */
struct _gpgme_key
{
/* Internal to GPGME, do not use. */
unsigned int _refs;
/* True if key is revoked. */
unsigned int revoked : 1;
/* True if key is expired. */
unsigned int expired : 1;
/* True if key is disabled. */
unsigned int disabled : 1;
/* True if key is invalid. */
unsigned int invalid : 1;
/* True if key can be used for encryption. */
unsigned int can_encrypt : 1;
/* True if key can be used for signing. */
unsigned int can_sign : 1;
/* True if key can be used for certification. */
unsigned int can_certify : 1;
/* True if key is secret. */
unsigned int secret : 1;
/* True if key can be used for authentication. */
unsigned int can_authenticate : 1;
/* True if subkey is qualified for signatures according to German law. */
unsigned int is_qualified : 1;
/* Internal to GPGME, do not use. */
unsigned int _unused : 22;
/* This is the protocol supported by this key. */
gpgme_protocol_t protocol;
/* If protocol is GPGME_PROTOCOL_CMS, this string contains the
issuer serial. */
char *issuer_serial;
/* If protocol is GPGME_PROTOCOL_CMS, this string contains the
issuer name. */
char *issuer_name;
/* If protocol is GPGME_PROTOCOL_CMS, this string contains the chain
ID. */
char *chain_id;
/* If protocol is GPGME_PROTOCOL_OpenPGP, this field contains the
owner trust. */
gpgme_validity_t owner_trust;
/* The subkeys of the key. */
gpgme_subkey_t subkeys;
/* The user IDs of the key. */
gpgme_user_id_t uids;
/* Internal to GPGME, do not use. */
gpgme_subkey_t _last_subkey;
/* Internal to GPGME, do not use. */
gpgme_user_id_t _last_uid;
/* The keylist mode that was active when listing the key. */
gpgme_keylist_mode_t keylist_mode;
};
typedef struct _gpgme_key *gpgme_key_t;
/* Types for callback functions. */
/* Request a passphrase from the user. */
typedef gpgme_error_t (*gpgme_passphrase_cb_t) (void *hook,
const char *uid_hint,
const char *passphrase_info,
int prev_was_bad, int fd);
/* Inform the user about progress made. */
typedef void (*gpgme_progress_cb_t) (void *opaque, const char *what,
int type, int current, int total);
/* Interact with the user about an edit operation. */
typedef gpgme_error_t (*gpgme_edit_cb_t) (void *opaque,
gpgme_status_code_t status,
const char *args, int fd);
/* Context management functions. */
/* Create a new context and return it in CTX. */
gpgme_error_t gpgme_new (gpgme_ctx_t *ctx);
/* Release the context CTX. */
void gpgme_release (gpgme_ctx_t ctx);
/* Set the protocol to be used by CTX to PROTO. */
gpgme_error_t gpgme_set_protocol (gpgme_ctx_t ctx, gpgme_protocol_t proto);
/* Get the protocol used with CTX */
gpgme_protocol_t gpgme_get_protocol (gpgme_ctx_t ctx);
/* Get the string describing protocol PROTO, or NULL if invalid. */
const char *gpgme_get_protocol_name (gpgme_protocol_t proto);
/* If YES is non-zero, enable armor mode in CTX, disable it otherwise. */
void gpgme_set_armor (gpgme_ctx_t ctx, int yes);
/* Return non-zero if armor mode is set in CTX. */
int gpgme_get_armor (gpgme_ctx_t ctx);
/* If YES is non-zero, enable text mode in CTX, disable it otherwise. */
void gpgme_set_textmode (gpgme_ctx_t ctx, int yes);
/* Return non-zero if text mode is set in CTX. */
int gpgme_get_textmode (gpgme_ctx_t ctx);
/* Use whatever the default of the backend crypto engine is. */
#define GPGME_INCLUDE_CERTS_DEFAULT -256
/* Include up to NR_OF_CERTS certificates in an S/MIME message. */
void gpgme_set_include_certs (gpgme_ctx_t ctx, int nr_of_certs);
/* Return the number of certs to include in an S/MIME message. */
int gpgme_get_include_certs (gpgme_ctx_t ctx);
/* Set keylist mode in CTX to MODE. */
gpgme_error_t gpgme_set_keylist_mode (gpgme_ctx_t ctx,
gpgme_keylist_mode_t mode);
/* Get keylist mode in CTX. */
gpgme_keylist_mode_t gpgme_get_keylist_mode (gpgme_ctx_t ctx);
/* Set the passphrase callback function in CTX to CB. HOOK_VALUE is
passed as first argument to the passphrase callback function. */
void gpgme_set_passphrase_cb (gpgme_ctx_t ctx,
gpgme_passphrase_cb_t cb, void *hook_value);
/* Get the current passphrase callback function in *CB and the current
hook value in *HOOK_VALUE. */
void gpgme_get_passphrase_cb (gpgme_ctx_t ctx, gpgme_passphrase_cb_t *cb,
void **hook_value);
/* Set the progress callback function in CTX to CB. HOOK_VALUE is
passed as first argument to the progress callback function. */
void gpgme_set_progress_cb (gpgme_ctx_t c, gpgme_progress_cb_t cb,
void *hook_value);
/* Get the current progress callback function in *CB and the current
hook value in *HOOK_VALUE. */
void gpgme_get_progress_cb (gpgme_ctx_t ctx, gpgme_progress_cb_t *cb,
void **hook_value);
/* This function sets the locale for the context CTX, or the default
locale if CTX is a null pointer. */
gpgme_error_t gpgme_set_locale (gpgme_ctx_t ctx, int category,
const char *value);
/* Get the information about the configured engines. A pointer to the
first engine in the statically allocated linked list is returned.
The returned data is valid until the next gpgme_ctx_set_engine_info. */
gpgme_engine_info_t gpgme_ctx_get_engine_info (gpgme_ctx_t ctx);
/* Set the engine info for the context CTX, protocol PROTO, to the
file name FILE_NAME and the home directory HOME_DIR. */
gpgme_error_t gpgme_ctx_set_engine_info (gpgme_ctx_t ctx,
gpgme_protocol_t proto,
const char *file_name,
const char *home_dir);
/* Return a statically allocated string with the name of the public
key algorithm ALGO, or NULL if that name is not known. */
const char *gpgme_pubkey_algo_name (gpgme_pubkey_algo_t algo);
/* Return a statically allocated string with the name of the hash
algorithm ALGO, or NULL if that name is not known. */
const char *gpgme_hash_algo_name (gpgme_hash_algo_t algo);
/* Delete all signers from CTX. */
void gpgme_signers_clear (gpgme_ctx_t ctx);
/* Add KEY to list of signers in CTX. */
gpgme_error_t gpgme_signers_add (gpgme_ctx_t ctx, const gpgme_key_t key);
/* Return the SEQth signer's key in CTX. */
gpgme_key_t gpgme_signers_enum (const gpgme_ctx_t ctx, int seq);
/* Retrieve the signature status of signature IDX in CTX after a
successful verify operation in R_STAT (if non-null). The creation
time stamp of the signature is returned in R_CREATED (if non-null).
The function returns a string containing the fingerprint.
Deprecated, use verify result directly. */
const char *gpgme_get_sig_status (gpgme_ctx_t ctx, int idx,
_gpgme_sig_stat_t *r_stat,
time_t *r_created) _GPGME_DEPRECATED;
/* Retrieve certain attributes of a signature. IDX is the index
number of the signature after a successful verify operation. WHAT
is an attribute where GPGME_ATTR_EXPIRE is probably the most useful
one. WHATIDX is to be passed as 0 for most attributes . */
unsigned long gpgme_get_sig_ulong_attr (gpgme_ctx_t c, int idx,
_gpgme_attr_t what, int whatidx)
_GPGME_DEPRECATED;
const char *gpgme_get_sig_string_attr (gpgme_ctx_t c, int idx,
_gpgme_attr_t what, int whatidx)
_GPGME_DEPRECATED;
/* Get the key used to create signature IDX in CTX and return it in
R_KEY. */
gpgme_error_t gpgme_get_sig_key (gpgme_ctx_t ctx, int idx, gpgme_key_t *r_key)
_GPGME_DEPRECATED;
/* Clear all notation data from the context. */
void gpgme_sig_notation_clear (gpgme_ctx_t ctx);
/* Add the human-readable notation data with name NAME and value VALUE
to the context CTX, using the flags FLAGS. If NAME is NULL, then
VALUE should be a policy URL. The flag
GPGME_SIG_NOTATION_HUMAN_READABLE is forced to be true for notation
data, and false for policy URLs. */
gpgme_error_t gpgme_sig_notation_add (gpgme_ctx_t ctx, const char *name,
const char *value,
gpgme_sig_notation_flags_t flags);
/* Get the sig notations for this context. */
gpgme_sig_notation_t gpgme_sig_notation_get (gpgme_ctx_t ctx);
/* Run control. */
/* The type of an I/O callback function. */
typedef gpgme_error_t (*gpgme_io_cb_t) (void *data, int fd);
/* The type of a function that can register FNC as the I/O callback
function for the file descriptor FD with direction dir (0: for writing,
1: for reading). FNC_DATA should be passed as DATA to FNC. The
function should return a TAG suitable for the corresponding
gpgme_remove_io_cb_t, and an error value. */
typedef gpgme_error_t (*gpgme_register_io_cb_t) (void *data, int fd, int dir,
gpgme_io_cb_t fnc,
void *fnc_data, void **tag);
/* The type of a function that can remove a previously registered I/O
callback function given TAG as returned by the register
function. */
typedef void (*gpgme_remove_io_cb_t) (void *tag);
typedef enum
{
GPGME_EVENT_START,
GPGME_EVENT_DONE,
GPGME_EVENT_NEXT_KEY,
GPGME_EVENT_NEXT_TRUSTITEM
}
gpgme_event_io_t;
/* The type of a function that is called when a context finished an
operation. */
typedef void (*gpgme_event_io_cb_t) (void *data, gpgme_event_io_t type,
void *type_data);
struct gpgme_io_cbs
{
gpgme_register_io_cb_t add;
void *add_priv;
gpgme_remove_io_cb_t remove;
gpgme_event_io_cb_t event;
void *event_priv;
};
typedef struct gpgme_io_cbs *gpgme_io_cbs_t;
/* Set the I/O callback functions in CTX to IO_CBS. */
void gpgme_set_io_cbs (gpgme_ctx_t ctx, gpgme_io_cbs_t io_cbs);
/* Get the current I/O callback functions. */
void gpgme_get_io_cbs (gpgme_ctx_t ctx, gpgme_io_cbs_t io_cbs);
/* 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);
/* Functions to handle data objects. */
/* Read up to SIZE bytes into buffer BUFFER from the data object with
the handle HANDLE. Return the number of characters read, 0 on EOF
and -1 on error. If an error occurs, errno is set. */
typedef ssize_t (*gpgme_data_read_cb_t) (void *handle, void *buffer,
size_t size);
/* Write up to SIZE bytes from buffer BUFFER to the data object with
the handle HANDLE. Return the number of characters written, or -1
on error. If an error occurs, errno is set. */
typedef ssize_t (*gpgme_data_write_cb_t) (void *handle, const void *buffer,
size_t size);
/* Set the current position from where the next read or write starts
in the data object with the handle HANDLE to OFFSET, relativ to
WHENCE. */
typedef off_t (*gpgme_data_seek_cb_t) (void *handle, off_t offset, int whence);
/* Close the data object with the handle DL. */
typedef void (*gpgme_data_release_cb_t) (void *handle);
struct gpgme_data_cbs
{
gpgme_data_read_cb_t read;
gpgme_data_write_cb_t write;
gpgme_data_seek_cb_t seek;
gpgme_data_release_cb_t release;
};
typedef struct gpgme_data_cbs *gpgme_data_cbs_t;
/* Read up to SIZE bytes into buffer BUFFER from the data object with
the handle DH. Return the number of characters read, 0 on EOF and
-1 on error. If an error occurs, errno is set. */
ssize_t gpgme_data_read (gpgme_data_t dh, void *buffer, size_t size);
/* Write up to SIZE bytes from buffer BUFFER to the data object with
the handle DH. Return the number of characters written, or -1 on
error. If an error occurs, errno is set. */
ssize_t gpgme_data_write (gpgme_data_t dh, const void *buffer, size_t size);
/* Set the current position from where the next read or write starts
in the data object with the handle DH to OFFSET, relativ to
WHENCE. */
off_t gpgme_data_seek (gpgme_data_t dh, off_t offset, int whence);
/* Create a new data buffer and return it in R_DH. */
gpgme_error_t gpgme_data_new (gpgme_data_t *r_dh);
/* Destroy the data buffer DH. */
void gpgme_data_release (gpgme_data_t dh);
/* Create a new data buffer filled with SIZE bytes starting from
BUFFER. If COPY is zero, copying is delayed until necessary, and
the data is taken from the original location when needed. */
gpgme_error_t gpgme_data_new_from_mem (gpgme_data_t *r_dh,
const char *buffer, size_t size,
int copy);
/* Destroy the data buffer DH and return a pointer to its content.
The memory has be to released with free by the user. It's size is
returned in R_LEN. */
char *gpgme_data_release_and_get_mem (gpgme_data_t dh, size_t *r_len);
gpgme_error_t gpgme_data_new_from_cbs (gpgme_data_t *dh,
gpgme_data_cbs_t cbs,
void *handle);
gpgme_error_t gpgme_data_new_from_fd (gpgme_data_t *dh, int fd);
gpgme_error_t gpgme_data_new_from_stream (gpgme_data_t *dh, FILE *stream);
/* Return the encoding attribute of the data buffer DH */
gpgme_data_encoding_t gpgme_data_get_encoding (gpgme_data_t dh);
/* Set the encoding attribute of data buffer DH to ENC */
gpgme_error_t gpgme_data_set_encoding (gpgme_data_t dh,
gpgme_data_encoding_t enc);
/* Get the filename associated with the data object with handle DH, or
NULL if there is none. */
char *gpgme_data_get_file_name (gpgme_data_t dh);
/* Set the filename associated with the data object with handle DH to
FILE_NAME. */
gpgme_error_t gpgme_data_set_file_name (gpgme_data_t dh,
const char *file_name);
/* Create a new data buffer which retrieves the data from the callback
function READ_CB. Deprecated, please use gpgme_data_new_from_cbs
instead. */
gpgme_error_t gpgme_data_new_with_read_cb (gpgme_data_t *r_dh,
int (*read_cb) (void*,char *,
size_t,size_t*),
void *read_cb_value)
_GPGME_DEPRECATED;
/* Create a new data buffer filled with the content of file FNAME.
COPY must be non-zero. For delayed read, please use
gpgme_data_new_from_fd or gpgme_data_new_from stream instead. */
gpgme_error_t gpgme_data_new_from_file (gpgme_data_t *r_dh,
const char *fname,
int copy);
/* Create a new data buffer filled with LENGTH bytes starting from
OFFSET within the file FNAME or stream FP (exactly one must be
non-zero). */
gpgme_error_t gpgme_data_new_from_filepart (gpgme_data_t *r_dh,
const char *fname, FILE *fp,
off_t offset, size_t length);
/* Reset the read pointer in DH. Deprecated, please use
gpgme_data_seek instead. */
gpgme_error_t gpgme_data_rewind (gpgme_data_t dh) _GPGME_DEPRECATED;
/* Key and trust functions. */
/* Get the key with the fingerprint FPR from the crypto backend. If
SECRET is true, get the secret key. */
gpgme_error_t gpgme_get_key (gpgme_ctx_t ctx, const char *fpr,
gpgme_key_t *r_key, int secret);
/* Acquire a reference to KEY. */
void gpgme_key_ref (gpgme_key_t key);
/* Release a reference to KEY. If this was the last one the key is
destroyed. */
void gpgme_key_unref (gpgme_key_t key);
void gpgme_key_release (gpgme_key_t key);
/* Return the value of the attribute WHAT of KEY, which has to be
representable by a string. IDX specifies the sub key or user ID
for attributes related to sub keys or user IDs. Deprecated, use
key structure directly instead. */
const char *gpgme_key_get_string_attr (gpgme_key_t key, _gpgme_attr_t what,
const void *reserved, int idx)
_GPGME_DEPRECATED;
/* Return the value of the attribute WHAT of KEY, which has to be
representable by an unsigned integer. IDX specifies the sub key or
user ID for attributes related to sub keys or user IDs.
Deprecated, use key structure directly instead. */
unsigned long gpgme_key_get_ulong_attr (gpgme_key_t key, _gpgme_attr_t what,
const void *reserved, int idx)
_GPGME_DEPRECATED;
/* Return the value of the attribute WHAT of a signature on user ID
UID_IDX in KEY, which has to be representable by a string. IDX
specifies the signature. Deprecated, use key structure directly
instead. */
const char *gpgme_key_sig_get_string_attr (gpgme_key_t key, int uid_idx,
_gpgme_attr_t what,
const void *reserved, int idx)
_GPGME_DEPRECATED;
/* Return the value of the attribute WHAT of a signature on user ID
UID_IDX in KEY, which has to be representable by an unsigned
integer string. IDX specifies the signature. Deprecated, use key
structure directly instead. */
unsigned long gpgme_key_sig_get_ulong_attr (gpgme_key_t key, int uid_idx,
_gpgme_attr_t what,
const void *reserved, int idx)
_GPGME_DEPRECATED;
/* Crypto Operations. */
/* Cancel a pending asynchronous operation. */
gpgme_error_t gpgme_cancel (gpgme_ctx_t ctx);
struct _gpgme_invalid_key
{
struct _gpgme_invalid_key *next;
char *fpr;
gpgme_error_t reason;
};
typedef struct _gpgme_invalid_key *gpgme_invalid_key_t;
/* Encryption. */
struct _gpgme_op_encrypt_result
{
/* The list of invalid recipients. */
gpgme_invalid_key_t invalid_recipients;
};
typedef struct _gpgme_op_encrypt_result *gpgme_encrypt_result_t;
/* Retrieve a pointer to the result of the encrypt operation. */
gpgme_encrypt_result_t gpgme_op_encrypt_result (gpgme_ctx_t ctx);
/* The valid encryption flags. */
typedef enum
{
GPGME_ENCRYPT_ALWAYS_TRUST = 1
}
gpgme_encrypt_flags_t;
/* Encrypt plaintext PLAIN within CTX for the recipients RECP and
store the resulting ciphertext in CIPHER. */
gpgme_error_t gpgme_op_encrypt_start (gpgme_ctx_t ctx, gpgme_key_t recp[],
gpgme_encrypt_flags_t flags,
gpgme_data_t plain, gpgme_data_t cipher);
gpgme_error_t gpgme_op_encrypt (gpgme_ctx_t ctx, gpgme_key_t recp[],
gpgme_encrypt_flags_t flags,
gpgme_data_t plain, gpgme_data_t cipher);
/* Encrypt plaintext PLAIN within CTX for the recipients RECP and
store the resulting ciphertext in CIPHER. Also sign the ciphertext
with the signers in CTX. */
gpgme_error_t gpgme_op_encrypt_sign_start (gpgme_ctx_t ctx,
gpgme_key_t recp[],
gpgme_encrypt_flags_t flags,
gpgme_data_t plain,
gpgme_data_t cipher);
gpgme_error_t gpgme_op_encrypt_sign (gpgme_ctx_t ctx, gpgme_key_t recp[],
gpgme_encrypt_flags_t flags,
gpgme_data_t plain, gpgme_data_t cipher);
/* Decryption. */
struct _gpgme_recipient
{
struct _gpgme_recipient *next;
/* The key ID of key for which the text was encrypted. */
char *keyid;
/* Internal to GPGME, do not use. */
char _keyid[16 + 1];
/* The public key algorithm of the recipient key. */
gpgme_pubkey_algo_t pubkey_algo;
/* The status of the recipient. */
gpgme_error_t status;
};
typedef struct _gpgme_recipient *gpgme_recipient_t;
struct _gpgme_op_decrypt_result
{
char *unsupported_algorithm;
/* Key should not have been used for encryption. */
unsigned int wrong_key_usage : 1;
/* Internal to GPGME, do not use. */
int _unused : 31;
gpgme_recipient_t recipients;
/* The original file name of the plaintext message, if
available. */
char *file_name;
};
typedef struct _gpgme_op_decrypt_result *gpgme_decrypt_result_t;
/* Retrieve a pointer to the result of the decrypt operation. */
gpgme_decrypt_result_t gpgme_op_decrypt_result (gpgme_ctx_t ctx);
/* Decrypt ciphertext CIPHER within CTX and store the resulting
plaintext in PLAIN. */
gpgme_error_t gpgme_op_decrypt_start (gpgme_ctx_t ctx, gpgme_data_t cipher,
gpgme_data_t plain);
gpgme_error_t gpgme_op_decrypt (gpgme_ctx_t ctx,
gpgme_data_t cipher, gpgme_data_t plain);
/* Decrypt ciphertext CIPHER and make a signature verification within
CTX and store the resulting plaintext in PLAIN. */
gpgme_error_t gpgme_op_decrypt_verify_start (gpgme_ctx_t ctx,
gpgme_data_t cipher,
gpgme_data_t plain);
gpgme_error_t gpgme_op_decrypt_verify (gpgme_ctx_t ctx, gpgme_data_t cipher,
gpgme_data_t plain);
/* Signing. */
struct _gpgme_new_signature
{
struct _gpgme_new_signature *next;
/* The type of the signature. */
gpgme_sig_mode_t type;
/* The public key algorithm used to create the signature. */
gpgme_pubkey_algo_t pubkey_algo;
/* The hash algorithm used to create the signature. */
gpgme_hash_algo_t hash_algo;
/* Internal to GPGME, do not use. Must be set to the same value as
CLASS below. */
unsigned long _obsolete_class;
/* Signature creation time. */
long int timestamp;
/* The fingerprint of the signature. */
char *fpr;
#ifdef __cplusplus
unsigned int _obsolete_class_2;
#else
/* Must be set to SIG_CLASS below. */
unsigned int class _GPGME_DEPRECATED;
#endif
/* Crypto backend specific signature class. */
unsigned int sig_class;
};
typedef struct _gpgme_new_signature *gpgme_new_signature_t;
struct _gpgme_op_sign_result
{
/* The list of invalid signers. */
gpgme_invalid_key_t invalid_signers;
gpgme_new_signature_t signatures;
};
typedef struct _gpgme_op_sign_result *gpgme_sign_result_t;
/* Retrieve a pointer to the result of the signing operation. */
gpgme_sign_result_t gpgme_op_sign_result (gpgme_ctx_t ctx);
/* Sign the plaintext PLAIN and store the signature in SIG. */
gpgme_error_t gpgme_op_sign_start (gpgme_ctx_t ctx,
gpgme_data_t plain, gpgme_data_t sig,
gpgme_sig_mode_t mode);
gpgme_error_t gpgme_op_sign (gpgme_ctx_t ctx,
gpgme_data_t plain, gpgme_data_t sig,
gpgme_sig_mode_t mode);
/* Verify. */
/* Flags used for the SUMMARY field in a gpgme_signature_t. */
typedef enum
{
GPGME_SIGSUM_VALID = 0x0001, /* The signature is fully valid. */
GPGME_SIGSUM_GREEN = 0x0002, /* The signature is good. */
GPGME_SIGSUM_RED = 0x0004, /* The signature is bad. */
GPGME_SIGSUM_KEY_REVOKED = 0x0010, /* One key has been revoked. */
GPGME_SIGSUM_KEY_EXPIRED = 0x0020, /* One key has expired. */
GPGME_SIGSUM_SIG_EXPIRED = 0x0040, /* The signature has expired. */
GPGME_SIGSUM_KEY_MISSING = 0x0080, /* Can't verify: key missing. */
GPGME_SIGSUM_CRL_MISSING = 0x0100, /* CRL not available. */
GPGME_SIGSUM_CRL_TOO_OLD = 0x0200, /* Available CRL is too old. */
GPGME_SIGSUM_BAD_POLICY = 0x0400, /* A policy was not met. */
GPGME_SIGSUM_SYS_ERROR = 0x0800 /* A system error occured. */
}
gpgme_sigsum_t;
struct _gpgme_signature
{
struct _gpgme_signature *next;
/* A summary of the signature status. */
gpgme_sigsum_t summary;
/* The fingerprint or key ID of the signature. */
char *fpr;
/* The status of the signature. */
gpgme_error_t status;
/* Notation data and policy URLs. */
gpgme_sig_notation_t notations;
/* Signature creation time. */
unsigned long timestamp;
/* Signature exipration time or 0. */
unsigned long exp_timestamp;
/* Key should not have been used for signing. */
unsigned int wrong_key_usage : 1;
/* Internal to GPGME, do not use. */
int _unused : 31;
gpgme_validity_t validity;
gpgme_error_t validity_reason;
/* The public key algorithm used to create the signature. */
gpgme_pubkey_algo_t pubkey_algo;
/* The hash algorithm used to create the signature. */
gpgme_hash_algo_t hash_algo;
};
typedef struct _gpgme_signature *gpgme_signature_t;
struct _gpgme_op_verify_result
{
gpgme_signature_t signatures;
/* The original file name of the plaintext message, if
available. */
char *file_name;
};
typedef struct _gpgme_op_verify_result *gpgme_verify_result_t;
/* Retrieve a pointer to the result of the verify operation. */
gpgme_verify_result_t gpgme_op_verify_result (gpgme_ctx_t ctx);
/* Verify within CTX that SIG is a valid signature for TEXT. */
gpgme_error_t gpgme_op_verify_start (gpgme_ctx_t ctx, gpgme_data_t sig,
gpgme_data_t signed_text,
gpgme_data_t plaintext);
gpgme_error_t gpgme_op_verify (gpgme_ctx_t ctx, gpgme_data_t sig,
gpgme_data_t signed_text,
gpgme_data_t plaintext);
/* Import. */
/* The key was new. */
#define GPGME_IMPORT_NEW 1
/* The key contained new user IDs. */
#define GPGME_IMPORT_UID 2
/* The key contained new signatures. */
#define GPGME_IMPORT_SIG 4
/* The key contained new sub keys. */
#define GPGME_IMPORT_SUBKEY 8
/* The key contained a secret key. */
#define GPGME_IMPORT_SECRET 16
struct _gpgme_import_status
{
struct _gpgme_import_status *next;
/* Fingerprint. */
char *fpr;
/* If a problem occured, the reason why the key could not be
imported. Otherwise GPGME_No_Error. */
gpgme_error_t result;
/* The result of the import, the GPGME_IMPORT_* values bit-wise
ORed. 0 means the key was already known and no new components
have been added. */
unsigned int status;
};
typedef struct _gpgme_import_status *gpgme_import_status_t;
/* Import. */
struct _gpgme_op_import_result
{
/* Number of considered keys. */
int considered;
/* Keys without user ID. */
int no_user_id;
/* Imported keys. */
int imported;
/* Imported RSA keys. */
int imported_rsa;
/* Unchanged keys. */
int unchanged;
/* Number of new user ids. */
int new_user_ids;
/* Number of new sub keys. */
int new_sub_keys;
/* Number of new signatures. */
int new_signatures;
/* Number of new revocations. */
int new_revocations;
/* Number of secret keys read. */
int secret_read;
/* Number of secret keys imported. */
int secret_imported;
/* Number of secret keys unchanged. */
int secret_unchanged;
/* Number of new keys skipped. */
int skipped_new_keys;
/* Number of keys not imported. */
int not_imported;
/* List of keys for which an import was attempted. */
gpgme_import_status_t imports;
};
typedef struct _gpgme_op_import_result *gpgme_import_result_t;
/* Retrieve a pointer to the result of the import operation. */
gpgme_import_result_t gpgme_op_import_result (gpgme_ctx_t ctx);
/* Import the key in KEYDATA into the keyring. */
gpgme_error_t gpgme_op_import_start (gpgme_ctx_t ctx, gpgme_data_t keydata);
gpgme_error_t gpgme_op_import (gpgme_ctx_t ctx, gpgme_data_t keydata);
gpgme_error_t gpgme_op_import_ext (gpgme_ctx_t ctx, gpgme_data_t keydata,
int *nr) _GPGME_DEPRECATED;
/* Export the keys found by PATTERN into KEYDATA. */
gpgme_error_t gpgme_op_export_start (gpgme_ctx_t ctx, const char *pattern,
unsigned int reserved,
gpgme_data_t keydata);
gpgme_error_t gpgme_op_export (gpgme_ctx_t ctx, const char *pattern,
unsigned int reserved, gpgme_data_t keydata);
gpgme_error_t gpgme_op_export_ext_start (gpgme_ctx_t ctx,
const char *pattern[],
unsigned int reserved,
gpgme_data_t keydata);
gpgme_error_t gpgme_op_export_ext (gpgme_ctx_t ctx, const char *pattern[],
unsigned int reserved,
gpgme_data_t keydata);
/* Key generation. */
struct _gpgme_op_genkey_result
{
/* A primary key was generated. */
unsigned int primary : 1;
/* A sub key was generated. */
unsigned int sub : 1;
/* Internal to GPGME, do not use. */
unsigned int _unused : 30;
/* The fingerprint of the generated key. */
char *fpr;
};
typedef struct _gpgme_op_genkey_result *gpgme_genkey_result_t;
/* Generate a new keypair and add it to the keyring. PUBKEY and
SECKEY should be null for now. PARMS specifies what keys should be
generated. */
gpgme_error_t gpgme_op_genkey_start (gpgme_ctx_t ctx, const char *parms,
gpgme_data_t pubkey, gpgme_data_t seckey);
gpgme_error_t gpgme_op_genkey (gpgme_ctx_t ctx, const char *parms,
gpgme_data_t pubkey, gpgme_data_t seckey);
/* Retrieve a pointer to the result of the genkey operation. */
gpgme_genkey_result_t gpgme_op_genkey_result (gpgme_ctx_t ctx);
/* Delete KEY from the keyring. If ALLOW_SECRET is non-zero, secret
keys are also deleted. */
gpgme_error_t gpgme_op_delete_start (gpgme_ctx_t ctx, const gpgme_key_t key,
int allow_secret);
gpgme_error_t gpgme_op_delete (gpgme_ctx_t ctx, const gpgme_key_t key,
int allow_secret);
/* Edit the key KEY. Send status and command requests to FNC and
output of edit commands to OUT. */
gpgme_error_t gpgme_op_edit_start (gpgme_ctx_t ctx, gpgme_key_t key,
gpgme_edit_cb_t fnc, void *fnc_value,
gpgme_data_t out);
gpgme_error_t gpgme_op_edit (gpgme_ctx_t ctx, gpgme_key_t key,
gpgme_edit_cb_t fnc, void *fnc_value,
gpgme_data_t out);
/* Edit the card for the key KEY. Send status and command requests to
FNC and output of edit commands to OUT. */
gpgme_error_t gpgme_op_card_edit_start (gpgme_ctx_t ctx, gpgme_key_t key,
gpgme_edit_cb_t fnc, void *fnc_value,
gpgme_data_t out);
gpgme_error_t gpgme_op_card_edit (gpgme_ctx_t ctx, gpgme_key_t key,
gpgme_edit_cb_t fnc, void *fnc_value,
gpgme_data_t out);
/* Key management functions. */
struct _gpgme_op_keylist_result
{
unsigned int truncated : 1;
/* Internal to GPGME, do not use. */
unsigned int _unused : 31;
};
typedef struct _gpgme_op_keylist_result *gpgme_keylist_result_t;
/* Retrieve a pointer to the result of the key listing operation. */
gpgme_keylist_result_t gpgme_op_keylist_result (gpgme_ctx_t ctx);
/* Start a keylist operation within CTX, searching for keys which
match PATTERN. If SECRET_ONLY is true, only secret keys are
returned. */
gpgme_error_t gpgme_op_keylist_start (gpgme_ctx_t ctx, const char *pattern,
int secret_only);
gpgme_error_t gpgme_op_keylist_ext_start (gpgme_ctx_t ctx,
const char *pattern[],
int secret_only, int reserved);
/* Return the next key from the keylist in R_KEY. */
gpgme_error_t gpgme_op_keylist_next (gpgme_ctx_t ctx, gpgme_key_t *r_key);
/* Terminate a pending keylist operation within CTX. */
gpgme_error_t gpgme_op_keylist_end (gpgme_ctx_t ctx);
/* Trust items and operations. */
struct _gpgme_trust_item
{
/* Internal to GPGME, do not use. */
unsigned int _refs;
/* The key ID to which the trust item belongs. */
char *keyid;
/* Internal to GPGME, do not use. */
char _keyid[16 + 1];
/* The type of the trust item, 1 refers to a key, 2 to a user ID. */
int type;
/* The trust level. */
int level;
/* The owner trust if TYPE is 1. */
char *owner_trust;
/* Internal to GPGME, do not use. */
char _owner_trust[2];
/* The calculated validity. */
char *validity;
/* Internal to GPGME, do not use. */
char _validity[2];
/* The user name if TYPE is 2. */
char *name;
};
typedef struct _gpgme_trust_item *gpgme_trust_item_t;
/* Start a trustlist operation within CTX, searching for trust items
which match PATTERN. */
gpgme_error_t gpgme_op_trustlist_start (gpgme_ctx_t ctx,
const char *pattern, int max_level);
/* Return the next trust item from the trustlist in R_ITEM. */
gpgme_error_t gpgme_op_trustlist_next (gpgme_ctx_t ctx,
gpgme_trust_item_t *r_item);
/* Terminate a pending trustlist operation within CTX. */
gpgme_error_t gpgme_op_trustlist_end (gpgme_ctx_t ctx);
/* Acquire a reference to ITEM. */
void gpgme_trust_item_ref (gpgme_trust_item_t item);
/* Release a reference to ITEM. If this was the last one the trust
item is destroyed. */
void gpgme_trust_item_unref (gpgme_trust_item_t item);
/* Release the trust item ITEM. Deprecated, use
gpgme_trust_item_unref. */
void gpgme_trust_item_release (gpgme_trust_item_t item) _GPGME_DEPRECATED;
/* Return the value of the attribute WHAT of ITEM, which has to be
representable by a string. Deprecated, use trust item structure
directly. */
const char *gpgme_trust_item_get_string_attr (gpgme_trust_item_t item,
_gpgme_attr_t what,
const void *reserved, int idx)
_GPGME_DEPRECATED;
/* Return the value of the attribute WHAT of KEY, which has to be
representable by an integer. IDX specifies a running index if the
attribute appears more than once in the key. Deprecated, use trust
item structure directly. */
int gpgme_trust_item_get_int_attr (gpgme_trust_item_t item, _gpgme_attr_t what,
const void *reserved, int idx)
_GPGME_DEPRECATED;
/* Various functions. */
/* Check that the library fulfills the version requirement. */
const char *gpgme_check_version (const char *req_version);
/* Get the information about the configured and installed engines. A
pointer to the first engine in the statically allocated linked list
is returned in *INFO. If an error occurs, it is returned. The
returned data is valid until the next gpgme_set_engine_info. */
gpgme_error_t gpgme_get_engine_info (gpgme_engine_info_t *engine_info);
/* Set the default engine info for the protocol PROTO to the file name
FILE_NAME and the home directory HOME_DIR. */
gpgme_error_t gpgme_set_engine_info (gpgme_protocol_t proto,
const char *file_name,
const char *home_dir);
/* Engine support functions. */
/* Verify that the engine implementing PROTO is installed and
available. */
gpgme_error_t gpgme_engine_check_version (gpgme_protocol_t proto);
/* Deprecated types. */
typedef gpgme_ctx_t GpgmeCtx _GPGME_DEPRECATED;
typedef gpgme_data_t GpgmeData _GPGME_DEPRECATED;
typedef gpgme_error_t GpgmeError _GPGME_DEPRECATED;
typedef gpgme_data_encoding_t GpgmeDataEncoding _GPGME_DEPRECATED;
typedef gpgme_pubkey_algo_t GpgmePubKeyAlgo _GPGME_DEPRECATED;
typedef gpgme_hash_algo_t GpgmeHashAlgo _GPGME_DEPRECATED;
typedef gpgme_sig_stat_t GpgmeSigStat _GPGME_DEPRECATED;
typedef gpgme_sig_mode_t GpgmeSigMode _GPGME_DEPRECATED;
typedef gpgme_attr_t GpgmeAttr _GPGME_DEPRECATED;
typedef gpgme_validity_t GpgmeValidity _GPGME_DEPRECATED;
typedef gpgme_protocol_t GpgmeProtocol _GPGME_DEPRECATED;
typedef gpgme_engine_info_t GpgmeEngineInfo _GPGME_DEPRECATED;
typedef gpgme_subkey_t GpgmeSubkey _GPGME_DEPRECATED;
typedef gpgme_key_sig_t GpgmeKeySig _GPGME_DEPRECATED;
typedef gpgme_user_id_t GpgmeUserID _GPGME_DEPRECATED;
typedef gpgme_key_t GpgmeKey _GPGME_DEPRECATED;
typedef gpgme_passphrase_cb_t GpgmePassphraseCb _GPGME_DEPRECATED;
typedef gpgme_progress_cb_t GpgmeProgressCb _GPGME_DEPRECATED;
typedef gpgme_io_cb_t GpgmeIOCb _GPGME_DEPRECATED;
typedef gpgme_register_io_cb_t GpgmeRegisterIOCb _GPGME_DEPRECATED;
typedef gpgme_remove_io_cb_t GpgmeRemoveIOCb _GPGME_DEPRECATED;
typedef gpgme_event_io_t GpgmeEventIO _GPGME_DEPRECATED;
typedef gpgme_event_io_cb_t GpgmeEventIOCb _GPGME_DEPRECATED;
#define GpgmeIOCbs gpgme_io_cbs
typedef gpgme_data_read_cb_t GpgmeDataReadCb _GPGME_DEPRECATED;
typedef gpgme_data_write_cb_t GpgmeDataWriteCb _GPGME_DEPRECATED;
typedef gpgme_data_seek_cb_t GpgmeDataSeekCb _GPGME_DEPRECATED;
typedef gpgme_data_release_cb_t GpgmeDataReleaseCb _GPGME_DEPRECATED;
#define GpgmeDataCbs gpgme_data_cbs
typedef gpgme_encrypt_result_t GpgmeEncryptResult _GPGME_DEPRECATED;
typedef gpgme_sig_notation_t GpgmeSigNotation _GPGME_DEPRECATED;
typedef gpgme_signature_t GpgmeSignature _GPGME_DEPRECATED;
typedef gpgme_verify_result_t GpgmeVerifyResult _GPGME_DEPRECATED;
typedef gpgme_import_status_t GpgmeImportStatus _GPGME_DEPRECATED;
typedef gpgme_import_result_t GpgmeImportResult _GPGME_DEPRECATED;
typedef gpgme_genkey_result_t GpgmeGenKeyResult _GPGME_DEPRECATED;
typedef gpgme_trust_item_t GpgmeTrustItem _GPGME_DEPRECATED;
typedef gpgme_status_code_t GpgmeStatusCode _GPGME_DEPRECATED;
#ifdef __cplusplus
}
#endif
#endif /* GPGME_H */
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Mon, Dec 23, 5:26 PM (2 h, 8 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
dd/68/e8cedbc63cdac9f7df0597d79f48
Attached To
rM GPGME
Event Timeline
Log In to Comment