2003-05-18 Marcus Brinkmann <marcus@g10code.de>
In all files, replace the Gpgme* type names with the new gpgme_* type names. doc/ 2003-05-18 Marcus Brinkmann <marcus@g10code.de> * gpgme.texi (Header): Remove Gpgme as namespace prefix. Add _GPGME to namespace prefix. * gpgme.texi (Multi Threading): Add note about link order. gpgme/ 2003-05-18 Marcus Brinkmann <marcus@g10code.de> * gpgme.h: The following types are renamed. The old name is kept as a deprecated typedef. (GpgmeCtx): Rename to gpgme_ctx_t. (GpgmeData): Rename to gpgme_data_t. (GpgmeRecipients): Rename to gpgme_recipients_t. (GpgmeError): Rename to gpgme_error_t. (GpgmeDataEncoding): Rename to gpgme_data_encoding_t. (GpgmePubKeyAlgo): Rename to gpgme_pubkey_algo_t. (GpgmeHashAlgo): Rename to gpgme_hash_algo_t. (GpgmeSigStat): Rename to gpgme_sig_stat_t. (GpgmeSigMode): Rename to gpgme_sig_mode_t. (GpgmeAttr): Rename to gpgme_attr_t. (GpgmeValidity): Rename to gpgme_validity_t. (GpgmeProtocol): Rename to gpgme_protocol_t. (GpgmeStatusCode): Rename to gpgme_status_code_t. (GpgmeEngineInfo): Rename to gpgme_engine_info_t. (GpgmeSubkey): Rename to gpgme_subkey_t. (GpgmeKeySig): Rename to gpgme_keysig_t. (GpgmeUserID): Rename to gpgme_user_id_t. (GpgmePassphraseCb): Rename to gpgme_passphrase_cb_t. (GpgmeProgressCb): Rename to gpgme_progress_cb_t. (GpgmeEditCb): Rename to gpgme_edit_cb_t. (GpgmeIOCb): Rename to gpgme_io_cb_t. (GpgmeRegisterIOCb): Rename to gpgme_register_io_cb_t. (GpgmeRemoveIOCb): Rename to gpgme_remove_io_cb_t. (GpgmeEventIO): Rename to gpgme_event_io_t. (GpgmeEventIOCb): Rename to gpgme_event_io_cb_t. (GpgmeIOCbs): Rename to gpgme_io_cbs. (gpgme_io_cbs_t): New type. (GpgmeDataReadCb): Rename to gpgme_data_read_cb_t. (GpgmeDataWriteCb): Rename to gpgme_data_write_cb_t. (GpgmeDataSeekCb): Rename to gpgme_data_seek_cb_t. (GpgmeDataReleaseCb): Rename to gpgme_data_release_cb_t. (GpgmeDataCbs): Rename to gpgme_data_cbs. (gpgme_data_cbs_t): New type. (GpgmeInvalidUserID): Rename to gpgme_invalid_user_id_t. (GpgmeEncryptResult): Rename to gpgme_encrypt_result_t. (GpgmeDecryptResult): Rename to gpgme_decrypt_result_t. (GpgmeNewSignature): Rename to gpgme_new_signature_t. (GpgmeSignResult): Rename to gpgme_sign_result_t. (GpgmeSigNotation): Rename to gpgme_sig_notation_t. (GpgmeSignature): Rename to gpgme_signature_t. (GpgmeVerifyResult): Rename to gpgme_verify_result_t. (GpgmeImportStatus): Rename to gpgme_import_status_t. (GpgmeImportResult): Rename to gpgme_import_result_t. (GpgmeGenKeyResult): Rename to gpgme_genkey_result_t. (GpgmeKeyListResult): Rename to gpgme_keylist_result_t. (GpgmeTrustItem): Rename to gpgme_trust_item_t. * gpgme.h (gpgme_deprecated_error_t): New type, swallowing macros GPGME_No_Recipients, GPGME_Invalid_Recipient and GPGME_No_Passphrase. * data.h (struct gpgme_data_s): Rename to struct gpgme_data. * context.h (struct gpgme_context_s): Rename to struct gpgme_context. (struct gpgme_recipients_s): Rename to gpgme_recipients.
This commit is contained in:
parent
ce1878d7e9
commit
0a882398e1
@ -1,3 +1,8 @@
|
||||
2003-05-18 Marcus Brinkmann <marcus@g10code.de>
|
||||
|
||||
In all files, replace the Gpgme* type names with the new gpgme_*
|
||||
type names.
|
||||
|
||||
2003-02-01 Marcus Brinkmann <marcus@g10code.de>
|
||||
|
||||
* assuan/: Update files to 2002-11-10 version of assuan.
|
||||
|
159
NEWS
159
NEWS
@ -1,15 +1,52 @@
|
||||
Noteworthy changes in version 0.4.1 (unreleased)
|
||||
------------------------------------------------
|
||||
|
||||
* If gpgme.h is included in sources compiled by GCC 3.1 or later,
|
||||
deprecated attributes will warn about use of obsolete functions and
|
||||
typedefs. The use of obsolete error values will appear as the use
|
||||
of an obsolete type _gpgme_deprecated_error_t. 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
|
||||
GpgmeRecipients gpgme_recipients_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_ATTR_IS_SECRET is not anymore representable as a string.
|
||||
|
||||
* 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.
|
||||
|
||||
* GpgmeIOCb changed from a void function to a function returning a
|
||||
GpgmeError value. However, it will always return 0, so you can
|
||||
safely ignore the return value.
|
||||
* 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
|
||||
@ -30,17 +67,17 @@ Noteworthy changes in version 0.4.1 (unreleased)
|
||||
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 GpgmeEngineInfo is
|
||||
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
|
||||
GpgmeProtocol value into a string.
|
||||
gpgme_protocol_t value into a string.
|
||||
|
||||
* The GpgmePassphraseCb type now returns a GpgmeError value, and
|
||||
returns the password string in a new parameter. The gpgme_cancel
|
||||
function has been removed, just return GPGME_Canceled in the
|
||||
passphrase callback directly.
|
||||
* The gpgme_passphrase_cb_t type now returns a gpgme_error_t value,
|
||||
and returns the password string in a new parameter. The
|
||||
gpgme_cancel function has been removed, just return GPGME_Canceled
|
||||
in the passphrase callback directly.
|
||||
|
||||
* The status of a context operation is not checked anymore, so the
|
||||
errors GPGME_Busy and GPGME_No_Request can not occur anymore.
|
||||
@ -51,7 +88,7 @@ Noteworthy changes in version 0.4.1 (unreleased)
|
||||
GPGME_Invalid_UserID and GPGME_Bad_Passphrase resp.
|
||||
|
||||
* The FPR argument to gpgme_op_genkey was removed. Instead, use the
|
||||
gpgme_op_genkey_result function to retrieve a GpgmeGenKeyResult
|
||||
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.
|
||||
@ -65,7 +102,7 @@ Noteworthy changes in version 0.4.1 (unreleased)
|
||||
|
||||
you should now do:
|
||||
|
||||
GpgmeGenKeyResult result;
|
||||
gpgme_genkey_result_t result;
|
||||
err = gpgme_op_genkey (ctx, NULL, NULL);
|
||||
if (!err)
|
||||
{
|
||||
@ -76,12 +113,12 @@ Noteworthy changes in version 0.4.1 (unreleased)
|
||||
|
||||
* The new gpgme_op_import_result function provides detailed
|
||||
information about the result of an import operation in
|
||||
GpgmeImportResult and GpgmeImportStatus objects. Thus, the
|
||||
gpgme_op_import_ext variant is deprecated.
|
||||
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 GpgmeSignResult,
|
||||
GpgmeInvalidUserID and GpgmeNewSignature objects.
|
||||
about the result of a signing operation in gpgme_sign_result_t,
|
||||
gpgme_invalid_user_id_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
|
||||
@ -129,15 +166,67 @@ Noteworthy changes in version 0.4.1 (unreleased)
|
||||
|
||||
* Interface changes relative to the 0.4.0 release:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
GpgmeIOCb CHANGED: Return type from void to GpgmeError.
|
||||
GpgmeEventIO CHANGED: New event type (all numbers changed).
|
||||
GpgmeCtx DEPRECATED: Use gpgme_ctx_t.
|
||||
GpgmeData DEPRECATED: Use gpgme_data_t.
|
||||
GpgmeRecipients DEPRECATED: Use gpgme_recipients_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_io_cb_t CHANGED: Return type from void to GpgmeError.
|
||||
gpgme_event_io_t CHANGED: New event type (all numbers changed).
|
||||
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
|
||||
GpgmeEngineInfo NEW
|
||||
gpgme_engine_info_t NEW
|
||||
gpgme_get_engine_info CHANGED: Return info structure instead XML.
|
||||
gpgme_get_protocol_name NEW
|
||||
GpgmePassphraseCb CHANGED: Return error value, new argument.
|
||||
@ -152,24 +241,24 @@ GPGME_No_Passphrase DEPRECATED: Use GPGME_Bad_Passphrase.
|
||||
GPGME_Bad_Passphrase NEW
|
||||
gpgme_op_genkey CHANGED: FPR argument dropped.
|
||||
gpgme_op_genkey_result NEW
|
||||
GpgmeGenKeyResult NEW
|
||||
gpgme_genkey_result_t NEW
|
||||
gpgme_op_import_ext DEPRECATED: Use gpgme_op_import_result.
|
||||
gpgme_op_import_result NEW
|
||||
GpgmeImportStatus NEW
|
||||
GpgmeImportResult NEW
|
||||
GpgmePubKeyAlgo NEW
|
||||
GpgmeHashAlgo NEW
|
||||
GpgmeInvalidUserID NEW
|
||||
GpgmeNewSignature NEW
|
||||
GpgmeSignResult NEW
|
||||
gpgme_import_status_t NEW
|
||||
gpgme_import_result_t NEW
|
||||
gpgme_pubkey_algo_t NEW
|
||||
gpgme_hash_algo_t NEW
|
||||
gpgme_invalid_user_id_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
|
||||
GpgmeEncryptResult NEW
|
||||
gpgme_encrypt_result_t NEW
|
||||
gpgme_op_encrypt_result NEW
|
||||
GpgmeDecryptResult NEW
|
||||
gpgme_decrypt_result_t NEW
|
||||
gpgme_op_decrypt_result NEW
|
||||
GpgmeVerifyResult 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.
|
||||
@ -177,23 +266,23 @@ 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.
|
||||
GpgmeTrustItem CHANGED: Now has user accessible data members.
|
||||
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.
|
||||
GpgmeSubKey NEW
|
||||
GpgmeKeySig NEW
|
||||
GpgmeUserID NEW
|
||||
GpgmeKey CHANGED: Now has user accessible data members.
|
||||
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
|
||||
GpgmeKeyListResult NEW
|
||||
gpgme_key_list_result_t NEW
|
||||
gpgme_op_keylist_result NEW
|
||||
gpgme_get_op_info REMOVED
|
||||
GPGME_Invalid_Type DEPRECATED
|
||||
|
5
TODO
5
TODO
@ -1,7 +1,7 @@
|
||||
Hey Emacs, this is -*- outline -*- mode!
|
||||
|
||||
* ABI's to break:
|
||||
** Change GpgmeRecipient stuff to GpgmeUserID (encrypt, export, ...).
|
||||
** Change gpgme_recipient_t stuff to gpgme_user_id_t (encrypt, export, ...).
|
||||
** Compatibility interfaces that can be removed in future versions:
|
||||
*** gpgme_data_new_from_filepart
|
||||
*** gpgme_data_new_from_file
|
||||
@ -19,8 +19,9 @@ Hey Emacs, this is -*- outline -*- mode!
|
||||
*** gpgme_trust_item_release
|
||||
*** gpgme_trust_item_get_string_attr
|
||||
*** gpgme_trust_item_get_ulong_attr
|
||||
*** GpgmeAttr
|
||||
*** gpgme_attr_t
|
||||
*** GPGME_Invalid_Type, GPGME_Invalid_Mode
|
||||
*** All Gpgme* typedefs.
|
||||
|
||||
* Thread support:
|
||||
** Build thread modules for static linking (which just suck in the
|
||||
|
@ -1,3 +1,9 @@
|
||||
2003-05-18 Marcus Brinkmann <marcus@g10code.de>
|
||||
|
||||
* gpgme.texi (Header): Remove Gpgme as namespace prefix. Add
|
||||
_GPGME to namespace prefix.
|
||||
* gpgme.texi (Multi Threading): Add note about link order.
|
||||
|
||||
2003-05-04 Marcus Brinkmann <marcus@g10code.de>
|
||||
|
||||
* gpgme.texi (Listing Keys): Document what happens if key is not
|
||||
|
634
doc/gpgme.texi
634
doc/gpgme.texi
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,61 @@
|
||||
2003-05-18 Marcus Brinkmann <marcus@g10code.de>
|
||||
|
||||
* gpgme.h: The following types are renamed. The old name is kept
|
||||
as a deprecated typedef.
|
||||
(GpgmeCtx): Rename to gpgme_ctx_t.
|
||||
(GpgmeData): Rename to gpgme_data_t.
|
||||
(GpgmeRecipients): Rename to gpgme_recipients_t.
|
||||
(GpgmeError): Rename to gpgme_error_t.
|
||||
(GpgmeDataEncoding): Rename to gpgme_data_encoding_t.
|
||||
(GpgmePubKeyAlgo): Rename to gpgme_pubkey_algo_t.
|
||||
(GpgmeHashAlgo): Rename to gpgme_hash_algo_t.
|
||||
(GpgmeSigStat): Rename to gpgme_sig_stat_t.
|
||||
(GpgmeSigMode): Rename to gpgme_sig_mode_t.
|
||||
(GpgmeAttr): Rename to gpgme_attr_t.
|
||||
(GpgmeValidity): Rename to gpgme_validity_t.
|
||||
(GpgmeProtocol): Rename to gpgme_protocol_t.
|
||||
(GpgmeStatusCode): Rename to gpgme_status_code_t.
|
||||
(GpgmeEngineInfo): Rename to gpgme_engine_info_t.
|
||||
(GpgmeSubkey): Rename to gpgme_subkey_t.
|
||||
(GpgmeKeySig): Rename to gpgme_keysig_t.
|
||||
(GpgmeUserID): Rename to gpgme_user_id_t.
|
||||
(GpgmePassphraseCb): Rename to gpgme_passphrase_cb_t.
|
||||
(GpgmeProgressCb): Rename to gpgme_progress_cb_t.
|
||||
(GpgmeEditCb): Rename to gpgme_edit_cb_t.
|
||||
(GpgmeIOCb): Rename to gpgme_io_cb_t.
|
||||
(GpgmeRegisterIOCb): Rename to gpgme_register_io_cb_t.
|
||||
(GpgmeRemoveIOCb): Rename to gpgme_remove_io_cb_t.
|
||||
(GpgmeEventIO): Rename to gpgme_event_io_t.
|
||||
(GpgmeEventIOCb): Rename to gpgme_event_io_cb_t.
|
||||
(GpgmeIOCbs): Rename to gpgme_io_cbs.
|
||||
(gpgme_io_cbs_t): New type.
|
||||
(GpgmeDataReadCb): Rename to gpgme_data_read_cb_t.
|
||||
(GpgmeDataWriteCb): Rename to gpgme_data_write_cb_t.
|
||||
(GpgmeDataSeekCb): Rename to gpgme_data_seek_cb_t.
|
||||
(GpgmeDataReleaseCb): Rename to gpgme_data_release_cb_t.
|
||||
(GpgmeDataCbs): Rename to gpgme_data_cbs.
|
||||
(gpgme_data_cbs_t): New type.
|
||||
(GpgmeInvalidUserID): Rename to gpgme_invalid_user_id_t.
|
||||
(GpgmeEncryptResult): Rename to gpgme_encrypt_result_t.
|
||||
(GpgmeDecryptResult): Rename to gpgme_decrypt_result_t.
|
||||
(GpgmeNewSignature): Rename to gpgme_new_signature_t.
|
||||
(GpgmeSignResult): Rename to gpgme_sign_result_t.
|
||||
(GpgmeSigNotation): Rename to gpgme_sig_notation_t.
|
||||
(GpgmeSignature): Rename to gpgme_signature_t.
|
||||
(GpgmeVerifyResult): Rename to gpgme_verify_result_t.
|
||||
(GpgmeImportStatus): Rename to gpgme_import_status_t.
|
||||
(GpgmeImportResult): Rename to gpgme_import_result_t.
|
||||
(GpgmeGenKeyResult): Rename to gpgme_genkey_result_t.
|
||||
(GpgmeKeyListResult): Rename to gpgme_keylist_result_t.
|
||||
(GpgmeTrustItem): Rename to gpgme_trust_item_t.
|
||||
* gpgme.h (gpgme_deprecated_error_t): New type, swallowing macros
|
||||
GPGME_No_Recipients, GPGME_Invalid_Recipient and
|
||||
GPGME_No_Passphrase.
|
||||
* data.h (struct gpgme_data_s): Rename to struct gpgme_data.
|
||||
* context.h (struct gpgme_context_s): Rename to struct
|
||||
gpgme_context.
|
||||
(struct gpgme_recipients_s): Rename to gpgme_recipients.
|
||||
|
||||
2003-05-18 Marcus Brinkmann <marcus@g10code.de>
|
||||
|
||||
* keylist.c (finish_key): Clear OPD->tmp_uid.
|
||||
|
@ -58,10 +58,10 @@ struct ctx_op_data
|
||||
|
||||
/* The context defines an environment in which crypto operations can
|
||||
be performed (sequentially). */
|
||||
struct gpgme_context_s
|
||||
struct gpgme_context
|
||||
{
|
||||
/* The protocol used by this context. */
|
||||
GpgmeProtocol protocol;
|
||||
gpgme_protocol_t protocol;
|
||||
|
||||
/* The running engine process. */
|
||||
EngineObject engine;
|
||||
@ -83,31 +83,31 @@ struct gpgme_context_s
|
||||
|
||||
/* Size of the following array. */
|
||||
unsigned int signers_size;
|
||||
GpgmeKey *signers;
|
||||
gpgme_key_t *signers;
|
||||
|
||||
/* The operation data hooked into the context. */
|
||||
struct ctx_op_data *op_data;
|
||||
|
||||
/* The user provided passphrase callback and its hook value. */
|
||||
GpgmePassphraseCb passphrase_cb;
|
||||
gpgme_passphrase_cb_t passphrase_cb;
|
||||
void *passphrase_cb_value;
|
||||
|
||||
/* The user provided progress callback and its hook value. */
|
||||
GpgmeProgressCb progress_cb;
|
||||
gpgme_progress_cb_t progress_cb;
|
||||
void *progress_cb_value;
|
||||
|
||||
/* A list of file descriptors in active use by the current
|
||||
operation. */
|
||||
struct fd_table fdt;
|
||||
struct GpgmeIOCbs io_cbs;
|
||||
struct gpgme_io_cbs io_cbs;
|
||||
};
|
||||
|
||||
|
||||
/* A recipient is defined by a user ID, but we define it as an opaque
|
||||
type for the user. */
|
||||
struct gpgme_recipients_s
|
||||
struct gpgme_recipients
|
||||
{
|
||||
GpgmeUserID list;
|
||||
gpgme_user_id_t list;
|
||||
};
|
||||
|
||||
#endif /* CONTEXT_H */
|
||||
|
@ -63,7 +63,7 @@ _gpgme_hextobyte (const unsigned char *str)
|
||||
the result. Currently, LEN is only used to specify if allocation
|
||||
is desired or not, the caller is expected to make sure that *DESTP
|
||||
is large enough if LEN is not zero. */
|
||||
GpgmeError
|
||||
gpgme_error_t
|
||||
_gpgme_decode_c_string (const char *src, char **destp, int len)
|
||||
{
|
||||
char *dest;
|
||||
@ -165,7 +165,7 @@ _gpgme_decode_c_string (const char *src, char **destp, int len)
|
||||
the result. Currently, LEN is only used to specify if allocation
|
||||
is desired or not, the caller is expected to make sure that *DESTP
|
||||
is large enough if LEN is not zero. */
|
||||
GpgmeError
|
||||
gpgme_error_t
|
||||
_gpgme_decode_percent_string (const char *src, char **destp, int len)
|
||||
{
|
||||
char *dest;
|
||||
@ -234,7 +234,7 @@ _gpgme_decode_percent_string (const char *src, char **destp, int len)
|
||||
static struct
|
||||
{
|
||||
char *name;
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
} gnupg_errors[] =
|
||||
{
|
||||
{ "EOF", GPGME_EOF },
|
||||
@ -318,7 +318,7 @@ static struct
|
||||
};
|
||||
|
||||
|
||||
GpgmeError
|
||||
gpgme_error_t
|
||||
_gpgme_map_gnupg_error (char *err)
|
||||
{
|
||||
int i;
|
||||
|
@ -32,11 +32,11 @@
|
||||
/* Create a new data buffer filled with LENGTH bytes starting from
|
||||
OFFSET within the file FNAME or stream STREAM (exactly one must be
|
||||
non-zero). */
|
||||
GpgmeError
|
||||
gpgme_data_new_from_filepart (GpgmeData *dh, const char *fname, FILE *stream,
|
||||
off_t offset, size_t length)
|
||||
gpgme_error_t
|
||||
gpgme_data_new_from_filepart (gpgme_data_t *dh, const char *fname,
|
||||
FILE *stream, off_t offset, size_t length)
|
||||
{
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
char *buf = NULL;
|
||||
|
||||
if (stream && fname)
|
||||
@ -92,8 +92,8 @@ gpgme_data_new_from_filepart (GpgmeData *dh, const char *fname, FILE *stream,
|
||||
|
||||
/* Create a new data buffer filled with the content of file FNAME.
|
||||
COPY must be non-zero (delayed reads are not supported yet). */
|
||||
GpgmeError
|
||||
gpgme_data_new_from_file (GpgmeData *dh, const char *fname, int copy)
|
||||
gpgme_error_t
|
||||
gpgme_data_new_from_file (gpgme_data_t *dh, const char *fname, int copy)
|
||||
{
|
||||
struct stat statbuf;
|
||||
|
||||
@ -108,7 +108,7 @@ gpgme_data_new_from_file (GpgmeData *dh, const char *fname, int copy)
|
||||
|
||||
|
||||
static int
|
||||
gpgme_error_to_errno (GpgmeError err)
|
||||
gpgme_error_to_errno (gpgme_error_t err)
|
||||
{
|
||||
switch (err)
|
||||
{
|
||||
@ -131,10 +131,10 @@ gpgme_error_to_errno (GpgmeError err)
|
||||
}
|
||||
|
||||
static ssize_t
|
||||
old_user_read (GpgmeData dh, void *buffer, size_t size)
|
||||
old_user_read (gpgme_data_t dh, void *buffer, size_t size)
|
||||
{
|
||||
size_t amt;
|
||||
GpgmeError err = (*dh->data.old_user.cb) (dh->data.old_user.handle,
|
||||
gpgme_error_t err = (*dh->data.old_user.cb) (dh->data.old_user.handle,
|
||||
buffer, size, &amt);
|
||||
if (err)
|
||||
return gpgme_error_to_errno (err);
|
||||
@ -143,9 +143,9 @@ old_user_read (GpgmeData dh, void *buffer, size_t size)
|
||||
|
||||
|
||||
static off_t
|
||||
old_user_seek (GpgmeData dh, off_t offset, int whence)
|
||||
old_user_seek (gpgme_data_t dh, off_t offset, int whence)
|
||||
{
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
if (whence != SEEK_SET || offset)
|
||||
return EINVAL;
|
||||
err = (*dh->data.old_user.cb) (dh->data.old_user.handle, NULL, 0, NULL);
|
||||
@ -155,7 +155,7 @@ old_user_seek (GpgmeData dh, off_t offset, int whence)
|
||||
}
|
||||
|
||||
|
||||
static struct gpgme_data_cbs old_user_cbs =
|
||||
static struct _gpgme_data_cbs old_user_cbs =
|
||||
{
|
||||
old_user_read,
|
||||
NULL,
|
||||
@ -166,12 +166,12 @@ static struct gpgme_data_cbs old_user_cbs =
|
||||
|
||||
/* Create a new data buffer which retrieves the data from the callback
|
||||
function READ_CB. */
|
||||
GpgmeError
|
||||
gpgme_data_new_with_read_cb (GpgmeData *dh,
|
||||
gpgme_error_t
|
||||
gpgme_data_new_with_read_cb (gpgme_data_t *dh,
|
||||
int (*read_cb) (void *, char *, size_t, size_t *),
|
||||
void *read_cb_value)
|
||||
{
|
||||
GpgmeError err = _gpgme_data_new (dh, &old_user_cbs);
|
||||
gpgme_error_t err = _gpgme_data_new (dh, &old_user_cbs);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
@ -181,8 +181,8 @@ gpgme_data_new_with_read_cb (GpgmeData *dh,
|
||||
}
|
||||
|
||||
|
||||
GpgmeError
|
||||
gpgme_data_rewind (GpgmeData dh)
|
||||
gpgme_error_t
|
||||
gpgme_data_rewind (gpgme_data_t dh)
|
||||
{
|
||||
return (gpgme_data_seek (dh, 0, SEEK_SET) == -1)
|
||||
? GPGME_File_Error : 0;
|
||||
|
@ -28,27 +28,27 @@
|
||||
|
||||
|
||||
static ssize_t
|
||||
fd_read (GpgmeData dh, void *buffer, size_t size)
|
||||
fd_read (gpgme_data_t dh, void *buffer, size_t size)
|
||||
{
|
||||
return read (dh->data.fd, buffer, size);
|
||||
}
|
||||
|
||||
|
||||
static ssize_t
|
||||
fd_write (GpgmeData dh, const void *buffer, size_t size)
|
||||
fd_write (gpgme_data_t dh, const void *buffer, size_t size)
|
||||
{
|
||||
return write (dh->data.fd, buffer, size);
|
||||
}
|
||||
|
||||
|
||||
static off_t
|
||||
fd_seek (GpgmeData dh, off_t offset, int whence)
|
||||
fd_seek (gpgme_data_t dh, off_t offset, int whence)
|
||||
{
|
||||
return lseek (dh->data.fd, offset, whence);
|
||||
}
|
||||
|
||||
|
||||
static struct gpgme_data_cbs fd_cbs =
|
||||
static struct _gpgme_data_cbs fd_cbs =
|
||||
{
|
||||
fd_read,
|
||||
fd_write,
|
||||
@ -57,10 +57,10 @@ static struct gpgme_data_cbs fd_cbs =
|
||||
};
|
||||
|
||||
|
||||
GpgmeError
|
||||
gpgme_data_new_from_fd (GpgmeData *dh, int fd)
|
||||
gpgme_error_t
|
||||
gpgme_data_new_from_fd (gpgme_data_t *dh, int fd)
|
||||
{
|
||||
GpgmeError err = _gpgme_data_new (dh, &fd_cbs);
|
||||
gpgme_error_t err = _gpgme_data_new (dh, &fd_cbs);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
||||
|
||||
|
||||
static ssize_t
|
||||
mem_read (GpgmeData dh, void *buffer, size_t size)
|
||||
mem_read (gpgme_data_t dh, void *buffer, size_t size)
|
||||
{
|
||||
size_t amt = dh->data.mem.length - dh->data.mem.offset;
|
||||
const char *src;
|
||||
@ -51,7 +51,7 @@ mem_read (GpgmeData dh, void *buffer, size_t size)
|
||||
|
||||
|
||||
static ssize_t
|
||||
mem_write (GpgmeData dh, const void *buffer, size_t size)
|
||||
mem_write (gpgme_data_t dh, const void *buffer, size_t size)
|
||||
{
|
||||
size_t unused;
|
||||
|
||||
@ -104,7 +104,7 @@ mem_write (GpgmeData dh, const void *buffer, size_t size)
|
||||
|
||||
|
||||
static off_t
|
||||
mem_seek (GpgmeData dh, off_t offset, int whence)
|
||||
mem_seek (gpgme_data_t dh, off_t offset, int whence)
|
||||
{
|
||||
switch (whence)
|
||||
{
|
||||
@ -142,14 +142,14 @@ mem_seek (GpgmeData dh, off_t offset, int whence)
|
||||
|
||||
|
||||
static void
|
||||
mem_release (GpgmeData dh)
|
||||
mem_release (gpgme_data_t dh)
|
||||
{
|
||||
if (dh->data.mem.buffer)
|
||||
free (dh->data.mem.buffer);
|
||||
}
|
||||
|
||||
|
||||
static struct gpgme_data_cbs mem_cbs =
|
||||
static struct _gpgme_data_cbs mem_cbs =
|
||||
{
|
||||
mem_read,
|
||||
mem_write,
|
||||
@ -158,10 +158,10 @@ static struct gpgme_data_cbs mem_cbs =
|
||||
};
|
||||
|
||||
|
||||
GpgmeError
|
||||
gpgme_data_new (GpgmeData *dh)
|
||||
gpgme_error_t
|
||||
gpgme_data_new (gpgme_data_t *dh)
|
||||
{
|
||||
GpgmeError err = _gpgme_data_new (dh, &mem_cbs);
|
||||
gpgme_error_t err = _gpgme_data_new (dh, &mem_cbs);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
@ -172,11 +172,11 @@ gpgme_data_new (GpgmeData *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. */
|
||||
GpgmeError
|
||||
gpgme_data_new_from_mem (GpgmeData *dh, const char *buffer,
|
||||
gpgme_error_t
|
||||
gpgme_data_new_from_mem (gpgme_data_t *dh, const char *buffer,
|
||||
size_t size, int copy)
|
||||
{
|
||||
GpgmeError err = _gpgme_data_new (dh, &mem_cbs);
|
||||
gpgme_error_t err = _gpgme_data_new (dh, &mem_cbs);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
@ -198,7 +198,7 @@ gpgme_data_new_from_mem (GpgmeData *dh, const char *buffer,
|
||||
|
||||
|
||||
char *
|
||||
gpgme_data_release_and_get_mem (GpgmeData dh, size_t *r_len)
|
||||
gpgme_data_release_and_get_mem (gpgme_data_t dh, size_t *r_len)
|
||||
{
|
||||
char *str = NULL;
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
||||
|
||||
|
||||
static ssize_t
|
||||
stream_read (GpgmeData dh, void *buffer, size_t size)
|
||||
stream_read (gpgme_data_t dh, void *buffer, size_t size)
|
||||
{
|
||||
size_t amt = fread (buffer, 1, size, dh->data.stream);
|
||||
if (amt > 0)
|
||||
@ -38,7 +38,7 @@ stream_read (GpgmeData dh, void *buffer, size_t size)
|
||||
|
||||
|
||||
static ssize_t
|
||||
stream_write (GpgmeData dh, const void *buffer, size_t size)
|
||||
stream_write (gpgme_data_t dh, const void *buffer, size_t size)
|
||||
{
|
||||
size_t amt = fwrite (buffer, 1, size, dh->data.stream);
|
||||
if (amt > 0)
|
||||
@ -48,13 +48,13 @@ stream_write (GpgmeData dh, const void *buffer, size_t size)
|
||||
|
||||
|
||||
static off_t
|
||||
stream_seek (GpgmeData dh, off_t offset, int whence)
|
||||
stream_seek (gpgme_data_t dh, off_t offset, int whence)
|
||||
{
|
||||
return fseek (dh->data.stream, offset, whence);
|
||||
}
|
||||
|
||||
|
||||
static struct gpgme_data_cbs stream_cbs =
|
||||
static struct _gpgme_data_cbs stream_cbs =
|
||||
{
|
||||
stream_read,
|
||||
stream_write,
|
||||
@ -63,10 +63,10 @@ static struct gpgme_data_cbs stream_cbs =
|
||||
};
|
||||
|
||||
|
||||
GpgmeError
|
||||
gpgme_data_new_from_stream (GpgmeData *dh, FILE *stream)
|
||||
gpgme_error_t
|
||||
gpgme_data_new_from_stream (gpgme_data_t *dh, FILE *stream)
|
||||
{
|
||||
GpgmeError err = _gpgme_data_new (dh, &stream_cbs);
|
||||
gpgme_error_t err = _gpgme_data_new (dh, &stream_cbs);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
|
@ -27,34 +27,34 @@
|
||||
|
||||
|
||||
static ssize_t
|
||||
user_read (GpgmeData dh, void *buffer, size_t size)
|
||||
user_read (gpgme_data_t dh, void *buffer, size_t size)
|
||||
{
|
||||
return (*dh->data.user.cbs->read) (dh->data.user.handle, buffer, size);
|
||||
}
|
||||
|
||||
|
||||
static ssize_t
|
||||
user_write (GpgmeData dh, const void *buffer, size_t size)
|
||||
user_write (gpgme_data_t dh, const void *buffer, size_t size)
|
||||
{
|
||||
return (*dh->data.user.cbs->write) (dh->data.user.handle, buffer, size);
|
||||
}
|
||||
|
||||
|
||||
static off_t
|
||||
user_seek (GpgmeData dh, off_t offset, int whence)
|
||||
user_seek (gpgme_data_t dh, off_t offset, int whence)
|
||||
{
|
||||
return (*dh->data.user.cbs->seek) (dh->data.user.handle, offset, whence);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
user_release (GpgmeData dh)
|
||||
user_release (gpgme_data_t dh)
|
||||
{
|
||||
(*dh->data.user.cbs->release) (dh->data.user.handle);
|
||||
}
|
||||
|
||||
|
||||
static struct gpgme_data_cbs user_cbs =
|
||||
static struct _gpgme_data_cbs user_cbs =
|
||||
{
|
||||
user_read,
|
||||
user_write,
|
||||
@ -63,10 +63,10 @@ static struct gpgme_data_cbs user_cbs =
|
||||
};
|
||||
|
||||
|
||||
GpgmeError
|
||||
gpgme_data_new_from_cbs (GpgmeData *dh, struct GpgmeDataCbs *cbs, void *handle)
|
||||
gpgme_error_t
|
||||
gpgme_data_new_from_cbs (gpgme_data_t *dh, gpgme_data_cbs_t cbs, void *handle)
|
||||
{
|
||||
GpgmeError err = _gpgme_data_new (dh, &user_cbs);
|
||||
gpgme_error_t err = _gpgme_data_new (dh, &user_cbs);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
|
32
gpgme/data.c
32
gpgme/data.c
@ -33,10 +33,10 @@
|
||||
#include "io.h"
|
||||
|
||||
|
||||
GpgmeError
|
||||
_gpgme_data_new (GpgmeData *r_dh, struct gpgme_data_cbs *cbs)
|
||||
gpgme_error_t
|
||||
_gpgme_data_new (gpgme_data_t *r_dh, struct _gpgme_data_cbs *cbs)
|
||||
{
|
||||
GpgmeData dh;
|
||||
gpgme_data_t dh;
|
||||
|
||||
if (!r_dh)
|
||||
return GPGME_Invalid_Value;
|
||||
@ -54,7 +54,7 @@ _gpgme_data_new (GpgmeData *r_dh, struct gpgme_data_cbs *cbs)
|
||||
|
||||
|
||||
void
|
||||
_gpgme_data_release (GpgmeData dh)
|
||||
_gpgme_data_release (gpgme_data_t dh)
|
||||
{
|
||||
if (dh)
|
||||
free (dh);
|
||||
@ -65,7 +65,7 @@ _gpgme_data_release (GpgmeData dh)
|
||||
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 (GpgmeData dh, void *buffer, size_t size)
|
||||
gpgme_data_read (gpgme_data_t dh, void *buffer, size_t size)
|
||||
{
|
||||
if (!dh)
|
||||
{
|
||||
@ -85,7 +85,7 @@ gpgme_data_read (GpgmeData dh, void *buffer, size_t size)
|
||||
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 (GpgmeData dh, const void *buffer, size_t size)
|
||||
gpgme_data_write (gpgme_data_t dh, const void *buffer, size_t size)
|
||||
{
|
||||
if (!dh)
|
||||
{
|
||||
@ -105,7 +105,7 @@ gpgme_data_write (GpgmeData dh, const void *buffer, size_t size)
|
||||
in the data object with the handle DH to OFFSET, relativ to
|
||||
WHENCE. */
|
||||
off_t
|
||||
gpgme_data_seek (GpgmeData dh, off_t offset, int whence)
|
||||
gpgme_data_seek (gpgme_data_t dh, off_t offset, int whence)
|
||||
{
|
||||
if (!dh)
|
||||
{
|
||||
@ -123,7 +123,7 @@ gpgme_data_seek (GpgmeData dh, off_t offset, int whence)
|
||||
|
||||
/* Release the data object with the handle DH. */
|
||||
void
|
||||
gpgme_data_release (GpgmeData dh)
|
||||
gpgme_data_release (gpgme_data_t dh)
|
||||
{
|
||||
if (!dh)
|
||||
return;
|
||||
@ -136,8 +136,8 @@ gpgme_data_release (GpgmeData dh)
|
||||
|
||||
/* Get the current encoding meta information for the data object with
|
||||
handle DH. */
|
||||
GpgmeDataEncoding
|
||||
gpgme_data_get_encoding (GpgmeData dh)
|
||||
gpgme_data_encoding_t
|
||||
gpgme_data_get_encoding (gpgme_data_t dh)
|
||||
{
|
||||
return dh ? dh->encoding : GPGME_DATA_ENCODING_NONE;
|
||||
}
|
||||
@ -145,8 +145,8 @@ gpgme_data_get_encoding (GpgmeData dh)
|
||||
|
||||
/* Set the encoding meta information for the data object with handle
|
||||
DH to ENC. */
|
||||
GpgmeError
|
||||
gpgme_data_set_encoding (GpgmeData dh, GpgmeDataEncoding enc)
|
||||
gpgme_error_t
|
||||
gpgme_data_set_encoding (gpgme_data_t dh, gpgme_data_encoding_t enc)
|
||||
{
|
||||
if (!dh)
|
||||
return GPGME_Invalid_Value;
|
||||
@ -159,10 +159,10 @@ gpgme_data_set_encoding (GpgmeData dh, GpgmeDataEncoding enc)
|
||||
|
||||
/* Functions to support the wait interface. */
|
||||
|
||||
GpgmeError
|
||||
gpgme_error_t
|
||||
_gpgme_data_inbound_handler (void *opaque, int fd)
|
||||
{
|
||||
GpgmeData dh = (GpgmeData) opaque;
|
||||
gpgme_data_t dh = (gpgme_data_t) opaque;
|
||||
char buffer[BUFFER_SIZE];
|
||||
char *bufp = buffer;
|
||||
ssize_t buflen;
|
||||
@ -189,10 +189,10 @@ _gpgme_data_inbound_handler (void *opaque, int fd)
|
||||
}
|
||||
|
||||
|
||||
GpgmeError
|
||||
gpgme_error_t
|
||||
_gpgme_data_outbound_handler (void *opaque, int fd)
|
||||
{
|
||||
GpgmeData dh = (GpgmeData) opaque;
|
||||
gpgme_data_t dh = (gpgme_data_t) opaque;
|
||||
ssize_t nwritten;
|
||||
|
||||
if (!dh->pending_len)
|
||||
|
22
gpgme/data.h
22
gpgme/data.h
@ -33,24 +33,24 @@
|
||||
/* 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. */
|
||||
typedef ssize_t (*gpgme_data_read_cb) (GpgmeData dh, void *buffer,
|
||||
typedef ssize_t (*gpgme_data_read_cb) (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. */
|
||||
typedef ssize_t (*gpgme_data_write_cb) (GpgmeData dh, const void *buffer,
|
||||
typedef ssize_t (*gpgme_data_write_cb) (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. */
|
||||
typedef off_t (*gpgme_data_seek_cb) (GpgmeData dh, off_t offset, int whence);
|
||||
typedef off_t (*gpgme_data_seek_cb) (gpgme_data_t dh, off_t offset, int whence);
|
||||
|
||||
/* Release the data object with the handle DH. */
|
||||
typedef void (*gpgme_data_release_cb) (GpgmeData dh);
|
||||
typedef void (*gpgme_data_release_cb) (gpgme_data_t dh);
|
||||
|
||||
struct gpgme_data_cbs
|
||||
struct _gpgme_data_cbs
|
||||
{
|
||||
gpgme_data_read_cb read;
|
||||
gpgme_data_write_cb write;
|
||||
@ -58,10 +58,10 @@ struct gpgme_data_cbs
|
||||
gpgme_data_release_cb release;
|
||||
};
|
||||
|
||||
struct gpgme_data_s
|
||||
struct gpgme_data
|
||||
{
|
||||
struct gpgme_data_cbs *cbs;
|
||||
GpgmeDataEncoding encoding;
|
||||
struct _gpgme_data_cbs *cbs;
|
||||
gpgme_data_encoding_t encoding;
|
||||
|
||||
#ifdef PIPE_BUF
|
||||
#define BUFFER_SIZE PIPE_BUF
|
||||
@ -86,7 +86,7 @@ struct gpgme_data_s
|
||||
/* For gpgme_data_new_from_cbs. */
|
||||
struct
|
||||
{
|
||||
struct GpgmeDataCbs *cbs;
|
||||
gpgme_data_cbs_t cbs;
|
||||
void *handle;
|
||||
} user;
|
||||
|
||||
@ -111,8 +111,8 @@ struct gpgme_data_s
|
||||
};
|
||||
|
||||
|
||||
GpgmeError _gpgme_data_new (GpgmeData *r_dh, struct gpgme_data_cbs *cbs);
|
||||
gpgme_error_t _gpgme_data_new (gpgme_data_t *r_dh, struct _gpgme_data_cbs *cbs);
|
||||
|
||||
void _gpgme_data_release (GpgmeData dh);
|
||||
void _gpgme_data_release (gpgme_data_t dh);
|
||||
|
||||
#endif /* DATA_H */
|
||||
|
@ -26,19 +26,19 @@
|
||||
#include "ops.h"
|
||||
|
||||
|
||||
static GpgmeError
|
||||
decrypt_verify_status_handler (void *priv, GpgmeStatusCode code, char *args)
|
||||
static gpgme_error_t
|
||||
decrypt_verify_status_handler (void *priv, gpgme_status_code_t code, char *args)
|
||||
{
|
||||
return _gpgme_decrypt_status_handler (priv, code, args)
|
||||
|| _gpgme_verify_status_handler (priv, code, args);
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
_gpgme_op_decrypt_verify_start (GpgmeCtx ctx, int synchronous,
|
||||
GpgmeData cipher, GpgmeData plain)
|
||||
static gpgme_error_t
|
||||
_gpgme_op_decrypt_verify_start (gpgme_ctx_t ctx, int synchronous,
|
||||
gpgme_data_t cipher, gpgme_data_t plain)
|
||||
{
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
|
||||
err = _gpgme_op_reset (ctx, synchronous);
|
||||
if (err)
|
||||
@ -75,8 +75,8 @@ _gpgme_op_decrypt_verify_start (GpgmeCtx ctx, int synchronous,
|
||||
|
||||
/* Decrypt ciphertext CIPHER and make a signature verification within
|
||||
CTX and store the resulting plaintext in PLAIN. */
|
||||
GpgmeError
|
||||
gpgme_op_decrypt_verify_start (GpgmeCtx ctx, GpgmeData cipher, GpgmeData plain)
|
||||
gpgme_error_t
|
||||
gpgme_op_decrypt_verify_start (gpgme_ctx_t ctx, gpgme_data_t cipher, gpgme_data_t plain)
|
||||
{
|
||||
return _gpgme_op_decrypt_verify_start (ctx, 0, cipher, plain);
|
||||
}
|
||||
@ -84,10 +84,10 @@ gpgme_op_decrypt_verify_start (GpgmeCtx ctx, GpgmeData cipher, GpgmeData plain)
|
||||
|
||||
/* Decrypt ciphertext CIPHER and make a signature verification within
|
||||
CTX and store the resulting plaintext in PLAIN. */
|
||||
GpgmeError
|
||||
gpgme_op_decrypt_verify (GpgmeCtx ctx, GpgmeData cipher, GpgmeData plain)
|
||||
gpgme_error_t
|
||||
gpgme_op_decrypt_verify (gpgme_ctx_t ctx, gpgme_data_t cipher, gpgme_data_t plain)
|
||||
{
|
||||
GpgmeError err = _gpgme_op_decrypt_verify_start (ctx, 1, cipher, plain);
|
||||
gpgme_error_t err = _gpgme_op_decrypt_verify_start (ctx, 1, cipher, plain);
|
||||
if (!err)
|
||||
err = _gpgme_wait_one (ctx);
|
||||
return err;
|
||||
|
@ -49,11 +49,11 @@ release_op_data (void *hook)
|
||||
}
|
||||
|
||||
|
||||
GpgmeDecryptResult
|
||||
gpgme_op_decrypt_result (GpgmeCtx ctx)
|
||||
gpgme_decrypt_result_t
|
||||
gpgme_op_decrypt_result (gpgme_ctx_t ctx)
|
||||
{
|
||||
op_data_t opd;
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
|
||||
err = _gpgme_op_data_lookup (ctx, OPDATA_DECRYPT, (void **) &opd, -1, NULL);
|
||||
if (err || !opd)
|
||||
@ -63,11 +63,11 @@ gpgme_op_decrypt_result (GpgmeCtx ctx)
|
||||
}
|
||||
|
||||
|
||||
GpgmeError
|
||||
_gpgme_decrypt_status_handler (void *priv, GpgmeStatusCode code, char *args)
|
||||
gpgme_error_t
|
||||
_gpgme_decrypt_status_handler (void *priv, gpgme_status_code_t code, char *args)
|
||||
{
|
||||
GpgmeCtx ctx = (GpgmeCtx) priv;
|
||||
GpgmeError err;
|
||||
gpgme_ctx_t ctx = (gpgme_ctx_t) priv;
|
||||
gpgme_error_t err;
|
||||
op_data_t opd;
|
||||
|
||||
err = _gpgme_passphrase_status_handler (priv, code, args);
|
||||
@ -136,8 +136,8 @@ _gpgme_decrypt_status_handler (void *priv, GpgmeStatusCode code, char *args)
|
||||
}
|
||||
|
||||
|
||||
GpgmeError
|
||||
_gpgme_op_decrypt_init_result (GpgmeCtx ctx)
|
||||
gpgme_error_t
|
||||
_gpgme_op_decrypt_init_result (gpgme_ctx_t ctx)
|
||||
{
|
||||
op_data_t opd;
|
||||
|
||||
@ -146,11 +146,11 @@ _gpgme_op_decrypt_init_result (GpgmeCtx ctx)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
decrypt_start (GpgmeCtx ctx, int synchronous,
|
||||
GpgmeData cipher, GpgmeData plain)
|
||||
static gpgme_error_t
|
||||
decrypt_start (gpgme_ctx_t ctx, int synchronous,
|
||||
gpgme_data_t cipher, gpgme_data_t plain)
|
||||
{
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
|
||||
err = _gpgme_op_reset (ctx, synchronous);
|
||||
if (err)
|
||||
@ -184,8 +184,8 @@ decrypt_start (GpgmeCtx ctx, int synchronous,
|
||||
}
|
||||
|
||||
|
||||
GpgmeError
|
||||
gpgme_op_decrypt_start (GpgmeCtx ctx, GpgmeData cipher, GpgmeData plain)
|
||||
gpgme_error_t
|
||||
gpgme_op_decrypt_start (gpgme_ctx_t ctx, gpgme_data_t cipher, gpgme_data_t plain)
|
||||
{
|
||||
return decrypt_start (ctx, 0, cipher, plain);
|
||||
}
|
||||
@ -193,10 +193,10 @@ gpgme_op_decrypt_start (GpgmeCtx ctx, GpgmeData cipher, GpgmeData plain)
|
||||
|
||||
/* Decrypt ciphertext CIPHER within CTX and store the resulting
|
||||
plaintext in PLAIN. */
|
||||
GpgmeError
|
||||
gpgme_op_decrypt (GpgmeCtx ctx, GpgmeData cipher, GpgmeData plain)
|
||||
gpgme_error_t
|
||||
gpgme_op_decrypt (gpgme_ctx_t ctx, gpgme_data_t cipher, gpgme_data_t plain)
|
||||
{
|
||||
GpgmeError err = decrypt_start (ctx, 1, cipher, plain);
|
||||
gpgme_error_t err = decrypt_start (ctx, 1, cipher, plain);
|
||||
if (!err)
|
||||
err = _gpgme_wait_one (ctx);
|
||||
return err;
|
||||
|
@ -28,8 +28,8 @@
|
||||
#include "ops.h"
|
||||
|
||||
|
||||
static GpgmeError
|
||||
delete_status_handler (void *priv, GpgmeStatusCode code, char *args)
|
||||
static gpgme_error_t
|
||||
delete_status_handler (void *priv, gpgme_status_code_t code, char *args)
|
||||
{
|
||||
if (code == GPGME_STATUS_DELETE_PROBLEM)
|
||||
{
|
||||
@ -70,11 +70,11 @@ delete_status_handler (void *priv, GpgmeStatusCode code, char *args)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
delete_start (GpgmeCtx ctx, int synchronous, const GpgmeKey key,
|
||||
static gpgme_error_t
|
||||
delete_start (gpgme_ctx_t ctx, int synchronous, const gpgme_key_t key,
|
||||
int allow_secret)
|
||||
{
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
|
||||
err = _gpgme_op_reset (ctx, synchronous);
|
||||
if (err)
|
||||
@ -88,8 +88,8 @@ delete_start (GpgmeCtx ctx, int synchronous, const GpgmeKey key,
|
||||
|
||||
/* Delete KEY from the keyring. If ALLOW_SECRET is non-zero, secret
|
||||
keys are also deleted. */
|
||||
GpgmeError
|
||||
gpgme_op_delete_start (GpgmeCtx ctx, const GpgmeKey key, int allow_secret)
|
||||
gpgme_error_t
|
||||
gpgme_op_delete_start (gpgme_ctx_t ctx, const gpgme_key_t key, int allow_secret)
|
||||
{
|
||||
return delete_start (ctx, 0, key, allow_secret);
|
||||
}
|
||||
@ -97,10 +97,10 @@ gpgme_op_delete_start (GpgmeCtx ctx, const GpgmeKey key, int allow_secret)
|
||||
|
||||
/* Delete KEY from the keyring. If ALLOW_SECRET is non-zero, secret
|
||||
keys are also deleted. */
|
||||
GpgmeError
|
||||
gpgme_op_delete (GpgmeCtx ctx, const GpgmeKey key, int allow_secret)
|
||||
gpgme_error_t
|
||||
gpgme_op_delete (gpgme_ctx_t ctx, const gpgme_key_t key, int allow_secret)
|
||||
{
|
||||
GpgmeError err = delete_start (ctx, 1, key, allow_secret);
|
||||
gpgme_error_t err = delete_start (ctx, 1, key, allow_secret);
|
||||
if (!err)
|
||||
err = _gpgme_wait_one (ctx);
|
||||
return err;
|
||||
|
38
gpgme/edit.c
38
gpgme/edit.c
@ -30,15 +30,15 @@
|
||||
typedef struct
|
||||
{
|
||||
/* The user callback function and its hook value. */
|
||||
GpgmeEditCb fnc;
|
||||
gpgme_edit_cb_t fnc;
|
||||
void *fnc_value;
|
||||
} *op_data_t;
|
||||
|
||||
|
||||
static GpgmeError
|
||||
edit_status_handler (void *priv, GpgmeStatusCode status, char *args)
|
||||
static gpgme_error_t
|
||||
edit_status_handler (void *priv, gpgme_status_code_t status, char *args)
|
||||
{
|
||||
GpgmeCtx ctx = (GpgmeCtx) priv;
|
||||
gpgme_ctx_t ctx = (gpgme_ctx_t) priv;
|
||||
op_data_t opd;
|
||||
|
||||
return _gpgme_passphrase_status_handler (priv, status, args)
|
||||
@ -48,12 +48,12 @@ edit_status_handler (void *priv, GpgmeStatusCode status, char *args)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
command_handler (void *priv, GpgmeStatusCode status, const char *args,
|
||||
static gpgme_error_t
|
||||
command_handler (void *priv, gpgme_status_code_t status, const char *args,
|
||||
const char **result)
|
||||
{
|
||||
GpgmeCtx ctx = (GpgmeCtx) priv;
|
||||
GpgmeError err;
|
||||
gpgme_ctx_t ctx = (gpgme_ctx_t) priv;
|
||||
gpgme_error_t err;
|
||||
op_data_t opd;
|
||||
|
||||
*result = NULL;
|
||||
@ -76,11 +76,11 @@ command_handler (void *priv, GpgmeStatusCode status, const char *args,
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
edit_start (GpgmeCtx ctx, int synchronous, GpgmeKey key,
|
||||
GpgmeEditCb fnc, void *fnc_value, GpgmeData out)
|
||||
static gpgme_error_t
|
||||
edit_start (gpgme_ctx_t ctx, int synchronous, gpgme_key_t key,
|
||||
gpgme_edit_cb_t fnc, void *fnc_value, gpgme_data_t out)
|
||||
{
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
op_data_t opd;
|
||||
|
||||
err = _gpgme_op_reset (ctx, synchronous);
|
||||
@ -109,9 +109,9 @@ edit_start (GpgmeCtx ctx, int synchronous, GpgmeKey key,
|
||||
}
|
||||
|
||||
|
||||
GpgmeError
|
||||
gpgme_op_edit_start (GpgmeCtx ctx, GpgmeKey key,
|
||||
GpgmeEditCb fnc, void *fnc_value, GpgmeData 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)
|
||||
{
|
||||
return edit_start (ctx, 0, key, fnc, fnc_value, out);
|
||||
}
|
||||
@ -119,11 +119,11 @@ gpgme_op_edit_start (GpgmeCtx ctx, GpgmeKey key,
|
||||
|
||||
/* Edit the key KEY. Send status and command requests to FNC and
|
||||
output of edit commands to OUT. */
|
||||
GpgmeError
|
||||
gpgme_op_edit (GpgmeCtx ctx, GpgmeKey key,
|
||||
GpgmeEditCb fnc, void *fnc_value, GpgmeData 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)
|
||||
{
|
||||
GpgmeError err = edit_start (ctx, 1, key, fnc, fnc_value, out);
|
||||
gpgme_error_t err = edit_start (ctx, 1, key, fnc, fnc_value, out);
|
||||
if (!err)
|
||||
err = _gpgme_wait_one (ctx);
|
||||
return err;
|
||||
|
@ -27,19 +27,19 @@
|
||||
#include "ops.h"
|
||||
|
||||
|
||||
static GpgmeError
|
||||
encrypt_sign_status_handler (void *priv, GpgmeStatusCode code, char *args)
|
||||
static gpgme_error_t
|
||||
encrypt_sign_status_handler (void *priv, gpgme_status_code_t code, char *args)
|
||||
{
|
||||
return _gpgme_encrypt_status_handler (priv, code, args)
|
||||
|| _gpgme_sign_status_handler (priv, code, args);
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
encrypt_sign_start (GpgmeCtx ctx, int synchronous, GpgmeRecipients recp,
|
||||
GpgmeData plain, GpgmeData cipher)
|
||||
static gpgme_error_t
|
||||
encrypt_sign_start (gpgme_ctx_t ctx, int synchronous, gpgme_recipients_t recp,
|
||||
gpgme_data_t plain, gpgme_data_t cipher)
|
||||
{
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
|
||||
err = _gpgme_op_reset (ctx, synchronous);
|
||||
if (err)
|
||||
@ -78,9 +78,9 @@ encrypt_sign_start (GpgmeCtx ctx, int synchronous, GpgmeRecipients recp,
|
||||
/* 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. */
|
||||
GpgmeError
|
||||
gpgme_op_encrypt_sign_start (GpgmeCtx ctx, GpgmeRecipients recp,
|
||||
GpgmeData plain, GpgmeData cipher)
|
||||
gpgme_error_t
|
||||
gpgme_op_encrypt_sign_start (gpgme_ctx_t ctx, gpgme_recipients_t recp,
|
||||
gpgme_data_t plain, gpgme_data_t cipher)
|
||||
{
|
||||
return encrypt_sign_start (ctx, 0, recp, plain, cipher);
|
||||
}
|
||||
@ -89,11 +89,11 @@ gpgme_op_encrypt_sign_start (GpgmeCtx ctx, GpgmeRecipients recp,
|
||||
/* 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. */
|
||||
GpgmeError
|
||||
gpgme_op_encrypt_sign (GpgmeCtx ctx, GpgmeRecipients recp,
|
||||
GpgmeData plain, GpgmeData cipher)
|
||||
gpgme_error_t
|
||||
gpgme_op_encrypt_sign (gpgme_ctx_t ctx, gpgme_recipients_t recp,
|
||||
gpgme_data_t plain, gpgme_data_t cipher)
|
||||
{
|
||||
GpgmeError err = encrypt_sign_start (ctx, 1, recp, plain, cipher);
|
||||
gpgme_error_t err = encrypt_sign_start (ctx, 1, recp, plain, cipher);
|
||||
if (!err)
|
||||
err = _gpgme_wait_one (ctx);
|
||||
return err;
|
||||
|
@ -37,7 +37,7 @@ typedef struct
|
||||
/* A pointer to the next pointer of the last invalid recipient in
|
||||
the list. This makes appending new invalid recipients painless
|
||||
while preserving the order. */
|
||||
GpgmeInvalidUserID *lastp;
|
||||
gpgme_invalid_user_id_t *lastp;
|
||||
} *op_data_t;
|
||||
|
||||
|
||||
@ -45,22 +45,22 @@ static void
|
||||
release_op_data (void *hook)
|
||||
{
|
||||
op_data_t opd = (op_data_t) hook;
|
||||
GpgmeInvalidUserID invalid_recipient = opd->result.invalid_recipients;
|
||||
gpgme_invalid_user_id_t invalid_recipient = opd->result.invalid_recipients;
|
||||
|
||||
while (invalid_recipient)
|
||||
{
|
||||
GpgmeInvalidUserID next = invalid_recipient->next;
|
||||
gpgme_invalid_user_id_t next = invalid_recipient->next;
|
||||
free (invalid_recipient->id);
|
||||
invalid_recipient = next;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
GpgmeEncryptResult
|
||||
gpgme_op_encrypt_result (GpgmeCtx ctx)
|
||||
gpgme_encrypt_result_t
|
||||
gpgme_op_encrypt_result (gpgme_ctx_t ctx)
|
||||
{
|
||||
op_data_t opd;
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
|
||||
err = _gpgme_op_data_lookup (ctx, OPDATA_ENCRYPT, (void **) &opd, -1, NULL);
|
||||
if (err || !opd)
|
||||
@ -70,11 +70,11 @@ gpgme_op_encrypt_result (GpgmeCtx ctx)
|
||||
}
|
||||
|
||||
|
||||
GpgmeError
|
||||
_gpgme_encrypt_status_handler (void *priv, GpgmeStatusCode code, char *args)
|
||||
gpgme_error_t
|
||||
_gpgme_encrypt_status_handler (void *priv, gpgme_status_code_t code, char *args)
|
||||
{
|
||||
GpgmeCtx ctx = (GpgmeCtx) priv;
|
||||
GpgmeError err;
|
||||
gpgme_ctx_t ctx = (gpgme_ctx_t) priv;
|
||||
gpgme_error_t err;
|
||||
op_data_t opd;
|
||||
|
||||
err = _gpgme_op_data_lookup (ctx, OPDATA_ENCRYPT, (void **) &opd,
|
||||
@ -108,18 +108,18 @@ _gpgme_encrypt_status_handler (void *priv, GpgmeStatusCode code, char *args)
|
||||
}
|
||||
|
||||
|
||||
GpgmeError
|
||||
_gpgme_encrypt_sym_status_handler (void *priv, GpgmeStatusCode code,
|
||||
gpgme_error_t
|
||||
_gpgme_encrypt_sym_status_handler (void *priv, gpgme_status_code_t code,
|
||||
char *args)
|
||||
{
|
||||
return _gpgme_passphrase_status_handler (priv, code, args);
|
||||
}
|
||||
|
||||
|
||||
GpgmeError
|
||||
_gpgme_op_encrypt_init_result (GpgmeCtx ctx)
|
||||
gpgme_error_t
|
||||
_gpgme_op_encrypt_init_result (gpgme_ctx_t ctx)
|
||||
{
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
op_data_t opd;
|
||||
|
||||
err = _gpgme_op_data_lookup (ctx, OPDATA_ENCRYPT, (void **) &opd,
|
||||
@ -131,11 +131,11 @@ _gpgme_op_encrypt_init_result (GpgmeCtx ctx)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
encrypt_start (GpgmeCtx ctx, int synchronous, GpgmeRecipients recp,
|
||||
GpgmeData plain, GpgmeData cipher)
|
||||
static gpgme_error_t
|
||||
encrypt_start (gpgme_ctx_t ctx, int synchronous, gpgme_recipients_t recp,
|
||||
gpgme_data_t plain, gpgme_data_t cipher)
|
||||
{
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
int symmetric = 0;
|
||||
|
||||
err = _gpgme_op_reset (ctx, synchronous);
|
||||
@ -177,9 +177,9 @@ encrypt_start (GpgmeCtx ctx, int synchronous, GpgmeRecipients recp,
|
||||
}
|
||||
|
||||
|
||||
GpgmeError
|
||||
gpgme_op_encrypt_start (GpgmeCtx ctx, GpgmeRecipients recp, GpgmeData plain,
|
||||
GpgmeData cipher)
|
||||
gpgme_error_t
|
||||
gpgme_op_encrypt_start (gpgme_ctx_t ctx, gpgme_recipients_t recp, gpgme_data_t plain,
|
||||
gpgme_data_t cipher)
|
||||
{
|
||||
return encrypt_start (ctx, 0, recp, plain, cipher);
|
||||
}
|
||||
@ -187,9 +187,9 @@ gpgme_op_encrypt_start (GpgmeCtx ctx, GpgmeRecipients recp, GpgmeData plain,
|
||||
|
||||
/* Encrypt plaintext PLAIN within CTX for the recipients RECP and
|
||||
store the resulting ciphertext in CIPHER. */
|
||||
GpgmeError
|
||||
gpgme_op_encrypt (GpgmeCtx ctx, GpgmeRecipients recp,
|
||||
GpgmeData plain, GpgmeData cipher)
|
||||
gpgme_error_t
|
||||
gpgme_op_encrypt (gpgme_ctx_t ctx, gpgme_recipients_t recp,
|
||||
gpgme_data_t plain, gpgme_data_t cipher)
|
||||
{
|
||||
int err = encrypt_start (ctx, 1, recp, plain, cipher);
|
||||
if (!err)
|
||||
|
@ -33,45 +33,45 @@ struct engine_ops
|
||||
const char *(*get_file_name) (void);
|
||||
const char *(*get_version) (void);
|
||||
const char *(*get_req_version) (void);
|
||||
GpgmeError (*new) (void **r_engine);
|
||||
gpgme_error_t (*new) (void **r_engine);
|
||||
|
||||
/* Member functions. */
|
||||
void (*release) (void *engine);
|
||||
void (*set_status_handler) (void *engine, EngineStatusHandler fnc,
|
||||
void *fnc_value);
|
||||
GpgmeError (*set_command_handler) (void *engine, EngineCommandHandler fnc,
|
||||
void *fnc_value, GpgmeData data);
|
||||
GpgmeError (*set_colon_line_handler) (void *engine,
|
||||
gpgme_error_t (*set_command_handler) (void *engine, EngineCommandHandler fnc,
|
||||
void *fnc_value, gpgme_data_t data);
|
||||
gpgme_error_t (*set_colon_line_handler) (void *engine,
|
||||
EngineColonLineHandler fnc,
|
||||
void *fnc_value);
|
||||
GpgmeError (*decrypt) (void *engine, GpgmeData ciph, GpgmeData plain);
|
||||
GpgmeError (*delete) (void *engine, GpgmeKey key, int allow_secret);
|
||||
GpgmeError (*edit) (void *engine, GpgmeKey key, GpgmeData out,
|
||||
GpgmeCtx ctx /* FIXME */);
|
||||
GpgmeError (*encrypt) (void *engine, GpgmeRecipients recp,
|
||||
GpgmeData plain, GpgmeData ciph, int use_armor);
|
||||
GpgmeError (*encrypt_sign) (void *engine, GpgmeRecipients recp,
|
||||
GpgmeData plain, GpgmeData ciph,
|
||||
int use_armor, GpgmeCtx ctx /* FIXME */);
|
||||
GpgmeError (*export) (void *engine, GpgmeRecipients recp,
|
||||
GpgmeData keydata, int use_armor);
|
||||
GpgmeError (*genkey) (void *engine, GpgmeData help_data, int use_armor,
|
||||
GpgmeData pubkey, GpgmeData seckey);
|
||||
GpgmeError (*import) (void *engine, GpgmeData keydata);
|
||||
GpgmeError (*keylist) (void *engine, const char *pattern,
|
||||
gpgme_error_t (*decrypt) (void *engine, gpgme_data_t ciph, gpgme_data_t plain);
|
||||
gpgme_error_t (*delete) (void *engine, gpgme_key_t key, int allow_secret);
|
||||
gpgme_error_t (*edit) (void *engine, gpgme_key_t key, gpgme_data_t out,
|
||||
gpgme_ctx_t ctx /* FIXME */);
|
||||
gpgme_error_t (*encrypt) (void *engine, gpgme_recipients_t recp,
|
||||
gpgme_data_t plain, gpgme_data_t ciph, int use_armor);
|
||||
gpgme_error_t (*encrypt_sign) (void *engine, gpgme_recipients_t recp,
|
||||
gpgme_data_t plain, gpgme_data_t ciph,
|
||||
int use_armor, gpgme_ctx_t ctx /* FIXME */);
|
||||
gpgme_error_t (*export) (void *engine, gpgme_recipients_t recp,
|
||||
gpgme_data_t keydata, int use_armor);
|
||||
gpgme_error_t (*genkey) (void *engine, gpgme_data_t help_data, int use_armor,
|
||||
gpgme_data_t pubkey, gpgme_data_t seckey);
|
||||
gpgme_error_t (*import) (void *engine, gpgme_data_t keydata);
|
||||
gpgme_error_t (*keylist) (void *engine, const char *pattern,
|
||||
int secret_only, int keylist_mode);
|
||||
GpgmeError (*keylist_ext) (void *engine, const char *pattern[],
|
||||
gpgme_error_t (*keylist_ext) (void *engine, const char *pattern[],
|
||||
int secret_only, int reserved,
|
||||
int keylist_mode);
|
||||
GpgmeError (*sign) (void *engine, GpgmeData in, GpgmeData out,
|
||||
GpgmeSigMode mode, int use_armor, int use_textmode,
|
||||
int include_certs, GpgmeCtx ctx /* FIXME */);
|
||||
GpgmeError (*trustlist) (void *engine, const char *pattern);
|
||||
GpgmeError (*verify) (void *engine, GpgmeData sig, GpgmeData signed_text,
|
||||
GpgmeData plaintext);
|
||||
gpgme_error_t (*sign) (void *engine, gpgme_data_t in, gpgme_data_t out,
|
||||
gpgme_sig_mode_t mode, int use_armor, int use_textmode,
|
||||
int include_certs, gpgme_ctx_t ctx /* FIXME */);
|
||||
gpgme_error_t (*trustlist) (void *engine, const char *pattern);
|
||||
gpgme_error_t (*verify) (void *engine, gpgme_data_t sig, gpgme_data_t signed_text,
|
||||
gpgme_data_t plaintext);
|
||||
|
||||
void (*set_io_cbs) (void *engine, struct GpgmeIOCbs *io_cbs);
|
||||
void (*io_event) (void *engine, GpgmeEventIO type, void *type_data);
|
||||
void (*set_io_cbs) (void *engine, gpgme_io_cbs_t io_cbs);
|
||||
void (*io_event) (void *engine, gpgme_event_io_t type, void *type_data);
|
||||
};
|
||||
|
||||
|
||||
|
@ -87,7 +87,7 @@ struct gpgsm_object_s
|
||||
int any; /* any data line seen */
|
||||
} colon;
|
||||
|
||||
struct GpgmeIOCbs io_cbs;
|
||||
struct gpgme_io_cbs io_cbs;
|
||||
};
|
||||
|
||||
typedef struct gpgsm_object_s *GpgsmObject;
|
||||
@ -148,7 +148,7 @@ close_notify_handler (int fd, void *opaque)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
static gpgme_error_t
|
||||
map_assuan_error (AssuanError err)
|
||||
{
|
||||
switch (err)
|
||||
@ -273,10 +273,10 @@ gpgsm_release (void *engine)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
static gpgme_error_t
|
||||
gpgsm_new (void **engine)
|
||||
{
|
||||
GpgmeError err = 0;
|
||||
gpgme_error_t err = 0;
|
||||
GpgsmObject gpgsm;
|
||||
char *argv[3];
|
||||
int fds[2];
|
||||
@ -538,9 +538,9 @@ gpgsm_new (void **engine)
|
||||
|
||||
|
||||
/* Forward declaration. */
|
||||
static GpgmeStatusCode parse_status (const char *name);
|
||||
static gpgme_status_code_t parse_status (const char *name);
|
||||
|
||||
static GpgmeError
|
||||
static gpgme_error_t
|
||||
gpgsm_assuan_simple_command (ASSUAN_CONTEXT ctx, char *cmd, EngineStatusHandler status_fnc,
|
||||
void *status_fnc_value)
|
||||
{
|
||||
@ -573,7 +573,7 @@ gpgsm_assuan_simple_command (ASSUAN_CONTEXT ctx, char *cmd, EngineStatusHandler
|
||||
&& line[0] == 'S' && line[1] == ' ')
|
||||
{
|
||||
char *rest;
|
||||
GpgmeStatusCode r;
|
||||
gpgme_status_code_t r;
|
||||
|
||||
rest = strchr (line + 2, ' ');
|
||||
if (!rest)
|
||||
@ -598,7 +598,7 @@ gpgsm_assuan_simple_command (ASSUAN_CONTEXT ctx, char *cmd, EngineStatusHandler
|
||||
|
||||
|
||||
#define COMMANDLINELEN 40
|
||||
static GpgmeError
|
||||
static gpgme_error_t
|
||||
gpgsm_set_fd (ASSUAN_CONTEXT ctx, const char *which, int fd, const char *opt)
|
||||
{
|
||||
char line[COMMANDLINELEN];
|
||||
@ -613,7 +613,7 @@ gpgsm_set_fd (ASSUAN_CONTEXT ctx, const char *which, int fd, const char *opt)
|
||||
|
||||
|
||||
static const char *
|
||||
map_input_enc (GpgmeData d)
|
||||
map_input_enc (gpgme_data_t d)
|
||||
{
|
||||
switch (gpgme_data_get_encoding (d))
|
||||
{
|
||||
@ -642,7 +642,7 @@ status_cmp (const void *ap, const void *bp)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeStatusCode
|
||||
static gpgme_status_code_t
|
||||
parse_status (const char *name)
|
||||
{
|
||||
struct status_table_s t, *r;
|
||||
@ -653,11 +653,11 @@ parse_status (const char *name)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
static gpgme_error_t
|
||||
status_handler (void *opaque, int fd)
|
||||
{
|
||||
AssuanError assuan_err;
|
||||
GpgmeError err = 0;
|
||||
gpgme_error_t err = 0;
|
||||
GpgsmObject gpgsm = opaque;
|
||||
char *line;
|
||||
size_t linelen;
|
||||
@ -777,7 +777,7 @@ status_handler (void *opaque, int fd)
|
||||
&& line[0] == 'S' && line[1] == ' ')
|
||||
{
|
||||
char *rest;
|
||||
GpgmeStatusCode r;
|
||||
gpgme_status_code_t r;
|
||||
|
||||
rest = strchr (line + 2, ' ');
|
||||
if (!rest)
|
||||
@ -802,10 +802,10 @@ status_handler (void *opaque, int fd)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
add_io_cb (GpgsmObject gpgsm, iocb_data_t *iocbd, GpgmeIOCb handler)
|
||||
static gpgme_error_t
|
||||
add_io_cb (GpgsmObject gpgsm, iocb_data_t *iocbd, gpgme_io_cb_t handler)
|
||||
{
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
|
||||
err = (*gpgsm->io_cbs.add) (gpgsm->io_cbs.add_priv,
|
||||
iocbd->fd, iocbd->dir,
|
||||
@ -819,10 +819,10 @@ add_io_cb (GpgsmObject gpgsm, iocb_data_t *iocbd, GpgmeIOCb handler)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
static gpgme_error_t
|
||||
start (GpgsmObject gpgsm, const char *command)
|
||||
{
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
|
||||
err = add_io_cb (gpgsm, &gpgsm->status_cb, status_handler);
|
||||
if (!err && gpgsm->input_cb.fd != -1)
|
||||
@ -842,11 +842,11 @@ start (GpgsmObject gpgsm, const char *command)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
gpgsm_decrypt (void *engine, GpgmeData ciph, GpgmeData plain)
|
||||
static gpgme_error_t
|
||||
gpgsm_decrypt (void *engine, gpgme_data_t ciph, gpgme_data_t plain)
|
||||
{
|
||||
GpgsmObject gpgsm = engine;
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
|
||||
if (!gpgsm)
|
||||
return GPGME_Invalid_Value;
|
||||
@ -867,11 +867,11 @@ gpgsm_decrypt (void *engine, GpgmeData ciph, GpgmeData plain)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
gpgsm_delete (void *engine, GpgmeKey key, int allow_secret)
|
||||
static gpgme_error_t
|
||||
gpgsm_delete (void *engine, gpgme_key_t key, int allow_secret)
|
||||
{
|
||||
GpgsmObject gpgsm = engine;
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
char *fpr = key->subkeys ? key->subkeys->fpr : NULL;
|
||||
char *linep = fpr;
|
||||
char *line;
|
||||
@ -934,14 +934,14 @@ gpgsm_delete (void *engine, GpgmeKey key, int allow_secret)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
set_recipients (GpgsmObject gpgsm, GpgmeRecipients recp)
|
||||
static gpgme_error_t
|
||||
set_recipients (GpgsmObject gpgsm, gpgme_recipients_t recp)
|
||||
{
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
ASSUAN_CONTEXT ctx = gpgsm->assuan_ctx;
|
||||
char *line;
|
||||
int linelen;
|
||||
GpgmeUserID uid;
|
||||
gpgme_user_id_t uid;
|
||||
int invalid_recipients = 0;
|
||||
|
||||
linelen = 10 + 40 + 1; /* "RECIPIENT " + guess + '\0'. */
|
||||
@ -980,12 +980,12 @@ set_recipients (GpgsmObject gpgsm, GpgmeRecipients recp)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
gpgsm_encrypt (void *engine, GpgmeRecipients recp, GpgmeData plain,
|
||||
GpgmeData ciph, int use_armor)
|
||||
static gpgme_error_t
|
||||
gpgsm_encrypt (void *engine, gpgme_recipients_t recp, gpgme_data_t plain,
|
||||
gpgme_data_t ciph, int use_armor)
|
||||
{
|
||||
GpgsmObject gpgsm = engine;
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
|
||||
if (!gpgsm)
|
||||
return GPGME_Invalid_Value;
|
||||
@ -1013,12 +1013,12 @@ gpgsm_encrypt (void *engine, GpgmeRecipients recp, GpgmeData plain,
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
gpgsm_export (void *engine, GpgmeRecipients recp, GpgmeData keydata,
|
||||
static gpgme_error_t
|
||||
gpgsm_export (void *engine, gpgme_recipients_t recp, gpgme_data_t keydata,
|
||||
int use_armor)
|
||||
{
|
||||
GpgsmObject gpgsm = engine;
|
||||
GpgmeError err = 0;
|
||||
gpgme_error_t err = 0;
|
||||
char *cmd = NULL;
|
||||
int cmdi;
|
||||
int cmdlen = 32;
|
||||
@ -1077,12 +1077,12 @@ gpgsm_export (void *engine, GpgmeRecipients recp, GpgmeData keydata,
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
gpgsm_genkey (void *engine, GpgmeData help_data, int use_armor,
|
||||
GpgmeData pubkey, GpgmeData seckey)
|
||||
static gpgme_error_t
|
||||
gpgsm_genkey (void *engine, gpgme_data_t help_data, int use_armor,
|
||||
gpgme_data_t pubkey, gpgme_data_t seckey)
|
||||
{
|
||||
GpgsmObject gpgsm = engine;
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
|
||||
if (!gpgsm || !pubkey || seckey)
|
||||
return GPGME_Invalid_Value;
|
||||
@ -1104,11 +1104,11 @@ gpgsm_genkey (void *engine, GpgmeData help_data, int use_armor,
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
gpgsm_import (void *engine, GpgmeData keydata)
|
||||
static gpgme_error_t
|
||||
gpgsm_import (void *engine, gpgme_data_t keydata)
|
||||
{
|
||||
GpgsmObject gpgsm = engine;
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
|
||||
if (!gpgsm)
|
||||
return GPGME_Invalid_Value;
|
||||
@ -1126,13 +1126,13 @@ gpgsm_import (void *engine, GpgmeData keydata)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
static gpgme_error_t
|
||||
gpgsm_keylist (void *engine, const char *pattern, int secret_only,
|
||||
int keylist_mode)
|
||||
{
|
||||
GpgsmObject gpgsm = engine;
|
||||
char *line;
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
|
||||
if (!pattern)
|
||||
pattern = "";
|
||||
@ -1169,13 +1169,13 @@ gpgsm_keylist (void *engine, const char *pattern, int secret_only,
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
static gpgme_error_t
|
||||
gpgsm_keylist_ext (void *engine, const char *pattern[], int secret_only,
|
||||
int reserved, int keylist_mode)
|
||||
{
|
||||
GpgsmObject gpgsm = engine;
|
||||
char *line;
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
/* Length is "LISTSECRETKEYS " + p + '\0'. */
|
||||
int length = 15 + 1;
|
||||
char *linep;
|
||||
@ -1270,16 +1270,16 @@ gpgsm_keylist_ext (void *engine, const char *pattern[], int secret_only,
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
gpgsm_sign (void *engine, GpgmeData in, GpgmeData out, GpgmeSigMode mode,
|
||||
static gpgme_error_t
|
||||
gpgsm_sign (void *engine, gpgme_data_t in, gpgme_data_t out, gpgme_sig_mode_t mode,
|
||||
int use_armor, int use_textmode, int include_certs,
|
||||
GpgmeCtx ctx /* FIXME */)
|
||||
gpgme_ctx_t ctx /* FIXME */)
|
||||
{
|
||||
GpgsmObject gpgsm = engine;
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
char *assuan_cmd;
|
||||
int i;
|
||||
GpgmeKey key;
|
||||
gpgme_key_t key;
|
||||
|
||||
if (!gpgsm)
|
||||
return GPGME_Invalid_Value;
|
||||
@ -1333,7 +1333,7 @@ gpgsm_sign (void *engine, GpgmeData in, GpgmeData out, GpgmeSigMode mode,
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
static gpgme_error_t
|
||||
gpgsm_trustlist (void *engine, const char *pattern)
|
||||
{
|
||||
/* FIXME */
|
||||
@ -1341,12 +1341,12 @@ gpgsm_trustlist (void *engine, const char *pattern)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
gpgsm_verify (void *engine, GpgmeData sig, GpgmeData signed_text,
|
||||
GpgmeData plaintext)
|
||||
static gpgme_error_t
|
||||
gpgsm_verify (void *engine, gpgme_data_t sig, gpgme_data_t signed_text,
|
||||
gpgme_data_t plaintext)
|
||||
{
|
||||
GpgsmObject gpgsm = engine;
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
|
||||
if (!gpgsm)
|
||||
return GPGME_Invalid_Value;
|
||||
@ -1391,7 +1391,7 @@ gpgsm_set_status_handler (void *engine, EngineStatusHandler fnc,
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
static gpgme_error_t
|
||||
gpgsm_set_colon_line_handler (void *engine, EngineColonLineHandler fnc,
|
||||
void *fnc_value)
|
||||
{
|
||||
@ -1405,7 +1405,7 @@ gpgsm_set_colon_line_handler (void *engine, EngineColonLineHandler fnc,
|
||||
|
||||
|
||||
static void
|
||||
gpgsm_set_io_cbs (void *engine, struct GpgmeIOCbs *io_cbs)
|
||||
gpgsm_set_io_cbs (void *engine, gpgme_io_cbs_t io_cbs)
|
||||
{
|
||||
GpgsmObject gpgsm = engine;
|
||||
gpgsm->io_cbs = *io_cbs;
|
||||
@ -1413,7 +1413,7 @@ gpgsm_set_io_cbs (void *engine, struct GpgmeIOCbs *io_cbs)
|
||||
|
||||
|
||||
static void
|
||||
gpgsm_io_event (void *engine, GpgmeEventIO type, void *type_data)
|
||||
gpgsm_io_event (void *engine, gpgme_event_io_t type, void *type_data)
|
||||
{
|
||||
GpgsmObject gpgsm = engine;
|
||||
|
||||
|
103
gpgme/engine.c
103
gpgme/engine.c
@ -53,7 +53,7 @@ static struct engine_ops *engine_ops[] =
|
||||
|
||||
/* Get the file name of the engine for PROTOCOL. */
|
||||
static const char *
|
||||
engine_get_file_name (GpgmeProtocol proto)
|
||||
engine_get_file_name (gpgme_protocol_t proto)
|
||||
{
|
||||
if (proto > DIM (engine_ops))
|
||||
return NULL;
|
||||
@ -67,7 +67,7 @@ engine_get_file_name (GpgmeProtocol proto)
|
||||
|
||||
/* Get the version number of the engine for PROTOCOL. */
|
||||
static const char *
|
||||
engine_get_version (GpgmeProtocol proto)
|
||||
engine_get_version (gpgme_protocol_t proto)
|
||||
{
|
||||
if (proto > DIM (engine_ops))
|
||||
return NULL;
|
||||
@ -81,7 +81,7 @@ engine_get_version (GpgmeProtocol proto)
|
||||
|
||||
/* Get the required version number of the engine for PROTOCOL. */
|
||||
static const char *
|
||||
engine_get_req_version (GpgmeProtocol proto)
|
||||
engine_get_req_version (gpgme_protocol_t proto)
|
||||
{
|
||||
if (proto > DIM (engine_ops))
|
||||
return NULL;
|
||||
@ -94,8 +94,8 @@ engine_get_req_version (GpgmeProtocol proto)
|
||||
|
||||
|
||||
/* Verify the version requirement for the engine for PROTOCOL. */
|
||||
GpgmeError
|
||||
gpgme_engine_check_version (GpgmeProtocol proto)
|
||||
gpgme_error_t
|
||||
gpgme_engine_check_version (gpgme_protocol_t proto)
|
||||
{
|
||||
return _gpgme_compare_versions (engine_get_version (proto),
|
||||
engine_get_req_version (proto))
|
||||
@ -106,17 +106,17 @@ gpgme_engine_check_version (GpgmeProtocol proto)
|
||||
/* 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. */
|
||||
GpgmeError
|
||||
gpgme_get_engine_info (GpgmeEngineInfo *info)
|
||||
gpgme_error_t
|
||||
gpgme_get_engine_info (gpgme_engine_info_t *info)
|
||||
{
|
||||
static GpgmeEngineInfo engine_info;
|
||||
static gpgme_engine_info_t engine_info;
|
||||
DEFINE_STATIC_LOCK (engine_info_lock);
|
||||
|
||||
LOCK (engine_info_lock);
|
||||
if (!engine_info)
|
||||
{
|
||||
GpgmeEngineInfo *lastp = &engine_info;
|
||||
GpgmeProtocol proto_list[] = { GPGME_PROTOCOL_OpenPGP,
|
||||
gpgme_engine_info_t *lastp = &engine_info;
|
||||
gpgme_protocol_t proto_list[] = { GPGME_PROTOCOL_OpenPGP,
|
||||
GPGME_PROTOCOL_CMS };
|
||||
int proto;
|
||||
|
||||
@ -132,7 +132,7 @@ gpgme_get_engine_info (GpgmeEngineInfo *info)
|
||||
{
|
||||
while (engine_info)
|
||||
{
|
||||
GpgmeEngineInfo next_info = engine_info->next;
|
||||
gpgme_engine_info_t next_info = engine_info->next;
|
||||
free (engine_info);
|
||||
engine_info = next_info;
|
||||
}
|
||||
@ -153,8 +153,8 @@ gpgme_get_engine_info (GpgmeEngineInfo *info)
|
||||
}
|
||||
|
||||
|
||||
GpgmeError
|
||||
_gpgme_engine_new (GpgmeProtocol proto, EngineObject *r_engine)
|
||||
gpgme_error_t
|
||||
_gpgme_engine_new (gpgme_protocol_t proto, EngineObject *r_engine)
|
||||
{
|
||||
EngineObject engine;
|
||||
|
||||
@ -179,7 +179,7 @@ _gpgme_engine_new (GpgmeProtocol proto, EngineObject *r_engine)
|
||||
engine->ops = engine_ops[proto];
|
||||
if (engine_ops[proto]->new)
|
||||
{
|
||||
GpgmeError err = (*engine_ops[proto]->new) (&engine->engine);
|
||||
gpgme_error_t err = (*engine_ops[proto]->new) (&engine->engine);
|
||||
if (err)
|
||||
{
|
||||
free (engine);
|
||||
@ -218,10 +218,10 @@ _gpgme_engine_set_status_handler (EngineObject engine,
|
||||
}
|
||||
|
||||
|
||||
GpgmeError
|
||||
gpgme_error_t
|
||||
_gpgme_engine_set_command_handler (EngineObject engine,
|
||||
EngineCommandHandler fnc, void *fnc_value,
|
||||
GpgmeData linked_data)
|
||||
gpgme_data_t linked_data)
|
||||
{
|
||||
if (!engine)
|
||||
return GPGME_Invalid_Value;
|
||||
@ -233,7 +233,7 @@ _gpgme_engine_set_command_handler (EngineObject engine,
|
||||
fnc, fnc_value, linked_data);
|
||||
}
|
||||
|
||||
GpgmeError _gpgme_engine_set_colon_line_handler (EngineObject engine,
|
||||
gpgme_error_t _gpgme_engine_set_colon_line_handler (EngineObject engine,
|
||||
EngineColonLineHandler fnc,
|
||||
void *fnc_value)
|
||||
{
|
||||
@ -247,8 +247,8 @@ GpgmeError _gpgme_engine_set_colon_line_handler (EngineObject engine,
|
||||
fnc, fnc_value);
|
||||
}
|
||||
|
||||
GpgmeError
|
||||
_gpgme_engine_op_decrypt (EngineObject engine, GpgmeData ciph, GpgmeData plain)
|
||||
gpgme_error_t
|
||||
_gpgme_engine_op_decrypt (EngineObject engine, gpgme_data_t ciph, gpgme_data_t plain)
|
||||
{
|
||||
if (!engine)
|
||||
return GPGME_Invalid_Value;
|
||||
@ -259,8 +259,8 @@ _gpgme_engine_op_decrypt (EngineObject engine, GpgmeData ciph, GpgmeData plain)
|
||||
return (*engine->ops->decrypt) (engine->engine, ciph, plain);
|
||||
}
|
||||
|
||||
GpgmeError
|
||||
_gpgme_engine_op_delete (EngineObject engine, GpgmeKey key, int allow_secret)
|
||||
gpgme_error_t
|
||||
_gpgme_engine_op_delete (EngineObject engine, gpgme_key_t key, int allow_secret)
|
||||
{
|
||||
if (!engine)
|
||||
return GPGME_Invalid_Value;
|
||||
@ -272,9 +272,9 @@ _gpgme_engine_op_delete (EngineObject engine, GpgmeKey key, int allow_secret)
|
||||
}
|
||||
|
||||
|
||||
GpgmeError
|
||||
_gpgme_engine_op_edit (EngineObject engine, GpgmeKey key, GpgmeData out,
|
||||
GpgmeCtx ctx /* FIXME */)
|
||||
gpgme_error_t
|
||||
_gpgme_engine_op_edit (EngineObject engine, gpgme_key_t key, gpgme_data_t out,
|
||||
gpgme_ctx_t ctx /* FIXME */)
|
||||
{
|
||||
if (!engine)
|
||||
return GPGME_Invalid_Value;
|
||||
@ -286,9 +286,9 @@ _gpgme_engine_op_edit (EngineObject engine, GpgmeKey key, GpgmeData out,
|
||||
}
|
||||
|
||||
|
||||
GpgmeError
|
||||
_gpgme_engine_op_encrypt (EngineObject engine, GpgmeRecipients recp,
|
||||
GpgmeData plain, GpgmeData ciph, int use_armor)
|
||||
gpgme_error_t
|
||||
_gpgme_engine_op_encrypt (EngineObject engine, gpgme_recipients_t recp,
|
||||
gpgme_data_t plain, gpgme_data_t ciph, int use_armor)
|
||||
{
|
||||
if (!engine)
|
||||
return GPGME_Invalid_Value;
|
||||
@ -301,10 +301,10 @@ _gpgme_engine_op_encrypt (EngineObject engine, GpgmeRecipients recp,
|
||||
}
|
||||
|
||||
|
||||
GpgmeError
|
||||
_gpgme_engine_op_encrypt_sign (EngineObject engine, GpgmeRecipients recp,
|
||||
GpgmeData plain, GpgmeData ciph, int use_armor,
|
||||
GpgmeCtx ctx /* FIXME */)
|
||||
gpgme_error_t
|
||||
_gpgme_engine_op_encrypt_sign (EngineObject engine, gpgme_recipients_t recp,
|
||||
gpgme_data_t plain, gpgme_data_t ciph, int use_armor,
|
||||
gpgme_ctx_t ctx /* FIXME */)
|
||||
{
|
||||
if (!engine)
|
||||
return GPGME_Invalid_Value;
|
||||
@ -317,9 +317,9 @@ _gpgme_engine_op_encrypt_sign (EngineObject engine, GpgmeRecipients recp,
|
||||
}
|
||||
|
||||
|
||||
GpgmeError
|
||||
_gpgme_engine_op_export (EngineObject engine, GpgmeRecipients recp,
|
||||
GpgmeData keydata, int use_armor)
|
||||
gpgme_error_t
|
||||
_gpgme_engine_op_export (EngineObject engine, gpgme_recipients_t recp,
|
||||
gpgme_data_t keydata, int use_armor)
|
||||
{
|
||||
if (!engine)
|
||||
return GPGME_Invalid_Value;
|
||||
@ -332,9 +332,9 @@ _gpgme_engine_op_export (EngineObject engine, GpgmeRecipients recp,
|
||||
}
|
||||
|
||||
|
||||
GpgmeError
|
||||
_gpgme_engine_op_genkey (EngineObject engine, GpgmeData help_data,
|
||||
int use_armor, GpgmeData pubkey, GpgmeData seckey)
|
||||
gpgme_error_t
|
||||
_gpgme_engine_op_genkey (EngineObject engine, gpgme_data_t help_data,
|
||||
int use_armor, gpgme_data_t pubkey, gpgme_data_t seckey)
|
||||
{
|
||||
if (!engine)
|
||||
return GPGME_Invalid_Value;
|
||||
@ -347,8 +347,8 @@ _gpgme_engine_op_genkey (EngineObject engine, GpgmeData help_data,
|
||||
}
|
||||
|
||||
|
||||
GpgmeError
|
||||
_gpgme_engine_op_import (EngineObject engine, GpgmeData keydata)
|
||||
gpgme_error_t
|
||||
_gpgme_engine_op_import (EngineObject engine, gpgme_data_t keydata)
|
||||
{
|
||||
if (!engine)
|
||||
return GPGME_Invalid_Value;
|
||||
@ -360,7 +360,7 @@ _gpgme_engine_op_import (EngineObject engine, GpgmeData keydata)
|
||||
}
|
||||
|
||||
|
||||
GpgmeError
|
||||
gpgme_error_t
|
||||
_gpgme_engine_op_keylist (EngineObject engine, const char *pattern,
|
||||
int secret_only, int keylist_mode)
|
||||
{
|
||||
@ -375,7 +375,7 @@ _gpgme_engine_op_keylist (EngineObject engine, const char *pattern,
|
||||
}
|
||||
|
||||
|
||||
GpgmeError
|
||||
gpgme_error_t
|
||||
_gpgme_engine_op_keylist_ext (EngineObject engine, const char *pattern[],
|
||||
int secret_only, int reserved, int keylist_mode)
|
||||
{
|
||||
@ -390,11 +390,11 @@ _gpgme_engine_op_keylist_ext (EngineObject engine, const char *pattern[],
|
||||
}
|
||||
|
||||
|
||||
GpgmeError
|
||||
_gpgme_engine_op_sign (EngineObject engine, GpgmeData in, GpgmeData out,
|
||||
GpgmeSigMode mode, int use_armor,
|
||||
gpgme_error_t
|
||||
_gpgme_engine_op_sign (EngineObject engine, gpgme_data_t in, gpgme_data_t out,
|
||||
gpgme_sig_mode_t mode, int use_armor,
|
||||
int use_textmode, int include_certs,
|
||||
GpgmeCtx ctx /* FIXME */)
|
||||
gpgme_ctx_t ctx /* FIXME */)
|
||||
{
|
||||
if (!engine)
|
||||
return GPGME_Invalid_Value;
|
||||
@ -407,7 +407,7 @@ _gpgme_engine_op_sign (EngineObject engine, GpgmeData in, GpgmeData out,
|
||||
}
|
||||
|
||||
|
||||
GpgmeError
|
||||
gpgme_error_t
|
||||
_gpgme_engine_op_trustlist (EngineObject engine, const char *pattern)
|
||||
{
|
||||
if (!engine)
|
||||
@ -420,9 +420,9 @@ _gpgme_engine_op_trustlist (EngineObject engine, const char *pattern)
|
||||
}
|
||||
|
||||
|
||||
GpgmeError
|
||||
_gpgme_engine_op_verify (EngineObject engine, GpgmeData sig,
|
||||
GpgmeData signed_text, GpgmeData plaintext)
|
||||
gpgme_error_t
|
||||
_gpgme_engine_op_verify (EngineObject engine, gpgme_data_t sig,
|
||||
gpgme_data_t signed_text, gpgme_data_t plaintext)
|
||||
{
|
||||
if (!engine)
|
||||
return GPGME_Invalid_Value;
|
||||
@ -435,8 +435,7 @@ _gpgme_engine_op_verify (EngineObject engine, GpgmeData sig,
|
||||
|
||||
|
||||
void
|
||||
_gpgme_engine_set_io_cbs (EngineObject engine,
|
||||
struct GpgmeIOCbs *io_cbs)
|
||||
_gpgme_engine_set_io_cbs (EngineObject engine, gpgme_io_cbs_t io_cbs)
|
||||
{
|
||||
if (!engine)
|
||||
return;
|
||||
@ -447,7 +446,7 @@ _gpgme_engine_set_io_cbs (EngineObject engine,
|
||||
|
||||
void
|
||||
_gpgme_engine_io_event (EngineObject engine,
|
||||
GpgmeEventIO type, void *type_data)
|
||||
gpgme_event_io_t type, void *type_data)
|
||||
{
|
||||
if (!engine)
|
||||
return;
|
||||
|
@ -26,67 +26,67 @@
|
||||
struct engine_object_s;
|
||||
typedef struct engine_object_s *EngineObject;
|
||||
|
||||
typedef GpgmeError (*EngineStatusHandler) (void *priv, GpgmeStatusCode code,
|
||||
typedef gpgme_error_t (*EngineStatusHandler) (void *priv, gpgme_status_code_t code,
|
||||
char *args);
|
||||
typedef GpgmeError (*EngineColonLineHandler) (void *priv, char *line);
|
||||
typedef GpgmeError (*EngineCommandHandler) (void *priv, GpgmeStatusCode code,
|
||||
typedef gpgme_error_t (*EngineColonLineHandler) (void *priv, char *line);
|
||||
typedef gpgme_error_t (*EngineCommandHandler) (void *priv, gpgme_status_code_t code,
|
||||
const char *keyword,
|
||||
const char **result);
|
||||
|
||||
GpgmeError _gpgme_engine_new (GpgmeProtocol proto, EngineObject *r_engine);
|
||||
gpgme_error_t _gpgme_engine_new (gpgme_protocol_t proto, EngineObject *r_engine);
|
||||
void _gpgme_engine_release (EngineObject engine);
|
||||
void _gpgme_engine_set_status_handler (EngineObject engine,
|
||||
EngineStatusHandler fnc,
|
||||
void *fnc_value);
|
||||
GpgmeError _gpgme_engine_set_command_handler (EngineObject engine,
|
||||
gpgme_error_t _gpgme_engine_set_command_handler (EngineObject engine,
|
||||
EngineCommandHandler fnc,
|
||||
void *fnc_value,
|
||||
GpgmeData data);
|
||||
GpgmeError _gpgme_engine_set_colon_line_handler (EngineObject engine,
|
||||
gpgme_data_t data);
|
||||
gpgme_error_t _gpgme_engine_set_colon_line_handler (EngineObject engine,
|
||||
EngineColonLineHandler fnc,
|
||||
void *fnc_value);
|
||||
GpgmeError _gpgme_engine_op_decrypt (EngineObject engine, GpgmeData ciph,
|
||||
GpgmeData plain);
|
||||
GpgmeError _gpgme_engine_op_delete (EngineObject engine, GpgmeKey key,
|
||||
gpgme_error_t _gpgme_engine_op_decrypt (EngineObject engine, gpgme_data_t ciph,
|
||||
gpgme_data_t plain);
|
||||
gpgme_error_t _gpgme_engine_op_delete (EngineObject engine, gpgme_key_t key,
|
||||
int allow_secret);
|
||||
GpgmeError _gpgme_engine_op_edit (EngineObject engine, GpgmeKey key,
|
||||
GpgmeData out, GpgmeCtx ctx /* FIXME */);
|
||||
GpgmeError _gpgme_engine_op_encrypt (EngineObject engine, GpgmeRecipients recp,
|
||||
GpgmeData plain, GpgmeData ciph,
|
||||
gpgme_error_t _gpgme_engine_op_edit (EngineObject engine, gpgme_key_t key,
|
||||
gpgme_data_t out, gpgme_ctx_t ctx /* FIXME */);
|
||||
gpgme_error_t _gpgme_engine_op_encrypt (EngineObject engine, gpgme_recipients_t recp,
|
||||
gpgme_data_t plain, gpgme_data_t ciph,
|
||||
int use_armor);
|
||||
GpgmeError _gpgme_engine_op_encrypt_sign (EngineObject engine,
|
||||
GpgmeRecipients recp,
|
||||
GpgmeData plain, GpgmeData ciph,
|
||||
gpgme_error_t _gpgme_engine_op_encrypt_sign (EngineObject engine,
|
||||
gpgme_recipients_t recp,
|
||||
gpgme_data_t plain, gpgme_data_t ciph,
|
||||
int use_armor,
|
||||
GpgmeCtx ctx /* FIXME */);
|
||||
GpgmeError _gpgme_engine_op_export (EngineObject engine, GpgmeRecipients recp,
|
||||
GpgmeData keydata, int use_armor);
|
||||
GpgmeError _gpgme_engine_op_genkey (EngineObject engine, GpgmeData help_data,
|
||||
int use_armor, GpgmeData pubkey,
|
||||
GpgmeData seckey);
|
||||
GpgmeError _gpgme_engine_op_import (EngineObject engine, GpgmeData keydata);
|
||||
GpgmeError _gpgme_engine_op_keylist (EngineObject engine, const char *pattern,
|
||||
gpgme_ctx_t ctx /* FIXME */);
|
||||
gpgme_error_t _gpgme_engine_op_export (EngineObject engine, gpgme_recipients_t recp,
|
||||
gpgme_data_t keydata, int use_armor);
|
||||
gpgme_error_t _gpgme_engine_op_genkey (EngineObject engine, gpgme_data_t help_data,
|
||||
int use_armor, gpgme_data_t pubkey,
|
||||
gpgme_data_t seckey);
|
||||
gpgme_error_t _gpgme_engine_op_import (EngineObject engine, gpgme_data_t keydata);
|
||||
gpgme_error_t _gpgme_engine_op_keylist (EngineObject engine, const char *pattern,
|
||||
int secret_only,
|
||||
int keylist_mode);
|
||||
GpgmeError _gpgme_engine_op_keylist_ext (EngineObject engine,
|
||||
gpgme_error_t _gpgme_engine_op_keylist_ext (EngineObject engine,
|
||||
const char *pattern[],
|
||||
int secret_only,
|
||||
int reserved,
|
||||
int keylist_mode);
|
||||
GpgmeError _gpgme_engine_op_sign (EngineObject engine, GpgmeData in,
|
||||
GpgmeData out, GpgmeSigMode mode,
|
||||
gpgme_error_t _gpgme_engine_op_sign (EngineObject engine, gpgme_data_t in,
|
||||
gpgme_data_t out, gpgme_sig_mode_t mode,
|
||||
int use_armor, int use_textmode,
|
||||
int include_certs,
|
||||
GpgmeCtx ctx /* FIXME */);
|
||||
GpgmeError _gpgme_engine_op_trustlist (EngineObject engine,
|
||||
gpgme_ctx_t ctx /* FIXME */);
|
||||
gpgme_error_t _gpgme_engine_op_trustlist (EngineObject engine,
|
||||
const char *pattern);
|
||||
GpgmeError _gpgme_engine_op_verify (EngineObject engine, GpgmeData sig,
|
||||
GpgmeData signed_text,
|
||||
GpgmeData plaintext);
|
||||
gpgme_error_t _gpgme_engine_op_verify (EngineObject engine, gpgme_data_t sig,
|
||||
gpgme_data_t signed_text,
|
||||
gpgme_data_t plaintext);
|
||||
|
||||
void _gpgme_engine_set_io_cbs (EngineObject engine,
|
||||
struct GpgmeIOCbs *io_cbs);
|
||||
gpgme_io_cbs_t io_cbs);
|
||||
void _gpgme_engine_io_event (EngineObject engine,
|
||||
GpgmeEventIO type, void *type_data);
|
||||
gpgme_event_io_t type, void *type_data);
|
||||
|
||||
#endif /* ENGINE_H */
|
||||
|
@ -27,18 +27,18 @@
|
||||
#include "ops.h"
|
||||
|
||||
|
||||
static GpgmeError
|
||||
export_status_handler (void *priv, GpgmeStatusCode code, char *args)
|
||||
static gpgme_error_t
|
||||
export_status_handler (void *priv, gpgme_status_code_t code, char *args)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
export_start (GpgmeCtx ctx, int synchronous,
|
||||
GpgmeRecipients recp, GpgmeData keydata)
|
||||
static gpgme_error_t
|
||||
export_start (gpgme_ctx_t ctx, int synchronous,
|
||||
gpgme_recipients_t recp, gpgme_data_t keydata)
|
||||
{
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
|
||||
if (!keydata || !recp)
|
||||
return GPGME_Invalid_Value;
|
||||
@ -54,18 +54,18 @@ export_start (GpgmeCtx ctx, int synchronous,
|
||||
|
||||
|
||||
/* Export the keys listed in RECP into KEYDATA. */
|
||||
GpgmeError
|
||||
gpgme_op_export_start (GpgmeCtx ctx, GpgmeRecipients recp, GpgmeData keydata)
|
||||
gpgme_error_t
|
||||
gpgme_op_export_start (gpgme_ctx_t ctx, gpgme_recipients_t recp, gpgme_data_t keydata)
|
||||
{
|
||||
return export_start (ctx, 0, recp, keydata);
|
||||
}
|
||||
|
||||
|
||||
/* Export the keys listed in RECP into KEYDATA. */
|
||||
GpgmeError
|
||||
gpgme_op_export (GpgmeCtx ctx, GpgmeRecipients recipients, GpgmeData keydata)
|
||||
gpgme_error_t
|
||||
gpgme_op_export (gpgme_ctx_t ctx, gpgme_recipients_t recipients, gpgme_data_t keydata)
|
||||
{
|
||||
GpgmeError err = export_start (ctx, 1, recipients, keydata);
|
||||
gpgme_error_t err = export_start (ctx, 1, recipients, keydata);
|
||||
if (!err)
|
||||
err = _gpgme_wait_one (ctx);
|
||||
return err;
|
||||
|
@ -34,7 +34,7 @@ typedef struct
|
||||
struct _gpgme_op_genkey_result result;
|
||||
|
||||
/* The key parameters passed to the crypto engine. */
|
||||
GpgmeData key_parameter;
|
||||
gpgme_data_t key_parameter;
|
||||
} *op_data_t;
|
||||
|
||||
|
||||
@ -50,11 +50,11 @@ release_op_data (void *hook)
|
||||
}
|
||||
|
||||
|
||||
GpgmeGenKeyResult
|
||||
gpgme_op_genkey_result (GpgmeCtx ctx)
|
||||
gpgme_genkey_result_t
|
||||
gpgme_op_genkey_result (gpgme_ctx_t ctx)
|
||||
{
|
||||
op_data_t opd;
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
|
||||
err = _gpgme_op_data_lookup (ctx, OPDATA_GENKEY, (void **) &opd, -1, NULL);
|
||||
if (err || !opd)
|
||||
@ -64,11 +64,11 @@ gpgme_op_genkey_result (GpgmeCtx ctx)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
genkey_status_handler (void *priv, GpgmeStatusCode code, char *args)
|
||||
static gpgme_error_t
|
||||
genkey_status_handler (void *priv, gpgme_status_code_t code, char *args)
|
||||
{
|
||||
GpgmeCtx ctx = (GpgmeCtx) priv;
|
||||
GpgmeError err;
|
||||
gpgme_ctx_t ctx = (gpgme_ctx_t) priv;
|
||||
gpgme_error_t err;
|
||||
op_data_t opd;
|
||||
|
||||
/* Pipe the status code through the progress status handler. */
|
||||
@ -114,8 +114,8 @@ genkey_status_handler (void *priv, GpgmeStatusCode code, char *args)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
get_key_parameter (const char *parms, GpgmeData *key_parameter)
|
||||
static gpgme_error_t
|
||||
get_key_parameter (const char *parms, gpgme_data_t *key_parameter)
|
||||
{
|
||||
const char *content;
|
||||
const char *attrib;
|
||||
@ -145,11 +145,11 @@ get_key_parameter (const char *parms, GpgmeData *key_parameter)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
genkey_start (GpgmeCtx ctx, int synchronous, const char *parms,
|
||||
GpgmeData pubkey, GpgmeData seckey)
|
||||
static gpgme_error_t
|
||||
genkey_start (gpgme_ctx_t ctx, int synchronous, const char *parms,
|
||||
gpgme_data_t pubkey, gpgme_data_t seckey)
|
||||
{
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
op_data_t opd;
|
||||
err = _gpgme_op_reset (ctx, synchronous);
|
||||
if (err)
|
||||
@ -174,9 +174,9 @@ genkey_start (GpgmeCtx ctx, int synchronous, const char *parms,
|
||||
/* 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. */
|
||||
GpgmeError
|
||||
gpgme_op_genkey_start (GpgmeCtx ctx, const char *parms,
|
||||
GpgmeData pubkey, GpgmeData seckey)
|
||||
gpgme_error_t
|
||||
gpgme_op_genkey_start (gpgme_ctx_t ctx, const char *parms,
|
||||
gpgme_data_t pubkey, gpgme_data_t seckey)
|
||||
{
|
||||
return genkey_start (ctx, 0, parms, pubkey, seckey);
|
||||
}
|
||||
@ -185,11 +185,11 @@ gpgme_op_genkey_start (GpgmeCtx ctx, const char *parms,
|
||||
/* 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. */
|
||||
GpgmeError
|
||||
gpgme_op_genkey (GpgmeCtx ctx, const char *parms, GpgmeData pubkey,
|
||||
GpgmeData seckey)
|
||||
gpgme_error_t
|
||||
gpgme_op_genkey (gpgme_ctx_t ctx, const char *parms, gpgme_data_t pubkey,
|
||||
gpgme_data_t seckey)
|
||||
{
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
|
||||
err = genkey_start (ctx, 1, parms, pubkey, seckey);
|
||||
if (!err)
|
||||
|
@ -33,10 +33,10 @@
|
||||
|
||||
/* Create a new context as an environment for GPGME crypto
|
||||
operations. */
|
||||
GpgmeError
|
||||
gpgme_new (GpgmeCtx *r_ctx)
|
||||
gpgme_error_t
|
||||
gpgme_new (gpgme_ctx_t *r_ctx)
|
||||
{
|
||||
GpgmeCtx ctx;
|
||||
gpgme_ctx_t ctx;
|
||||
|
||||
if (!r_ctx)
|
||||
return GPGME_Invalid_Value;
|
||||
@ -60,7 +60,7 @@ gpgme_new (GpgmeCtx *r_ctx)
|
||||
* Release all resources associated with the given context.
|
||||
**/
|
||||
void
|
||||
gpgme_release (GpgmeCtx ctx)
|
||||
gpgme_release (gpgme_ctx_t ctx)
|
||||
{
|
||||
if (!ctx)
|
||||
return;
|
||||
@ -74,7 +74,7 @@ gpgme_release (GpgmeCtx ctx)
|
||||
}
|
||||
|
||||
void
|
||||
_gpgme_release_result (GpgmeCtx ctx)
|
||||
_gpgme_release_result (gpgme_ctx_t ctx)
|
||||
{
|
||||
struct ctx_op_data *data = ctx->op_data;
|
||||
|
||||
@ -90,8 +90,8 @@ _gpgme_release_result (GpgmeCtx ctx)
|
||||
}
|
||||
|
||||
|
||||
GpgmeError
|
||||
gpgme_set_protocol (GpgmeCtx ctx, GpgmeProtocol protocol)
|
||||
gpgme_error_t
|
||||
gpgme_set_protocol (gpgme_ctx_t ctx, gpgme_protocol_t protocol)
|
||||
{
|
||||
if (protocol != GPGME_PROTOCOL_OpenPGP && protocol != GPGME_PROTOCOL_CMS)
|
||||
return GPGME_Invalid_Value;
|
||||
@ -101,15 +101,15 @@ gpgme_set_protocol (GpgmeCtx ctx, GpgmeProtocol protocol)
|
||||
}
|
||||
|
||||
|
||||
GpgmeProtocol
|
||||
gpgme_get_protocol (GpgmeCtx ctx)
|
||||
gpgme_protocol_t
|
||||
gpgme_get_protocol (gpgme_ctx_t ctx)
|
||||
{
|
||||
return ctx->protocol;
|
||||
}
|
||||
|
||||
|
||||
const char *
|
||||
gpgme_get_protocol_name (GpgmeProtocol protocol)
|
||||
gpgme_get_protocol_name (gpgme_protocol_t protocol)
|
||||
{
|
||||
switch (protocol)
|
||||
{
|
||||
@ -132,7 +132,7 @@ gpgme_get_protocol_name (GpgmeProtocol protocol)
|
||||
* Enable or disable the use of an ascii armor for all output.
|
||||
**/
|
||||
void
|
||||
gpgme_set_armor (GpgmeCtx ctx, int yes)
|
||||
gpgme_set_armor (gpgme_ctx_t ctx, int yes)
|
||||
{
|
||||
if (!ctx)
|
||||
return;
|
||||
@ -150,7 +150,7 @@ gpgme_set_armor (GpgmeCtx ctx, int yes)
|
||||
* Return value: Boolean whether armor mode is to be used.
|
||||
**/
|
||||
int
|
||||
gpgme_get_armor (GpgmeCtx ctx)
|
||||
gpgme_get_armor (gpgme_ctx_t ctx)
|
||||
{
|
||||
return ctx && ctx->use_armor;
|
||||
}
|
||||
@ -166,7 +166,7 @@ gpgme_get_armor (GpgmeCtx ctx)
|
||||
* that the MUA does some preparations so that textmode is not needed anymore.
|
||||
**/
|
||||
void
|
||||
gpgme_set_textmode (GpgmeCtx ctx, int yes)
|
||||
gpgme_set_textmode (gpgme_ctx_t ctx, int yes)
|
||||
{
|
||||
if (!ctx)
|
||||
return;
|
||||
@ -183,7 +183,7 @@ gpgme_set_textmode (GpgmeCtx ctx, int yes)
|
||||
* Return value: Boolean whether textmode is to be used.
|
||||
**/
|
||||
int
|
||||
gpgme_get_textmode (GpgmeCtx ctx)
|
||||
gpgme_get_textmode (gpgme_ctx_t ctx)
|
||||
{
|
||||
return ctx && ctx->use_textmode;
|
||||
}
|
||||
@ -200,7 +200,7 @@ gpgme_get_textmode (GpgmeCtx ctx)
|
||||
* Return value: Boolean whether textmode is to be used.
|
||||
**/
|
||||
void
|
||||
gpgme_set_include_certs (GpgmeCtx ctx, int nr_of_certs)
|
||||
gpgme_set_include_certs (gpgme_ctx_t ctx, int nr_of_certs)
|
||||
{
|
||||
if (nr_of_certs < -2)
|
||||
ctx->include_certs = -2;
|
||||
@ -218,7 +218,7 @@ gpgme_set_include_certs (GpgmeCtx ctx, int nr_of_certs)
|
||||
* Return value: Boolean whether textmode is to be used.
|
||||
**/
|
||||
int
|
||||
gpgme_get_include_certs (GpgmeCtx ctx)
|
||||
gpgme_get_include_certs (gpgme_ctx_t ctx)
|
||||
{
|
||||
return ctx->include_certs;
|
||||
}
|
||||
@ -236,8 +236,8 @@ gpgme_get_include_certs (GpgmeCtx ctx)
|
||||
* Return value: GPGME_Invalid_Value if ctx is not a context or mode
|
||||
* not a valid mode.
|
||||
**/
|
||||
GpgmeError
|
||||
gpgme_set_keylist_mode (GpgmeCtx ctx, int mode)
|
||||
gpgme_error_t
|
||||
gpgme_set_keylist_mode (gpgme_ctx_t ctx, int mode)
|
||||
{
|
||||
if (!ctx)
|
||||
return GPGME_Invalid_Value;
|
||||
@ -264,7 +264,7 @@ gpgme_set_keylist_mode (GpgmeCtx ctx, int mode)
|
||||
* Note that 0 is never a valid mode.
|
||||
**/
|
||||
int
|
||||
gpgme_get_keylist_mode (GpgmeCtx ctx)
|
||||
gpgme_get_keylist_mode (gpgme_ctx_t ctx)
|
||||
{
|
||||
if (!ctx)
|
||||
return 0;
|
||||
@ -285,7 +285,7 @@ gpgme_get_keylist_mode (GpgmeCtx ctx)
|
||||
*
|
||||
* The callback function is defined as:
|
||||
* <literal>
|
||||
* typedef const char *(*GpgmePassphraseCb)(void*cb_value,
|
||||
* typedef const char *(*gpgme_passphrase_cb_t)(void*cb_value,
|
||||
* const char *desc,
|
||||
* void **r_hd);
|
||||
* </literal>
|
||||
@ -300,7 +300,7 @@ gpgme_get_keylist_mode (GpgmeCtx ctx)
|
||||
*
|
||||
**/
|
||||
void
|
||||
gpgme_set_passphrase_cb (GpgmeCtx ctx, GpgmePassphraseCb cb, void *cb_value)
|
||||
gpgme_set_passphrase_cb (gpgme_ctx_t ctx, gpgme_passphrase_cb_t cb, void *cb_value)
|
||||
{
|
||||
if (ctx)
|
||||
{
|
||||
@ -320,7 +320,7 @@ gpgme_set_passphrase_cb (GpgmeCtx ctx, GpgmePassphraseCb cb, void *cb_value)
|
||||
* to the crypto engine.
|
||||
**/
|
||||
void
|
||||
gpgme_get_passphrase_cb (GpgmeCtx ctx, GpgmePassphraseCb *r_cb, void **r_cb_value)
|
||||
gpgme_get_passphrase_cb (gpgme_ctx_t ctx, gpgme_passphrase_cb_t *r_cb, void **r_cb_value)
|
||||
{
|
||||
if (ctx)
|
||||
{
|
||||
@ -349,7 +349,7 @@ gpgme_get_passphrase_cb (GpgmeCtx ctx, GpgmePassphraseCb *r_cb, void **r_cb_valu
|
||||
*
|
||||
* The callback function is defined as:
|
||||
* <literal>
|
||||
* typedef void (*GpgmeProgressCb) (void *cb_value,
|
||||
* typedef void (*gpgme_progress_cb_t) (void *cb_value,
|
||||
* const char *what, int type,
|
||||
* int curretn, int total);
|
||||
* </literal>
|
||||
@ -357,7 +357,7 @@ gpgme_get_passphrase_cb (GpgmeCtx ctx, GpgmePassphraseCb *r_cb, void **r_cb_valu
|
||||
* status in the file doc/DETAILS of the GnuPG distribution.
|
||||
**/
|
||||
void
|
||||
gpgme_set_progress_cb (GpgmeCtx ctx, GpgmeProgressCb cb, void *cb_value)
|
||||
gpgme_set_progress_cb (gpgme_ctx_t ctx, gpgme_progress_cb_t cb, void *cb_value)
|
||||
{
|
||||
if (ctx)
|
||||
{
|
||||
@ -377,7 +377,7 @@ gpgme_set_progress_cb (GpgmeCtx ctx, GpgmeProgressCb cb, void *cb_value)
|
||||
* progress indicator.
|
||||
**/
|
||||
void
|
||||
gpgme_get_progress_cb (GpgmeCtx ctx, GpgmeProgressCb *r_cb, void **r_cb_value)
|
||||
gpgme_get_progress_cb (gpgme_ctx_t ctx, gpgme_progress_cb_t *r_cb, void **r_cb_value)
|
||||
{
|
||||
if (ctx)
|
||||
{
|
||||
@ -405,7 +405,7 @@ gpgme_get_progress_cb (GpgmeCtx ctx, GpgmeProgressCb *r_cb, void **r_cb_value)
|
||||
*
|
||||
**/
|
||||
void
|
||||
gpgme_set_io_cbs (GpgmeCtx ctx, struct GpgmeIOCbs *io_cbs)
|
||||
gpgme_set_io_cbs (gpgme_ctx_t ctx, gpgme_io_cbs_t io_cbs)
|
||||
{
|
||||
if (!ctx)
|
||||
return;
|
||||
@ -435,7 +435,7 @@ gpgme_set_io_cbs (GpgmeCtx ctx, struct GpgmeIOCbs *io_cbs)
|
||||
* to the crypto engine.
|
||||
**/
|
||||
void
|
||||
gpgme_get_io_cbs (GpgmeCtx ctx, struct GpgmeIOCbs *io_cbs)
|
||||
gpgme_get_io_cbs (gpgme_ctx_t ctx, gpgme_io_cbs_t io_cbs)
|
||||
{
|
||||
if (ctx && io_cbs)
|
||||
*io_cbs = ctx->io_cbs;
|
||||
@ -443,7 +443,7 @@ gpgme_get_io_cbs (GpgmeCtx ctx, struct GpgmeIOCbs *io_cbs)
|
||||
|
||||
|
||||
const char *
|
||||
gpgme_pubkey_algo_name (GpgmePubKeyAlgo algo)
|
||||
gpgme_pubkey_algo_name (gpgme_pubkey_algo_t algo)
|
||||
{
|
||||
switch (algo)
|
||||
{
|
||||
@ -472,7 +472,7 @@ gpgme_pubkey_algo_name (GpgmePubKeyAlgo algo)
|
||||
|
||||
|
||||
const char *
|
||||
gpgme_hash_algo_name (GpgmeHashAlgo algo)
|
||||
gpgme_hash_algo_name (gpgme_hash_algo_t algo)
|
||||
{
|
||||
switch (algo)
|
||||
{
|
||||
|
638
gpgme/gpgme.h
638
gpgme/gpgme.h
File diff suppressed because it is too large
Load Diff
@ -37,7 +37,7 @@ typedef struct
|
||||
/* A pointer to the next pointer of the last import status in the
|
||||
list. This makes appending new imports painless while preserving
|
||||
the order. */
|
||||
GpgmeImportStatus *lastp;
|
||||
gpgme_import_status_t *lastp;
|
||||
} *op_data_t;
|
||||
|
||||
|
||||
@ -45,11 +45,11 @@ static void
|
||||
release_op_data (void *hook)
|
||||
{
|
||||
op_data_t opd = (op_data_t) hook;
|
||||
GpgmeImportStatus import = opd->result.imports;
|
||||
gpgme_import_status_t import = opd->result.imports;
|
||||
|
||||
while (import)
|
||||
{
|
||||
GpgmeImportStatus next = import->next;
|
||||
gpgme_import_status_t next = import->next;
|
||||
free (import->fpr);
|
||||
free (import);
|
||||
import = next;
|
||||
@ -57,11 +57,11 @@ release_op_data (void *hook)
|
||||
}
|
||||
|
||||
|
||||
GpgmeImportResult
|
||||
gpgme_op_import_result (GpgmeCtx ctx)
|
||||
gpgme_import_result_t
|
||||
gpgme_op_import_result (gpgme_ctx_t ctx)
|
||||
{
|
||||
op_data_t opd;
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
|
||||
err = _gpgme_op_data_lookup (ctx, OPDATA_IMPORT, (void **) &opd, -1, NULL);
|
||||
if (err || !opd)
|
||||
@ -71,10 +71,10 @@ gpgme_op_import_result (GpgmeCtx ctx)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
parse_import (char *args, GpgmeImportStatus *import_status, int problem)
|
||||
static gpgme_error_t
|
||||
parse_import (char *args, gpgme_import_status_t *import_status, int problem)
|
||||
{
|
||||
GpgmeImportStatus import;
|
||||
gpgme_import_status_t import;
|
||||
char *tail;
|
||||
long int nr;
|
||||
|
||||
@ -142,8 +142,8 @@ parse_import (char *args, GpgmeImportStatus *import_status, int problem)
|
||||
|
||||
|
||||
|
||||
GpgmeError
|
||||
parse_import_res (char *args, GpgmeImportResult result)
|
||||
gpgme_error_t
|
||||
parse_import_res (char *args, gpgme_import_result_t result)
|
||||
{
|
||||
char *tail;
|
||||
|
||||
@ -174,11 +174,11 @@ parse_import_res (char *args, GpgmeImportResult result)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
import_status_handler (void *priv, GpgmeStatusCode code, char *args)
|
||||
static gpgme_error_t
|
||||
import_status_handler (void *priv, gpgme_status_code_t code, char *args)
|
||||
{
|
||||
GpgmeCtx ctx = (GpgmeCtx) priv;
|
||||
GpgmeError err;
|
||||
gpgme_ctx_t ctx = (gpgme_ctx_t) priv;
|
||||
gpgme_error_t err;
|
||||
op_data_t opd;
|
||||
|
||||
err = _gpgme_op_data_lookup (ctx, OPDATA_IMPORT, (void **) &opd,
|
||||
@ -209,10 +209,10 @@ import_status_handler (void *priv, GpgmeStatusCode code, char *args)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
_gpgme_op_import_start (GpgmeCtx ctx, int synchronous, GpgmeData keydata)
|
||||
static gpgme_error_t
|
||||
_gpgme_op_import_start (gpgme_ctx_t ctx, int synchronous, gpgme_data_t keydata)
|
||||
{
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
op_data_t opd;
|
||||
|
||||
err = _gpgme_op_reset (ctx, synchronous);
|
||||
@ -234,31 +234,31 @@ _gpgme_op_import_start (GpgmeCtx ctx, int synchronous, GpgmeData keydata)
|
||||
}
|
||||
|
||||
|
||||
GpgmeError
|
||||
gpgme_op_import_start (GpgmeCtx ctx, GpgmeData keydata)
|
||||
gpgme_error_t
|
||||
gpgme_op_import_start (gpgme_ctx_t ctx, gpgme_data_t keydata)
|
||||
{
|
||||
return _gpgme_op_import_start (ctx, 0, keydata);
|
||||
}
|
||||
|
||||
|
||||
/* Import the key in KEYDATA into the keyring. */
|
||||
GpgmeError
|
||||
gpgme_op_import (GpgmeCtx ctx, GpgmeData keydata)
|
||||
gpgme_error_t
|
||||
gpgme_op_import (gpgme_ctx_t ctx, gpgme_data_t keydata)
|
||||
{
|
||||
GpgmeError err = _gpgme_op_import_start (ctx, 1, keydata);
|
||||
gpgme_error_t err = _gpgme_op_import_start (ctx, 1, keydata);
|
||||
if (!err)
|
||||
err = _gpgme_wait_one (ctx);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
GpgmeError
|
||||
gpgme_op_import_ext (GpgmeCtx ctx, GpgmeData keydata, int *nr)
|
||||
gpgme_error_t
|
||||
gpgme_op_import_ext (gpgme_ctx_t ctx, gpgme_data_t keydata, int *nr)
|
||||
{
|
||||
GpgmeError err = gpgme_op_import (ctx, keydata);
|
||||
gpgme_error_t err = gpgme_op_import (ctx, keydata);
|
||||
if (!err && nr)
|
||||
{
|
||||
GpgmeImportResult result = gpgme_op_import_result (ctx);
|
||||
gpgme_import_result_t result = gpgme_op_import_result (ctx);
|
||||
*nr = result->considered;
|
||||
}
|
||||
return err;
|
||||
|
74
gpgme/key.c
74
gpgme/key.c
@ -37,10 +37,10 @@ DEFINE_STATIC_LOCK (key_ref_lock);
|
||||
|
||||
|
||||
/* Create a new key. */
|
||||
GpgmeError
|
||||
_gpgme_key_new (GpgmeKey *r_key)
|
||||
gpgme_error_t
|
||||
_gpgme_key_new (gpgme_key_t *r_key)
|
||||
{
|
||||
GpgmeKey key;
|
||||
gpgme_key_t key;
|
||||
|
||||
key = calloc (1, sizeof *key);
|
||||
if (!key)
|
||||
@ -52,10 +52,10 @@ _gpgme_key_new (GpgmeKey *r_key)
|
||||
}
|
||||
|
||||
|
||||
GpgmeError
|
||||
_gpgme_key_add_subkey (GpgmeKey key, GpgmeSubkey *r_subkey)
|
||||
gpgme_error_t
|
||||
_gpgme_key_add_subkey (gpgme_key_t key, gpgme_subkey_t *r_subkey)
|
||||
{
|
||||
GpgmeSubkey subkey;
|
||||
gpgme_subkey_t subkey;
|
||||
|
||||
subkey = calloc (1, sizeof *subkey);
|
||||
if (!subkey)
|
||||
@ -200,10 +200,10 @@ parse_x509_user_id (char *src, char **name, char **email,
|
||||
|
||||
/* Take a name from the --with-colon listing, remove certain escape
|
||||
sequences sequences and put it into the list of UIDs. */
|
||||
GpgmeError
|
||||
_gpgme_key_append_name (GpgmeKey key, char *src)
|
||||
gpgme_error_t
|
||||
_gpgme_key_append_name (gpgme_key_t key, char *src)
|
||||
{
|
||||
GpgmeUserID uid;
|
||||
gpgme_user_id_t uid;
|
||||
char *dst;
|
||||
int src_len = strlen (src);
|
||||
|
||||
@ -238,12 +238,12 @@ _gpgme_key_append_name (GpgmeKey key, char *src)
|
||||
}
|
||||
|
||||
|
||||
GpgmeKeySig
|
||||
_gpgme_key_add_sig (GpgmeKey key, char *src)
|
||||
gpgme_key_sig_t
|
||||
_gpgme_key_add_sig (gpgme_key_t key, char *src)
|
||||
{
|
||||
int src_len = src ? strlen (src) : 0;
|
||||
GpgmeUserID uid;
|
||||
GpgmeKeySig sig;
|
||||
gpgme_user_id_t uid;
|
||||
gpgme_key_sig_t sig;
|
||||
|
||||
assert (key); /* XXX */
|
||||
|
||||
@ -285,7 +285,7 @@ _gpgme_key_add_sig (GpgmeKey key, char *src)
|
||||
|
||||
/* Acquire a reference to KEY. */
|
||||
void
|
||||
gpgme_key_ref (GpgmeKey key)
|
||||
gpgme_key_ref (gpgme_key_t key)
|
||||
{
|
||||
LOCK (key_ref_lock);
|
||||
key->_refs++;
|
||||
@ -299,10 +299,10 @@ gpgme_key_ref (GpgmeKey key)
|
||||
created key object as well as for every gpgme_key_ref() done on the
|
||||
key object. */
|
||||
void
|
||||
gpgme_key_unref (GpgmeKey key)
|
||||
gpgme_key_unref (gpgme_key_t key)
|
||||
{
|
||||
GpgmeUserID uid;
|
||||
GpgmeSubkey subkey;
|
||||
gpgme_user_id_t uid;
|
||||
gpgme_subkey_t subkey;
|
||||
|
||||
LOCK (key_ref_lock);
|
||||
assert (key->_refs > 0);
|
||||
@ -316,7 +316,7 @@ gpgme_key_unref (GpgmeKey key)
|
||||
subkey = key->subkeys;
|
||||
while (subkey)
|
||||
{
|
||||
GpgmeSubkey next = subkey->next;
|
||||
gpgme_subkey_t next = subkey->next;
|
||||
if (subkey->fpr)
|
||||
free (subkey->fpr);
|
||||
free (subkey);
|
||||
@ -326,12 +326,12 @@ gpgme_key_unref (GpgmeKey key)
|
||||
uid = key->uids;
|
||||
while (uid)
|
||||
{
|
||||
GpgmeUserID next_uid = uid->next;
|
||||
GpgmeKeySig keysig = uid->signatures;
|
||||
gpgme_user_id_t next_uid = uid->next;
|
||||
gpgme_key_sig_t keysig = uid->signatures;
|
||||
|
||||
while (keysig)
|
||||
{
|
||||
GpgmeKeySig next = keysig->next;
|
||||
gpgme_key_sig_t next = keysig->next;
|
||||
free (keysig);
|
||||
keysig = next;
|
||||
}
|
||||
@ -354,7 +354,7 @@ gpgme_key_unref (GpgmeKey key)
|
||||
/* Compatibility interfaces. */
|
||||
|
||||
void
|
||||
gpgme_key_release (GpgmeKey key)
|
||||
gpgme_key_release (gpgme_key_t key)
|
||||
{
|
||||
gpgme_key_unref (key);
|
||||
}
|
||||
@ -411,7 +411,7 @@ validity_to_string (int validity)
|
||||
|
||||
|
||||
static const char *
|
||||
capabilities_to_string (GpgmeSubkey subkey)
|
||||
capabilities_to_string (gpgme_subkey_t subkey)
|
||||
{
|
||||
static const char *const strings[8] =
|
||||
{
|
||||
@ -433,11 +433,11 @@ capabilities_to_string (GpgmeSubkey subkey)
|
||||
/* Return the value of the attribute WHAT of ITEM, which has to be
|
||||
representable by a string. */
|
||||
const char *
|
||||
gpgme_key_get_string_attr (GpgmeKey key, GpgmeAttr what,
|
||||
gpgme_key_get_string_attr (gpgme_key_t key, _gpgme_attr_t what,
|
||||
const void *reserved, int idx)
|
||||
{
|
||||
GpgmeSubkey subkey;
|
||||
GpgmeUserID uid;
|
||||
gpgme_subkey_t subkey;
|
||||
gpgme_user_id_t uid;
|
||||
int i;
|
||||
|
||||
if (!key || reserved || idx < 0)
|
||||
@ -512,11 +512,11 @@ gpgme_key_get_string_attr (GpgmeKey key, GpgmeAttr what,
|
||||
|
||||
|
||||
unsigned long
|
||||
gpgme_key_get_ulong_attr (GpgmeKey key, GpgmeAttr what,
|
||||
gpgme_key_get_ulong_attr (gpgme_key_t key, _gpgme_attr_t what,
|
||||
const void *reserved, int idx)
|
||||
{
|
||||
GpgmeSubkey subkey;
|
||||
GpgmeUserID uid;
|
||||
gpgme_subkey_t subkey;
|
||||
gpgme_user_id_t uid;
|
||||
int i;
|
||||
|
||||
if (!key || reserved || idx < 0)
|
||||
@ -601,11 +601,11 @@ gpgme_key_get_ulong_attr (GpgmeKey key, GpgmeAttr what,
|
||||
}
|
||||
|
||||
|
||||
static GpgmeKeySig
|
||||
get_keysig (GpgmeKey key, int uid_idx, int idx)
|
||||
static gpgme_key_sig_t
|
||||
get_keysig (gpgme_key_t key, int uid_idx, int idx)
|
||||
{
|
||||
GpgmeUserID uid;
|
||||
GpgmeKeySig sig;
|
||||
gpgme_user_id_t uid;
|
||||
gpgme_key_sig_t sig;
|
||||
|
||||
if (!key || uid_idx < 0 || idx < 0)
|
||||
return NULL;
|
||||
@ -630,10 +630,10 @@ get_keysig (GpgmeKey key, int uid_idx, int idx)
|
||||
|
||||
|
||||
const char *
|
||||
gpgme_key_sig_get_string_attr (GpgmeKey key, int uid_idx, GpgmeAttr what,
|
||||
gpgme_key_sig_get_string_attr (gpgme_key_t key, int uid_idx, _gpgme_attr_t what,
|
||||
const void *reserved, int idx)
|
||||
{
|
||||
GpgmeKeySig certsig = get_keysig (key, uid_idx, idx);
|
||||
gpgme_key_sig_t certsig = get_keysig (key, uid_idx, idx);
|
||||
|
||||
if (!certsig || reserved)
|
||||
return NULL;
|
||||
@ -665,10 +665,10 @@ gpgme_key_sig_get_string_attr (GpgmeKey key, int uid_idx, GpgmeAttr what,
|
||||
|
||||
|
||||
unsigned long
|
||||
gpgme_key_sig_get_ulong_attr (GpgmeKey key, int uid_idx, GpgmeAttr what,
|
||||
gpgme_key_sig_get_ulong_attr (gpgme_key_t key, int uid_idx, _gpgme_attr_t what,
|
||||
const void *reserved, int idx)
|
||||
{
|
||||
GpgmeKeySig certsig = get_keysig (key, uid_idx, idx);
|
||||
gpgme_key_sig_t certsig = get_keysig (key, uid_idx, idx);
|
||||
|
||||
if (!certsig || reserved)
|
||||
return 0;
|
||||
|
@ -38,15 +38,15 @@
|
||||
struct key_queue_item_s
|
||||
{
|
||||
struct key_queue_item_s *next;
|
||||
GpgmeKey key;
|
||||
gpgme_key_t key;
|
||||
};
|
||||
|
||||
typedef struct
|
||||
{
|
||||
struct _gpgme_op_keylist_result result;
|
||||
|
||||
GpgmeKey tmp_key;
|
||||
GpgmeUserID tmp_uid;
|
||||
gpgme_key_t tmp_key;
|
||||
gpgme_user_id_t tmp_uid;
|
||||
/* Something new is available. */
|
||||
int key_cond;
|
||||
struct key_queue_item_s *key_queue;
|
||||
@ -73,11 +73,11 @@ release_op_data (void *hook)
|
||||
}
|
||||
|
||||
|
||||
GpgmeKeyListResult
|
||||
gpgme_op_keylist_result (GpgmeCtx ctx)
|
||||
gpgme_keylist_result_t
|
||||
gpgme_op_keylist_result (gpgme_ctx_t ctx)
|
||||
{
|
||||
op_data_t opd;
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
|
||||
err = _gpgme_op_data_lookup (ctx, OPDATA_KEYLIST, (void **) &opd, -1, NULL);
|
||||
if (err || !opd)
|
||||
@ -87,11 +87,11 @@ gpgme_op_keylist_result (GpgmeCtx ctx)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
keylist_status_handler (void *priv, GpgmeStatusCode code, char *args)
|
||||
static gpgme_error_t
|
||||
keylist_status_handler (void *priv, gpgme_status_code_t code, char *args)
|
||||
{
|
||||
GpgmeCtx ctx = (GpgmeCtx) priv;
|
||||
GpgmeError err;
|
||||
gpgme_ctx_t ctx = (gpgme_ctx_t) priv;
|
||||
gpgme_error_t err;
|
||||
op_data_t opd;
|
||||
|
||||
err = _gpgme_op_data_lookup (ctx, OPDATA_KEYLIST, (void **) &opd, -1, NULL);
|
||||
@ -122,7 +122,7 @@ parse_timestamp (char *timestamp)
|
||||
|
||||
|
||||
static void
|
||||
set_mainkey_trust_info (GpgmeKey key, const char *src)
|
||||
set_mainkey_trust_info (gpgme_key_t key, const char *src)
|
||||
{
|
||||
/* Look at letters and stop at the first digit. */
|
||||
while (*src && !isdigit (*src))
|
||||
@ -153,9 +153,9 @@ set_mainkey_trust_info (GpgmeKey key, const char *src)
|
||||
|
||||
|
||||
static void
|
||||
set_userid_flags (GpgmeKey key, const char *src)
|
||||
set_userid_flags (gpgme_key_t key, const char *src)
|
||||
{
|
||||
GpgmeUserID uid = key->_last_uid;
|
||||
gpgme_user_id_t uid = key->_last_uid;
|
||||
|
||||
assert (uid);
|
||||
/* Look at letters and stop at the first digit. */
|
||||
@ -193,7 +193,7 @@ set_userid_flags (GpgmeKey key, const char *src)
|
||||
|
||||
|
||||
static void
|
||||
set_subkey_trust_info (GpgmeSubkey subkey, const char *src)
|
||||
set_subkey_trust_info (gpgme_subkey_t subkey, const char *src)
|
||||
{
|
||||
/* Look at letters and stop at the first digit. */
|
||||
while (*src && !isdigit (*src))
|
||||
@ -222,7 +222,7 @@ set_subkey_trust_info (GpgmeSubkey subkey, const char *src)
|
||||
|
||||
|
||||
static void
|
||||
set_mainkey_capability (GpgmeKey key, const char *src)
|
||||
set_mainkey_capability (gpgme_key_t key, const char *src)
|
||||
{
|
||||
while (*src)
|
||||
{
|
||||
@ -268,7 +268,7 @@ set_mainkey_capability (GpgmeKey key, const char *src)
|
||||
|
||||
|
||||
static void
|
||||
set_subkey_capability (GpgmeSubkey subkey, const char *src)
|
||||
set_subkey_capability (gpgme_subkey_t subkey, const char *src)
|
||||
{
|
||||
while (*src)
|
||||
{
|
||||
@ -291,7 +291,7 @@ set_subkey_capability (GpgmeSubkey subkey, const char *src)
|
||||
}
|
||||
|
||||
static void
|
||||
set_ownertrust (GpgmeKey key, const char *src)
|
||||
set_ownertrust (gpgme_key_t key, const char *src)
|
||||
{
|
||||
/* Look at letters and stop at the first digit. */
|
||||
while (*src && !isdigit (*src))
|
||||
@ -326,9 +326,9 @@ set_ownertrust (GpgmeKey key, const char *src)
|
||||
/* We have read an entire key into tmp_key and should now finish it.
|
||||
It is assumed that this releases tmp_key. */
|
||||
static void
|
||||
finish_key (GpgmeCtx ctx, op_data_t opd)
|
||||
finish_key (gpgme_ctx_t ctx, op_data_t opd)
|
||||
{
|
||||
GpgmeKey key = opd->tmp_key;
|
||||
gpgme_key_t key = opd->tmp_key;
|
||||
|
||||
opd->tmp_key = NULL;
|
||||
opd->tmp_uid = NULL;
|
||||
@ -339,10 +339,10 @@ finish_key (GpgmeCtx ctx, op_data_t opd)
|
||||
|
||||
|
||||
/* Note: We are allowed to modify LINE. */
|
||||
static GpgmeError
|
||||
static gpgme_error_t
|
||||
keylist_colon_handler (void *priv, char *line)
|
||||
{
|
||||
GpgmeCtx ctx = (GpgmeCtx) priv;
|
||||
gpgme_ctx_t ctx = (gpgme_ctx_t) priv;
|
||||
enum
|
||||
{
|
||||
RT_NONE, RT_SIG, RT_UID, RT_SUB, RT_PUB, RT_FPR,
|
||||
@ -353,10 +353,10 @@ keylist_colon_handler (void *priv, char *line)
|
||||
char *field[NR_FIELDS];
|
||||
int fields = 0;
|
||||
op_data_t opd;
|
||||
GpgmeError err;
|
||||
GpgmeKey key;
|
||||
GpgmeSubkey subkey = NULL;
|
||||
GpgmeKeySig keysig = NULL;
|
||||
gpgme_error_t err;
|
||||
gpgme_key_t key;
|
||||
gpgme_subkey_t subkey = NULL;
|
||||
gpgme_key_sig_t keysig = NULL;
|
||||
|
||||
DEBUG3 ("keylist_colon_handler ctx = %p, key = %p, line = %s\n",
|
||||
ctx, key, line ? line : "(null)");
|
||||
@ -661,11 +661,11 @@ keylist_colon_handler (void *priv, char *line)
|
||||
|
||||
|
||||
void
|
||||
_gpgme_op_keylist_event_cb (void *data, GpgmeEventIO type, void *type_data)
|
||||
_gpgme_op_keylist_event_cb (void *data, gpgme_event_io_t type, void *type_data)
|
||||
{
|
||||
GpgmeError err;
|
||||
GpgmeCtx ctx = (GpgmeCtx) data;
|
||||
GpgmeKey key = (GpgmeKey) type_data;
|
||||
gpgme_error_t err;
|
||||
gpgme_ctx_t ctx = (gpgme_ctx_t) data;
|
||||
gpgme_key_t key = (gpgme_key_t) type_data;
|
||||
op_data_t opd;
|
||||
struct key_queue_item_s *q, *q2;
|
||||
|
||||
@ -700,10 +700,10 @@ _gpgme_op_keylist_event_cb (void *data, GpgmeEventIO type, void *type_data)
|
||||
/* Start a keylist operation within CTX, searching for keys which
|
||||
match PATTERN. If SECRET_ONLY is true, only secret keys are
|
||||
returned. */
|
||||
GpgmeError
|
||||
gpgme_op_keylist_start (GpgmeCtx ctx, const char *pattern, int secret_only)
|
||||
gpgme_error_t
|
||||
gpgme_op_keylist_start (gpgme_ctx_t ctx, const char *pattern, int secret_only)
|
||||
{
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
op_data_t opd;
|
||||
|
||||
err = _gpgme_op_reset (ctx, 2);
|
||||
@ -730,11 +730,11 @@ gpgme_op_keylist_start (GpgmeCtx ctx, const char *pattern, int secret_only)
|
||||
/* Start a keylist operation within CTX, searching for keys which
|
||||
match PATTERN. If SECRET_ONLY is true, only secret keys are
|
||||
returned. */
|
||||
GpgmeError
|
||||
gpgme_op_keylist_ext_start (GpgmeCtx ctx, const char *pattern[],
|
||||
gpgme_error_t
|
||||
gpgme_op_keylist_ext_start (gpgme_ctx_t ctx, const char *pattern[],
|
||||
int secret_only, int reserved)
|
||||
{
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
op_data_t opd;
|
||||
|
||||
err = _gpgme_op_reset (ctx, 2);
|
||||
@ -758,10 +758,10 @@ gpgme_op_keylist_ext_start (GpgmeCtx ctx, const char *pattern[],
|
||||
|
||||
|
||||
/* Return the next key from the keylist in R_KEY. */
|
||||
GpgmeError
|
||||
gpgme_op_keylist_next (GpgmeCtx ctx, GpgmeKey *r_key)
|
||||
gpgme_error_t
|
||||
gpgme_op_keylist_next (gpgme_ctx_t ctx, gpgme_key_t *r_key)
|
||||
{
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
struct key_queue_item_s *queue_item;
|
||||
op_data_t opd;
|
||||
|
||||
@ -799,8 +799,8 @@ gpgme_op_keylist_next (GpgmeCtx ctx, GpgmeKey *r_key)
|
||||
|
||||
|
||||
/* Terminate a pending keylist operation within CTX. */
|
||||
GpgmeError
|
||||
gpgme_op_keylist_end (GpgmeCtx ctx)
|
||||
gpgme_error_t
|
||||
gpgme_op_keylist_end (gpgme_ctx_t ctx)
|
||||
{
|
||||
if (!ctx)
|
||||
return GPGME_Invalid_Value;
|
||||
@ -811,12 +811,12 @@ gpgme_op_keylist_end (GpgmeCtx ctx)
|
||||
|
||||
/* Get the key with the fingerprint FPR from the crypto backend. If
|
||||
SECRET is true, get the secret key. */
|
||||
GpgmeError
|
||||
gpgme_get_key (GpgmeCtx ctx, const char *fpr, GpgmeKey *r_key,
|
||||
gpgme_error_t
|
||||
gpgme_get_key (gpgme_ctx_t ctx, const char *fpr, gpgme_key_t *r_key,
|
||||
int secret)
|
||||
{
|
||||
GpgmeCtx listctx;
|
||||
GpgmeError err;
|
||||
gpgme_ctx_t listctx;
|
||||
gpgme_error_t err;
|
||||
|
||||
if (!ctx || !r_key)
|
||||
return GPGME_Invalid_Value;
|
||||
|
@ -38,7 +38,7 @@ cat <<EOF
|
||||
* Return value: String with the error description.
|
||||
**/
|
||||
const char *
|
||||
gpgme_strerror (GpgmeError err)
|
||||
gpgme_strerror (gpgme_error_t err)
|
||||
{
|
||||
const char *s;
|
||||
static char buf[25];
|
||||
|
@ -31,7 +31,7 @@ cat <<EOF
|
||||
|
||||
struct status_table_s {
|
||||
const char *name;
|
||||
GpgmeStatusCode code;
|
||||
gpgme_status_code_t code;
|
||||
};
|
||||
|
||||
static struct status_table_s status_table[] =
|
||||
|
@ -29,8 +29,8 @@
|
||||
#include "ops.h"
|
||||
|
||||
|
||||
GpgmeError
|
||||
_gpgme_op_data_lookup (GpgmeCtx ctx, ctx_op_data_type type, void **hook,
|
||||
gpgme_error_t
|
||||
_gpgme_op_data_lookup (gpgme_ctx_t ctx, ctx_op_data_type type, void **hook,
|
||||
int size, void (*cleanup) (void *))
|
||||
{
|
||||
struct ctx_op_data *data = ctx->op_data;
|
||||
@ -62,11 +62,11 @@ _gpgme_op_data_lookup (GpgmeCtx ctx, ctx_op_data_type type, void **hook,
|
||||
1: synchronous operation (always use private event loop).
|
||||
2: asynchronous private operation (use private or user
|
||||
event loop). */
|
||||
GpgmeError
|
||||
_gpgme_op_reset (GpgmeCtx ctx, int type)
|
||||
gpgme_error_t
|
||||
_gpgme_op_reset (gpgme_ctx_t ctx, int type)
|
||||
{
|
||||
GpgmeError err = 0;
|
||||
struct GpgmeIOCbs io_cbs;
|
||||
gpgme_error_t err = 0;
|
||||
struct gpgme_io_cbs io_cbs;
|
||||
|
||||
_gpgme_release_result (ctx);
|
||||
|
||||
@ -109,10 +109,10 @@ _gpgme_op_reset (GpgmeCtx ctx, int type)
|
||||
}
|
||||
|
||||
|
||||
GpgmeError
|
||||
_gpgme_parse_inv_userid (char *args, GpgmeInvalidUserID *userid)
|
||||
gpgme_error_t
|
||||
_gpgme_parse_inv_userid (char *args, gpgme_invalid_user_id_t *userid)
|
||||
{
|
||||
GpgmeInvalidUserID inv_userid;
|
||||
gpgme_invalid_user_id_t inv_userid;
|
||||
char *tail;
|
||||
long int reason;
|
||||
|
||||
|
69
gpgme/ops.h
69
gpgme/ops.h
@ -26,46 +26,49 @@
|
||||
|
||||
|
||||
/* From gpgme.c. */
|
||||
void _gpgme_release_result (GpgmeCtx ctx);
|
||||
void _gpgme_release_result (gpgme_ctx_t ctx);
|
||||
|
||||
|
||||
/* From wait.c. */
|
||||
GpgmeError _gpgme_wait_one (GpgmeCtx ctx);
|
||||
GpgmeError _gpgme_wait_on_condition (GpgmeCtx ctx, volatile int *cond);
|
||||
gpgme_error_t _gpgme_wait_one (gpgme_ctx_t ctx);
|
||||
gpgme_error_t _gpgme_wait_on_condition (gpgme_ctx_t ctx, volatile int *cond);
|
||||
|
||||
/* From recipient.c. */
|
||||
int _gpgme_recipients_all_valid ( const GpgmeRecipients rset );
|
||||
int _gpgme_recipients_all_valid ( const gpgme_recipients_t rset );
|
||||
|
||||
|
||||
/* From data.c. */
|
||||
GpgmeError _gpgme_data_inbound_handler (void *opaque, int fd);
|
||||
GpgmeError _gpgme_data_outbound_handler (void *opaque, int fd);
|
||||
gpgme_error_t _gpgme_data_inbound_handler (void *opaque, int fd);
|
||||
gpgme_error_t _gpgme_data_outbound_handler (void *opaque, int fd);
|
||||
|
||||
|
||||
/* From op-support.c. */
|
||||
|
||||
/* Find or create the op data object of type TYPE. */
|
||||
GpgmeError _gpgme_op_data_lookup (GpgmeCtx ctx, ctx_op_data_type type,
|
||||
gpgme_error_t _gpgme_op_data_lookup (gpgme_ctx_t ctx, ctx_op_data_type type,
|
||||
void **hook, int size,
|
||||
void (*cleanup) (void *));
|
||||
|
||||
/* Prepare a new operation on CTX. */
|
||||
GpgmeError _gpgme_op_reset (GpgmeCtx ctx, int synchronous);
|
||||
gpgme_error_t _gpgme_op_reset (gpgme_ctx_t ctx, int synchronous);
|
||||
|
||||
/* Parse the invalid user ID status line in ARGS and return the result
|
||||
in USERID. */
|
||||
GpgmeError _gpgme_parse_inv_userid (char *args, GpgmeInvalidUserID *userid);
|
||||
gpgme_error_t _gpgme_parse_inv_userid (char *args,
|
||||
gpgme_invalid_user_id_t *userid);
|
||||
|
||||
|
||||
/* From verify.c. */
|
||||
GpgmeError _gpgme_op_verify_init_result (GpgmeCtx ctx);
|
||||
GpgmeError _gpgme_verify_status_handler (void *priv, GpgmeStatusCode code,
|
||||
gpgme_error_t _gpgme_op_verify_init_result (gpgme_ctx_t ctx);
|
||||
gpgme_error_t _gpgme_verify_status_handler (void *priv,
|
||||
gpgme_status_code_t code,
|
||||
char *args);
|
||||
|
||||
|
||||
/* From decrypt.c. */
|
||||
GpgmeError _gpgme_op_decrypt_init_result (GpgmeCtx ctx);
|
||||
GpgmeError _gpgme_decrypt_status_handler (void *priv, GpgmeStatusCode code,
|
||||
gpgme_error_t _gpgme_op_decrypt_init_result (gpgme_ctx_t ctx);
|
||||
gpgme_error_t _gpgme_decrypt_status_handler (void *priv,
|
||||
gpgme_status_code_t code,
|
||||
char *args);
|
||||
|
||||
|
||||
@ -73,10 +76,11 @@ GpgmeError _gpgme_decrypt_status_handler (void *priv, GpgmeStatusCode code,
|
||||
|
||||
/* Create an initial op data object for signing. Needs to be called
|
||||
once before calling _gpgme_sign_status_handler. */
|
||||
GpgmeError _gpgme_op_sign_init_result (GpgmeCtx ctx);
|
||||
gpgme_error_t _gpgme_op_sign_init_result (gpgme_ctx_t ctx);
|
||||
|
||||
/* Process a status line for signing operations. */
|
||||
GpgmeError _gpgme_sign_status_handler (void *priv, GpgmeStatusCode code,
|
||||
gpgme_error_t _gpgme_sign_status_handler (void *priv,
|
||||
gpgme_status_code_t code,
|
||||
char *args);
|
||||
|
||||
|
||||
@ -84,45 +88,52 @@ GpgmeError _gpgme_sign_status_handler (void *priv, GpgmeStatusCode code,
|
||||
|
||||
/* Create an initial op data object for encrypt. Needs to be called
|
||||
once before calling _gpgme_encrypt_status_handler. */
|
||||
GpgmeError _gpgme_op_encrypt_init_result (GpgmeCtx ctx);
|
||||
gpgme_error_t _gpgme_op_encrypt_init_result (gpgme_ctx_t ctx);
|
||||
|
||||
/* Process a status line for encryption operations. */
|
||||
GpgmeError _gpgme_encrypt_status_handler (void *priv, GpgmeStatusCode code,
|
||||
gpgme_error_t _gpgme_encrypt_status_handler (void *priv,
|
||||
gpgme_status_code_t code,
|
||||
char *args);
|
||||
|
||||
|
||||
/* From passphrase.c. */
|
||||
GpgmeError _gpgme_passphrase_status_handler (void *priv, GpgmeStatusCode code,
|
||||
gpgme_error_t _gpgme_passphrase_status_handler (void *priv,
|
||||
gpgme_status_code_t code,
|
||||
char *args);
|
||||
GpgmeError _gpgme_passphrase_command_handler (void *opaque,
|
||||
GpgmeStatusCode code,
|
||||
const char *key, const char **result);
|
||||
gpgme_error_t _gpgme_passphrase_command_handler (void *opaque,
|
||||
gpgme_status_code_t code,
|
||||
const char *key,
|
||||
const char **result);
|
||||
|
||||
|
||||
/* From progress.c. */
|
||||
GpgmeError _gpgme_progress_status_handler (void *priv, GpgmeStatusCode code,
|
||||
gpgme_error_t _gpgme_progress_status_handler (void *priv,
|
||||
gpgme_status_code_t code,
|
||||
char *args);
|
||||
|
||||
|
||||
/* From key.c. */
|
||||
GpgmeError _gpgme_key_new (GpgmeKey *r_key);
|
||||
GpgmeError _gpgme_key_add_subkey (GpgmeKey key, GpgmeSubkey *r_subkey);
|
||||
GpgmeError _gpgme_key_append_name (GpgmeKey key, char *src);
|
||||
GpgmeKeySig _gpgme_key_add_sig (GpgmeKey key, char *src);
|
||||
gpgme_error_t _gpgme_key_new (gpgme_key_t *r_key);
|
||||
gpgme_error_t _gpgme_key_add_subkey (gpgme_key_t key,
|
||||
gpgme_subkey_t *r_subkey);
|
||||
gpgme_error_t _gpgme_key_append_name (gpgme_key_t key, char *src);
|
||||
gpgme_key_sig_t _gpgme_key_add_sig (gpgme_key_t key, char *src);
|
||||
|
||||
|
||||
/* From keylist.c. */
|
||||
void _gpgme_op_keylist_event_cb (void *data, GpgmeEventIO type, void *type_data);
|
||||
void _gpgme_op_keylist_event_cb (void *data, gpgme_event_io_t type,
|
||||
void *type_data);
|
||||
|
||||
|
||||
/* From trust-item.c. */
|
||||
|
||||
/* Create a new trust item. */
|
||||
GpgmeError _gpgme_trust_item_new (GpgmeTrustItem *r_item);
|
||||
gpgme_error_t _gpgme_trust_item_new (gpgme_trust_item_t *r_item);
|
||||
|
||||
|
||||
/* From trustlist.c. */
|
||||
void _gpgme_op_trustlist_event_cb (void *data, GpgmeEventIO type, void *type_data);
|
||||
void _gpgme_op_trustlist_event_cb (void *data, gpgme_event_io_t type,
|
||||
void *type_data);
|
||||
|
||||
|
||||
/*-- version.c --*/
|
||||
|
@ -50,11 +50,11 @@ release_op_data (void *hook)
|
||||
}
|
||||
|
||||
|
||||
GpgmeError
|
||||
_gpgme_passphrase_status_handler (void *priv, GpgmeStatusCode code, char *args)
|
||||
gpgme_error_t
|
||||
_gpgme_passphrase_status_handler (void *priv, gpgme_status_code_t code, char *args)
|
||||
{
|
||||
GpgmeCtx ctx = (GpgmeCtx) priv;
|
||||
GpgmeError err;
|
||||
gpgme_ctx_t ctx = (gpgme_ctx_t) priv;
|
||||
gpgme_error_t err;
|
||||
op_data_t opd;
|
||||
|
||||
if (!ctx->passphrase_cb)
|
||||
@ -110,12 +110,12 @@ _gpgme_passphrase_status_handler (void *priv, GpgmeStatusCode code, char *args)
|
||||
}
|
||||
|
||||
|
||||
GpgmeError
|
||||
_gpgme_passphrase_command_handler (void *priv, GpgmeStatusCode code,
|
||||
gpgme_error_t
|
||||
_gpgme_passphrase_command_handler (void *priv, gpgme_status_code_t code,
|
||||
const char *key, const char **result)
|
||||
{
|
||||
GpgmeCtx ctx = (GpgmeCtx) priv;
|
||||
GpgmeError err;
|
||||
gpgme_ctx_t ctx = (gpgme_ctx_t) priv;
|
||||
gpgme_error_t err;
|
||||
op_data_t opd;
|
||||
|
||||
if (!ctx->passphrase_cb)
|
||||
|
@ -28,10 +28,10 @@
|
||||
#include "context.h"
|
||||
|
||||
|
||||
GpgmeError
|
||||
_gpgme_progress_status_handler (void *priv, GpgmeStatusCode code, char *args)
|
||||
gpgme_error_t
|
||||
_gpgme_progress_status_handler (void *priv, gpgme_status_code_t code, char *args)
|
||||
{
|
||||
GpgmeCtx ctx = (GpgmeCtx) priv;
|
||||
gpgme_ctx_t ctx = (gpgme_ctx_t) priv;
|
||||
char *p;
|
||||
char *args_cpy;
|
||||
int type = 0;
|
||||
|
@ -28,10 +28,10 @@
|
||||
|
||||
|
||||
/* Create a new uninitialized recipient object and return it in R_RSET. */
|
||||
GpgmeError
|
||||
gpgme_recipients_new (GpgmeRecipients *r_rset)
|
||||
gpgme_error_t
|
||||
gpgme_recipients_new (gpgme_recipients_t *r_rset)
|
||||
{
|
||||
GpgmeRecipients rset;
|
||||
gpgme_recipients_t rset;
|
||||
|
||||
rset = calloc (1, sizeof *rset);
|
||||
if (!rset)
|
||||
@ -43,13 +43,13 @@ gpgme_recipients_new (GpgmeRecipients *r_rset)
|
||||
|
||||
/* Release the recipient object RSET. */
|
||||
void
|
||||
gpgme_recipients_release (GpgmeRecipients rset)
|
||||
gpgme_recipients_release (gpgme_recipients_t rset)
|
||||
{
|
||||
GpgmeUserID uid = rset->list;
|
||||
gpgme_user_id_t uid = rset->list;
|
||||
|
||||
while (uid)
|
||||
{
|
||||
GpgmeUserID next_uid = uid->next;
|
||||
gpgme_user_id_t next_uid = uid->next;
|
||||
|
||||
free (uid);
|
||||
uid = next_uid;
|
||||
@ -60,12 +60,12 @@ gpgme_recipients_release (GpgmeRecipients rset)
|
||||
|
||||
/* Add the name NAME to the recipient set RSET with the given key
|
||||
validity VALIDITY. */
|
||||
GpgmeError
|
||||
gpgme_recipients_add_name_with_validity (GpgmeRecipients rset,
|
||||
gpgme_error_t
|
||||
gpgme_recipients_add_name_with_validity (gpgme_recipients_t rset,
|
||||
const char *name,
|
||||
GpgmeValidity validity)
|
||||
gpgme_validity_t validity)
|
||||
{
|
||||
GpgmeUserID uid;
|
||||
gpgme_user_id_t uid;
|
||||
|
||||
if (!name || !rset)
|
||||
return GPGME_Invalid_Value;
|
||||
@ -87,8 +87,8 @@ gpgme_recipients_add_name_with_validity (GpgmeRecipients rset,
|
||||
/* Add the name NAME to the recipient set RSET. Same as
|
||||
gpgme_recipients_add_name_with_validity with validitiy
|
||||
GPGME_VALIDITY_UNKNOWN. */
|
||||
GpgmeError
|
||||
gpgme_recipients_add_name (GpgmeRecipients rset, const char *name)
|
||||
gpgme_error_t
|
||||
gpgme_recipients_add_name (gpgme_recipients_t rset, const char *name)
|
||||
{
|
||||
return gpgme_recipients_add_name_with_validity (rset, name,
|
||||
GPGME_VALIDITY_UNKNOWN);
|
||||
@ -97,9 +97,9 @@ gpgme_recipients_add_name (GpgmeRecipients rset, const char *name)
|
||||
|
||||
/* Return the number of recipients in the set. */
|
||||
unsigned int
|
||||
gpgme_recipients_count (const GpgmeRecipients rset)
|
||||
gpgme_recipients_count (const gpgme_recipients_t rset)
|
||||
{
|
||||
GpgmeUserID uid = rset->list;
|
||||
gpgme_user_id_t uid = rset->list;
|
||||
unsigned int count = 0;
|
||||
|
||||
while (uid)
|
||||
@ -115,8 +115,8 @@ gpgme_recipients_count (const GpgmeRecipients rset)
|
||||
/* Start an enumeration on the recipient set RSET. The caller must
|
||||
pass the address of a void pointer which is used as the iterator
|
||||
object. */
|
||||
GpgmeError
|
||||
gpgme_recipients_enum_open (const GpgmeRecipients rset, void **iter)
|
||||
gpgme_error_t
|
||||
gpgme_recipients_enum_open (const gpgme_recipients_t rset, void **iter)
|
||||
{
|
||||
*iter = rset->list;
|
||||
return 0;
|
||||
@ -124,9 +124,9 @@ gpgme_recipients_enum_open (const GpgmeRecipients rset, void **iter)
|
||||
|
||||
/* Return the name of the next recipient in the set RSET. */
|
||||
const char *
|
||||
gpgme_recipients_enum_read (const GpgmeRecipients rset, void **iter)
|
||||
gpgme_recipients_enum_read (const gpgme_recipients_t rset, void **iter)
|
||||
{
|
||||
GpgmeUserID uid;
|
||||
gpgme_user_id_t uid;
|
||||
|
||||
uid = *iter;
|
||||
if (!uid)
|
||||
@ -137,8 +137,8 @@ gpgme_recipients_enum_read (const GpgmeRecipients rset, void **iter)
|
||||
}
|
||||
|
||||
/* Release the iterator for this object. */
|
||||
GpgmeError
|
||||
gpgme_recipients_enum_close (const GpgmeRecipients rset, void **iter)
|
||||
gpgme_error_t
|
||||
gpgme_recipients_enum_close (const gpgme_recipients_t rset, void **iter)
|
||||
{
|
||||
/* Not really needed, but might catch the occasional mistake. */
|
||||
*iter = NULL;
|
||||
@ -148,9 +148,9 @@ gpgme_recipients_enum_close (const GpgmeRecipients rset, void **iter)
|
||||
|
||||
|
||||
int
|
||||
_gpgme_recipients_all_valid (const GpgmeRecipients rset)
|
||||
_gpgme_recipients_all_valid (const gpgme_recipients_t rset)
|
||||
{
|
||||
GpgmeUserID uid = rset->list;
|
||||
gpgme_user_id_t uid = rset->list;
|
||||
|
||||
while (uid)
|
||||
{
|
||||
|
166
gpgme/rungpg.c
166
gpgme/rungpg.c
@ -51,7 +51,7 @@
|
||||
struct arg_and_data_s
|
||||
{
|
||||
struct arg_and_data_s *next;
|
||||
GpgmeData data; /* If this is not NULL, use arg below. */
|
||||
gpgme_data_t data; /* If this is not NULL, use arg below. */
|
||||
int inbound; /* True if this is used for reading from gpg. */
|
||||
int dup_to;
|
||||
int print_fd; /* Print the fd number and not the special form of it. */
|
||||
@ -61,7 +61,7 @@ struct arg_and_data_s
|
||||
|
||||
struct fd_data_map_s
|
||||
{
|
||||
GpgmeData data;
|
||||
gpgme_data_t data;
|
||||
int inbound; /* true if this is used for reading from gpg */
|
||||
int dup_to;
|
||||
int fd; /* the fd to use */
|
||||
@ -110,25 +110,25 @@ struct gpg_object_s
|
||||
int used;
|
||||
int fd;
|
||||
int idx; /* Index in fd_data_map */
|
||||
GpgmeData cb_data; /* hack to get init the above idx later */
|
||||
GpgmeStatusCode code; /* last code */
|
||||
gpgme_data_t cb_data; /* hack to get init the above idx later */
|
||||
gpgme_status_code_t code; /* last code */
|
||||
char *keyword; /* what has been requested (malloced) */
|
||||
EngineCommandHandler fnc;
|
||||
void *fnc_value;
|
||||
/* The kludges never end. This is used to couple command handlers
|
||||
with output data in edit key mode. */
|
||||
GpgmeData linked_data;
|
||||
gpgme_data_t linked_data;
|
||||
int linked_idx;
|
||||
} cmd;
|
||||
|
||||
struct GpgmeIOCbs io_cbs;
|
||||
struct gpgme_io_cbs io_cbs;
|
||||
};
|
||||
|
||||
typedef struct gpg_object_s *GpgObject;
|
||||
|
||||
|
||||
static void
|
||||
gpg_io_event (void *engine, GpgmeEventIO type, void *type_data)
|
||||
gpg_io_event (void *engine, gpgme_event_io_t type, void *type_data)
|
||||
{
|
||||
GpgObject gpg = engine;
|
||||
|
||||
@ -181,7 +181,7 @@ close_notify_handler (int fd, void *opaque)
|
||||
}
|
||||
}
|
||||
|
||||
static GpgmeError
|
||||
static gpgme_error_t
|
||||
add_arg (GpgObject gpg, const char *arg)
|
||||
{
|
||||
struct arg_and_data_s *a;
|
||||
@ -204,8 +204,8 @@ add_arg (GpgObject gpg, const char *arg)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static GpgmeError
|
||||
add_data (GpgObject gpg, GpgmeData data, int dup_to, int inbound)
|
||||
static gpgme_error_t
|
||||
add_data (GpgObject gpg, gpgme_data_t data, int dup_to, int inbound)
|
||||
{
|
||||
struct arg_and_data_s *a;
|
||||
|
||||
@ -327,7 +327,7 @@ gpg_release (void *engine)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
static gpgme_error_t
|
||||
gpg_new (void **engine)
|
||||
{
|
||||
GpgObject gpg;
|
||||
@ -360,7 +360,7 @@ gpg_new (void **engine)
|
||||
goto leave;
|
||||
}
|
||||
/* In any case we need a status pipe - create it right here and
|
||||
don't handle it with our generic GpgmeData mechanism. */
|
||||
don't handle it with our generic gpgme_data_t mechanism. */
|
||||
if (_gpgme_io_pipe (gpg->status.fd, 1) == -1)
|
||||
{
|
||||
rc = GPGME_Pipe_Error;
|
||||
@ -406,7 +406,7 @@ gpg_set_status_handler (void *engine, EngineStatusHandler fnc, void *fnc_value)
|
||||
}
|
||||
|
||||
/* Kludge to process --with-colon output. */
|
||||
static GpgmeError
|
||||
static gpgme_error_t
|
||||
gpg_set_colon_line_handler (void *engine, EngineColonLineHandler fnc,
|
||||
void *fnc_value)
|
||||
{
|
||||
@ -437,10 +437,10 @@ gpg_set_colon_line_handler (void *engine, EngineColonLineHandler fnc,
|
||||
|
||||
/* Here we handle --command-fd. This works closely together with the
|
||||
status handler. */
|
||||
static GpgmeError
|
||||
static gpgme_error_t
|
||||
command_cb (void *opaque, char *buffer, size_t length, size_t *nread)
|
||||
{
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
GpgObject gpg = opaque;
|
||||
const char *value;
|
||||
int value_len;
|
||||
@ -506,13 +506,13 @@ command_cb (void *opaque, char *buffer, size_t length, size_t *nread)
|
||||
resources associated with the returned value from another call. To
|
||||
match such a second call to a first call, the returned value from
|
||||
the first call is passed as keyword. */
|
||||
static GpgmeError
|
||||
static gpgme_error_t
|
||||
gpg_set_command_handler (void *engine, EngineCommandHandler fnc,
|
||||
void *fnc_value, GpgmeData linked_data)
|
||||
void *fnc_value, gpgme_data_t linked_data)
|
||||
{
|
||||
GpgObject gpg = engine;
|
||||
GpgmeData tmp;
|
||||
GpgmeError err;
|
||||
gpgme_data_t tmp;
|
||||
gpgme_error_t err;
|
||||
|
||||
err = gpgme_data_new_with_read_cb (&tmp, command_cb, gpg);
|
||||
if (err)
|
||||
@ -529,7 +529,7 @@ gpg_set_command_handler (void *engine, EngineCommandHandler fnc,
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
static gpgme_error_t
|
||||
build_argv (GpgObject gpg)
|
||||
{
|
||||
struct arg_and_data_s *a;
|
||||
@ -740,11 +740,11 @@ build_argv (GpgObject gpg)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
add_io_cb (GpgObject gpg, int fd, int dir, GpgmeIOCb handler, void *data,
|
||||
static gpgme_error_t
|
||||
add_io_cb (GpgObject gpg, int fd, int dir, gpgme_io_cb_t handler, void *data,
|
||||
void **tag)
|
||||
{
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
|
||||
err = (*gpg->io_cbs.add) (gpg->io_cbs.add_priv, fd, dir, handler, data, tag);
|
||||
if (err)
|
||||
@ -773,7 +773,7 @@ status_cmp (const void *ap, const void *bp)
|
||||
e.g. with a large user ID. Note: We can optimize this to only cope
|
||||
with status line code we know about and skip all other stuff
|
||||
without buffering (i.e. without extending the buffer). */
|
||||
static GpgmeError
|
||||
static gpgme_error_t
|
||||
read_status (GpgObject gpg)
|
||||
{
|
||||
char *p;
|
||||
@ -802,7 +802,7 @@ read_status (GpgObject gpg)
|
||||
gpg->status.eof = 1;
|
||||
if (gpg->status.fnc)
|
||||
{
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
err = gpg->status.fnc (gpg->status.fnc_value, GPGME_STATUS_EOF, "");
|
||||
if (err)
|
||||
return err;
|
||||
@ -884,7 +884,7 @@ read_status (GpgObject gpg)
|
||||
}
|
||||
else if (gpg->status.fnc)
|
||||
{
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
err = gpg->status.fnc (gpg->status.fnc_value,
|
||||
r->code, rest);
|
||||
if (err)
|
||||
@ -931,7 +931,7 @@ read_status (GpgObject gpg)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
static gpgme_error_t
|
||||
status_handler (void *opaque, int fd)
|
||||
{
|
||||
GpgObject gpg = opaque;
|
||||
@ -947,7 +947,7 @@ status_handler (void *opaque, int fd)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
static gpgme_error_t
|
||||
read_colon_line (GpgObject gpg)
|
||||
{
|
||||
char *p;
|
||||
@ -1022,14 +1022,14 @@ read_colon_line (GpgObject gpg)
|
||||
|
||||
|
||||
/* This colonline handler thing is not the clean way to do it. It
|
||||
might be better to enhance the GpgmeData object to act as a wrapper
|
||||
might be better to enhance the gpgme_data_t object to act as a wrapper
|
||||
for a callback. Same goes for the status thing. For now we use
|
||||
this thing here because it is easier to implement. */
|
||||
static GpgmeError
|
||||
static gpgme_error_t
|
||||
colon_line_handler (void *opaque, int fd)
|
||||
{
|
||||
GpgObject gpg = opaque;
|
||||
GpgmeError rc = 0;
|
||||
gpgme_error_t rc = 0;
|
||||
|
||||
assert (fd == gpg->colon.fd[0]);
|
||||
rc = read_colon_line (gpg);
|
||||
@ -1041,10 +1041,10 @@ colon_line_handler (void *opaque, int fd)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
static gpgme_error_t
|
||||
start (GpgObject gpg)
|
||||
{
|
||||
GpgmeError rc;
|
||||
gpgme_error_t rc;
|
||||
int i, n;
|
||||
int status;
|
||||
struct spawn_fd_item_s *fd_child_list, *fd_parent_list;
|
||||
@ -1169,11 +1169,11 @@ start (GpgObject gpg)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
gpg_decrypt (void *engine, GpgmeData ciph, GpgmeData plain)
|
||||
static gpgme_error_t
|
||||
gpg_decrypt (void *engine, gpgme_data_t ciph, gpgme_data_t plain)
|
||||
{
|
||||
GpgObject gpg = engine;
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
|
||||
err = add_arg (gpg, "--decrypt");
|
||||
|
||||
@ -1192,11 +1192,11 @@ gpg_decrypt (void *engine, GpgmeData ciph, GpgmeData plain)
|
||||
return err;
|
||||
}
|
||||
|
||||
static GpgmeError
|
||||
gpg_delete (void *engine, GpgmeKey key, int allow_secret)
|
||||
static gpgme_error_t
|
||||
gpg_delete (void *engine, gpgme_key_t key, int allow_secret)
|
||||
{
|
||||
GpgObject gpg = engine;
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
|
||||
err = add_arg (gpg, allow_secret ? "--delete-secret-and-public-key"
|
||||
: "--delete-key");
|
||||
@ -1216,12 +1216,12 @@ gpg_delete (void *engine, GpgmeKey key, int allow_secret)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
append_args_from_signers (GpgObject gpg, GpgmeCtx ctx /* FIXME */)
|
||||
static gpgme_error_t
|
||||
append_args_from_signers (GpgObject gpg, gpgme_ctx_t ctx /* FIXME */)
|
||||
{
|
||||
GpgmeError err = 0;
|
||||
gpgme_error_t err = 0;
|
||||
int i;
|
||||
GpgmeKey key;
|
||||
gpgme_key_t key;
|
||||
|
||||
for (i = 0; (key = gpgme_signers_enum (ctx, i)); i++)
|
||||
{
|
||||
@ -1240,11 +1240,11 @@ append_args_from_signers (GpgObject gpg, GpgmeCtx ctx /* FIXME */)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
gpg_edit (void *engine, GpgmeKey key, GpgmeData out, GpgmeCtx ctx /* FIXME */)
|
||||
static gpgme_error_t
|
||||
gpg_edit (void *engine, gpgme_key_t key, gpgme_data_t out, gpgme_ctx_t ctx /* FIXME */)
|
||||
{
|
||||
GpgObject gpg = engine;
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
|
||||
err = add_arg (gpg, "--with-colons");
|
||||
if (!err)
|
||||
@ -1270,11 +1270,11 @@ gpg_edit (void *engine, GpgmeKey key, GpgmeData out, GpgmeCtx ctx /* FIXME */)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
append_args_from_recipients (GpgObject gpg, const GpgmeRecipients rset)
|
||||
static gpgme_error_t
|
||||
append_args_from_recipients (GpgObject gpg, const gpgme_recipients_t rset)
|
||||
{
|
||||
GpgmeError err = 0;
|
||||
GpgmeUserID uid;
|
||||
gpgme_error_t err = 0;
|
||||
gpgme_user_id_t uid;
|
||||
|
||||
assert (rset);
|
||||
for (uid = rset->list; uid; uid = uid->next)
|
||||
@ -1289,12 +1289,12 @@ append_args_from_recipients (GpgObject gpg, const GpgmeRecipients rset)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
gpg_encrypt (void *engine, GpgmeRecipients recp, GpgmeData plain,
|
||||
GpgmeData ciph, int use_armor)
|
||||
static gpgme_error_t
|
||||
gpg_encrypt (void *engine, gpgme_recipients_t recp, gpgme_data_t plain,
|
||||
gpgme_data_t ciph, int use_armor)
|
||||
{
|
||||
GpgObject gpg = engine;
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
int symmetric = !recp;
|
||||
|
||||
err = add_arg (gpg, symmetric ? "--symmetric" : "--encrypt");
|
||||
@ -1332,12 +1332,12 @@ gpg_encrypt (void *engine, GpgmeRecipients recp, GpgmeData plain,
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
gpg_encrypt_sign (void *engine, GpgmeRecipients recp, GpgmeData plain,
|
||||
GpgmeData ciph, int use_armor, GpgmeCtx ctx /* FIXME */)
|
||||
static gpgme_error_t
|
||||
gpg_encrypt_sign (void *engine, gpgme_recipients_t recp, gpgme_data_t plain,
|
||||
gpgme_data_t ciph, int use_armor, gpgme_ctx_t ctx /* FIXME */)
|
||||
{
|
||||
GpgObject gpg = engine;
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
|
||||
err = add_arg (gpg, "--encrypt");
|
||||
if (!err)
|
||||
@ -1375,12 +1375,12 @@ gpg_encrypt_sign (void *engine, GpgmeRecipients recp, GpgmeData plain,
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
gpg_export (void *engine, GpgmeRecipients recp, GpgmeData keydata,
|
||||
static gpgme_error_t
|
||||
gpg_export (void *engine, gpgme_recipients_t recp, gpgme_data_t keydata,
|
||||
int use_armor)
|
||||
{
|
||||
GpgObject gpg = engine;
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
|
||||
err = add_arg (gpg, "--export");
|
||||
if (!err && use_armor)
|
||||
@ -1409,12 +1409,12 @@ gpg_export (void *engine, GpgmeRecipients recp, GpgmeData keydata,
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
gpg_genkey (void *engine, GpgmeData help_data, int use_armor,
|
||||
GpgmeData pubkey, GpgmeData seckey)
|
||||
static gpgme_error_t
|
||||
gpg_genkey (void *engine, gpgme_data_t help_data, int use_armor,
|
||||
gpgme_data_t pubkey, gpgme_data_t seckey)
|
||||
{
|
||||
GpgObject gpg = engine;
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
|
||||
if (!gpg)
|
||||
return GPGME_Invalid_Value;
|
||||
@ -1439,11 +1439,11 @@ gpg_genkey (void *engine, GpgmeData help_data, int use_armor,
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
gpg_import (void *engine, GpgmeData keydata)
|
||||
static gpgme_error_t
|
||||
gpg_import (void *engine, gpgme_data_t keydata)
|
||||
{
|
||||
GpgObject gpg = engine;
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
|
||||
err = add_arg (gpg, "--import");
|
||||
if (!err)
|
||||
@ -1456,12 +1456,12 @@ gpg_import (void *engine, GpgmeData keydata)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
static gpgme_error_t
|
||||
gpg_keylist (void *engine, const char *pattern, int secret_only,
|
||||
int keylist_mode)
|
||||
{
|
||||
GpgObject gpg = engine;
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
|
||||
err = add_arg (gpg, "--with-colons");
|
||||
if (!err)
|
||||
@ -1488,12 +1488,12 @@ gpg_keylist (void *engine, const char *pattern, int secret_only,
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
static gpgme_error_t
|
||||
gpg_keylist_ext (void *engine, const char *pattern[], int secret_only,
|
||||
int reserved, int keylist_mode)
|
||||
{
|
||||
GpgObject gpg = engine;
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
|
||||
if (reserved)
|
||||
return GPGME_Invalid_Value;
|
||||
@ -1526,13 +1526,13 @@ gpg_keylist_ext (void *engine, const char *pattern[], int secret_only,
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
gpg_sign (void *engine, GpgmeData in, GpgmeData out, GpgmeSigMode mode,
|
||||
static gpgme_error_t
|
||||
gpg_sign (void *engine, gpgme_data_t in, gpgme_data_t out, gpgme_sig_mode_t mode,
|
||||
int use_armor, int use_textmode, int include_certs,
|
||||
GpgmeCtx ctx /* FIXME */)
|
||||
gpgme_ctx_t ctx /* FIXME */)
|
||||
{
|
||||
GpgObject gpg = engine;
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
|
||||
if (mode == GPGME_SIG_MODE_CLEAR)
|
||||
err = add_arg (gpg, "--clearsign");
|
||||
@ -1562,11 +1562,11 @@ gpg_sign (void *engine, GpgmeData in, GpgmeData out, GpgmeSigMode mode,
|
||||
return err;
|
||||
}
|
||||
|
||||
static GpgmeError
|
||||
static gpgme_error_t
|
||||
gpg_trustlist (void *engine, const char *pattern)
|
||||
{
|
||||
GpgObject gpg = engine;
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
|
||||
err = add_arg (gpg, "--with-colons");
|
||||
if (!err)
|
||||
@ -1585,12 +1585,12 @@ gpg_trustlist (void *engine, const char *pattern)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
gpg_verify (void *engine, GpgmeData sig, GpgmeData signed_text,
|
||||
GpgmeData plaintext)
|
||||
static gpgme_error_t
|
||||
gpg_verify (void *engine, gpgme_data_t sig, gpgme_data_t signed_text,
|
||||
gpgme_data_t plaintext)
|
||||
{
|
||||
GpgObject gpg = engine;
|
||||
GpgmeError err = 0;
|
||||
gpgme_error_t err = 0;
|
||||
|
||||
if (plaintext)
|
||||
{
|
||||
@ -1630,7 +1630,7 @@ gpg_verify (void *engine, GpgmeData sig, GpgmeData signed_text,
|
||||
|
||||
|
||||
static void
|
||||
gpg_set_io_cbs (void *engine, struct GpgmeIOCbs *io_cbs)
|
||||
gpg_set_io_cbs (void *engine, gpgme_io_cbs_t io_cbs)
|
||||
{
|
||||
GpgObject gpg = engine;
|
||||
|
||||
|
58
gpgme/sign.c
58
gpgme/sign.c
@ -37,10 +37,10 @@ typedef struct
|
||||
/* A pointer to the next pointer of the last invalid signer in
|
||||
the list. This makes appending new invalid signers painless
|
||||
while preserving the order. */
|
||||
GpgmeInvalidUserID *last_signer_p;
|
||||
gpgme_invalid_user_id_t *last_signer_p;
|
||||
|
||||
/* Likewise for signature information. */
|
||||
GpgmeNewSignature *last_sig_p;
|
||||
gpgme_new_signature_t *last_sig_p;
|
||||
} *op_data_t;
|
||||
|
||||
|
||||
@ -48,12 +48,12 @@ static void
|
||||
release_op_data (void *hook)
|
||||
{
|
||||
op_data_t opd = (op_data_t) hook;
|
||||
GpgmeInvalidUserID invalid_signer = opd->result.invalid_signers;
|
||||
GpgmeNewSignature sig = opd->result.signatures;
|
||||
gpgme_invalid_user_id_t invalid_signer = opd->result.invalid_signers;
|
||||
gpgme_new_signature_t sig = opd->result.signatures;
|
||||
|
||||
while (invalid_signer)
|
||||
{
|
||||
GpgmeInvalidUserID next = invalid_signer->next;
|
||||
gpgme_invalid_user_id_t next = invalid_signer->next;
|
||||
free (invalid_signer->id);
|
||||
free (invalid_signer);
|
||||
invalid_signer = next;
|
||||
@ -61,7 +61,7 @@ release_op_data (void *hook)
|
||||
|
||||
while (sig)
|
||||
{
|
||||
GpgmeNewSignature next = sig->next;
|
||||
gpgme_new_signature_t next = sig->next;
|
||||
free (sig->fpr);
|
||||
free (sig);
|
||||
sig = next;
|
||||
@ -69,11 +69,11 @@ release_op_data (void *hook)
|
||||
}
|
||||
|
||||
|
||||
GpgmeSignResult
|
||||
gpgme_op_sign_result (GpgmeCtx ctx)
|
||||
gpgme_sign_result_t
|
||||
gpgme_op_sign_result (gpgme_ctx_t ctx)
|
||||
{
|
||||
op_data_t opd;
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
|
||||
err = _gpgme_op_data_lookup (ctx, OPDATA_SIGN, (void **) &opd, -1, NULL);
|
||||
if (err || !opd)
|
||||
@ -83,10 +83,10 @@ gpgme_op_sign_result (GpgmeCtx ctx)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
parse_sig_created (char *args, GpgmeNewSignature *sigp)
|
||||
static gpgme_error_t
|
||||
parse_sig_created (char *args, gpgme_new_signature_t *sigp)
|
||||
{
|
||||
GpgmeNewSignature sig;
|
||||
gpgme_new_signature_t sig;
|
||||
char *tail;
|
||||
|
||||
sig = malloc (sizeof (*sig));
|
||||
@ -182,11 +182,11 @@ parse_sig_created (char *args, GpgmeNewSignature *sigp)
|
||||
}
|
||||
|
||||
|
||||
GpgmeError
|
||||
_gpgme_sign_status_handler (void *priv, GpgmeStatusCode code, char *args)
|
||||
gpgme_error_t
|
||||
_gpgme_sign_status_handler (void *priv, gpgme_status_code_t code, char *args)
|
||||
{
|
||||
GpgmeCtx ctx = (GpgmeCtx) priv;
|
||||
GpgmeError err;
|
||||
gpgme_ctx_t ctx = (gpgme_ctx_t) priv;
|
||||
gpgme_error_t err;
|
||||
op_data_t opd;
|
||||
|
||||
err = _gpgme_passphrase_status_handler (priv, code, args);
|
||||
@ -227,10 +227,10 @@ _gpgme_sign_status_handler (void *priv, GpgmeStatusCode code, char *args)
|
||||
}
|
||||
|
||||
|
||||
GpgmeError
|
||||
_gpgme_op_sign_init_result (GpgmeCtx ctx)
|
||||
gpgme_error_t
|
||||
_gpgme_op_sign_init_result (gpgme_ctx_t ctx)
|
||||
{
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
op_data_t opd;
|
||||
|
||||
err = _gpgme_op_data_lookup (ctx, OPDATA_SIGN, (void **) &opd,
|
||||
@ -243,11 +243,11 @@ _gpgme_op_sign_init_result (GpgmeCtx ctx)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
sign_start (GpgmeCtx ctx, int synchronous, GpgmeData plain, GpgmeData sig,
|
||||
GpgmeSigMode mode)
|
||||
static gpgme_error_t
|
||||
sign_start (gpgme_ctx_t ctx, int synchronous, gpgme_data_t plain, gpgme_data_t sig,
|
||||
gpgme_sig_mode_t mode)
|
||||
{
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
|
||||
err = _gpgme_op_reset (ctx, synchronous);
|
||||
if (err)
|
||||
@ -285,19 +285,19 @@ sign_start (GpgmeCtx ctx, int synchronous, GpgmeData plain, GpgmeData sig,
|
||||
|
||||
|
||||
/* Sign the plaintext PLAIN and store the signature in SIG. */
|
||||
GpgmeError
|
||||
gpgme_op_sign_start (GpgmeCtx ctx, GpgmeData plain, GpgmeData sig,
|
||||
GpgmeSigMode mode)
|
||||
gpgme_error_t
|
||||
gpgme_op_sign_start (gpgme_ctx_t ctx, gpgme_data_t plain, gpgme_data_t sig,
|
||||
gpgme_sig_mode_t mode)
|
||||
{
|
||||
return sign_start (ctx, 0, plain, sig, mode);
|
||||
}
|
||||
|
||||
|
||||
/* Sign the plaintext PLAIN and store the signature in SIG. */
|
||||
GpgmeError
|
||||
gpgme_op_sign (GpgmeCtx ctx, GpgmeData plain, GpgmeData sig, GpgmeSigMode mode)
|
||||
gpgme_error_t
|
||||
gpgme_op_sign (gpgme_ctx_t ctx, gpgme_data_t plain, gpgme_data_t sig, gpgme_sig_mode_t mode)
|
||||
{
|
||||
GpgmeError err = sign_start (ctx, 1, plain, sig, mode);
|
||||
gpgme_error_t err = sign_start (ctx, 1, plain, sig, mode);
|
||||
if (!err)
|
||||
err = _gpgme_wait_one (ctx);
|
||||
return err;
|
||||
|
@ -35,7 +35,7 @@
|
||||
|
||||
/* Delete all signers from CTX. */
|
||||
void
|
||||
gpgme_signers_clear (GpgmeCtx ctx)
|
||||
gpgme_signers_clear (gpgme_ctx_t ctx)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -52,15 +52,15 @@ gpgme_signers_clear (GpgmeCtx ctx)
|
||||
}
|
||||
|
||||
/* Add KEY to list of signers in CTX. */
|
||||
GpgmeError
|
||||
gpgme_signers_add (GpgmeCtx ctx, const GpgmeKey key)
|
||||
gpgme_error_t
|
||||
gpgme_signers_add (gpgme_ctx_t ctx, const gpgme_key_t key)
|
||||
{
|
||||
if (!ctx || !key)
|
||||
return GPGME_Invalid_Value;
|
||||
|
||||
if (ctx->signers_len == ctx->signers_size)
|
||||
{
|
||||
GpgmeKey *newarr;
|
||||
gpgme_key_t *newarr;
|
||||
int n = ctx->signers_size + 5;
|
||||
int j;
|
||||
|
||||
@ -80,8 +80,8 @@ gpgme_signers_add (GpgmeCtx ctx, const GpgmeKey key)
|
||||
|
||||
|
||||
/* Return the SEQth signer's key in CTX with one reference. */
|
||||
GpgmeKey
|
||||
gpgme_signers_enum (const GpgmeCtx ctx, int seq)
|
||||
gpgme_key_t
|
||||
gpgme_signers_enum (const gpgme_ctx_t ctx, int seq)
|
||||
{
|
||||
if (!ctx || seq < 0)
|
||||
return NULL;
|
||||
|
@ -37,10 +37,10 @@ DEFINE_STATIC_LOCK (trust_item_ref_lock);
|
||||
|
||||
|
||||
/* Create a new trust item. */
|
||||
GpgmeError
|
||||
_gpgme_trust_item_new (GpgmeTrustItem *r_item)
|
||||
gpgme_error_t
|
||||
_gpgme_trust_item_new (gpgme_trust_item_t *r_item)
|
||||
{
|
||||
GpgmeTrustItem item;
|
||||
gpgme_trust_item_t item;
|
||||
|
||||
item = calloc (1, sizeof *item);
|
||||
if (!item)
|
||||
@ -59,7 +59,7 @@ _gpgme_trust_item_new (GpgmeTrustItem *r_item)
|
||||
|
||||
/* Acquire a reference to ITEM. */
|
||||
void
|
||||
gpgme_trust_item_ref (GpgmeTrustItem item)
|
||||
gpgme_trust_item_ref (gpgme_trust_item_t item)
|
||||
{
|
||||
LOCK (trust_item_ref_lock);
|
||||
item->_refs++;
|
||||
@ -73,7 +73,7 @@ gpgme_trust_item_ref (GpgmeTrustItem item)
|
||||
every newly created trust item object as well as for every
|
||||
gpgme_trust_item_ref() done on the trust item object. */
|
||||
void
|
||||
gpgme_trust_item_unref (GpgmeTrustItem item)
|
||||
gpgme_trust_item_unref (gpgme_trust_item_t item)
|
||||
{
|
||||
LOCK (trust_item_ref_lock);
|
||||
assert (item->_refs > 0);
|
||||
@ -92,15 +92,15 @@ gpgme_trust_item_unref (GpgmeTrustItem item)
|
||||
|
||||
/* Compatibility interfaces. */
|
||||
void
|
||||
gpgme_trust_item_release (GpgmeTrustItem item)
|
||||
gpgme_trust_item_release (gpgme_trust_item_t item)
|
||||
{
|
||||
gpgme_trust_item_unref (item);
|
||||
}
|
||||
|
||||
/* Return the value of the attribute WHAT of ITEM, which has to be
|
||||
representable by a string. */
|
||||
const char *gpgme_trust_item_get_string_attr (GpgmeTrustItem item,
|
||||
GpgmeAttr what,
|
||||
const char *gpgme_trust_item_get_string_attr (gpgme_trust_item_t item,
|
||||
_gpgme_attr_t what,
|
||||
const void *reserved, int idx)
|
||||
{
|
||||
const char *val = NULL;
|
||||
@ -140,7 +140,7 @@ const char *gpgme_trust_item_get_string_attr (GpgmeTrustItem item,
|
||||
/* 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. */
|
||||
int gpgme_trust_item_get_int_attr (GpgmeTrustItem item, GpgmeAttr what,
|
||||
int gpgme_trust_item_get_int_attr (gpgme_trust_item_t item, _gpgme_attr_t what,
|
||||
const void *reserved, int idx)
|
||||
{
|
||||
int val = 0;
|
||||
|
@ -34,7 +34,7 @@
|
||||
struct trust_queue_item_s
|
||||
{
|
||||
struct trust_queue_item_s *next;
|
||||
GpgmeTrustItem item;
|
||||
gpgme_trust_item_t item;
|
||||
};
|
||||
|
||||
typedef struct
|
||||
@ -46,8 +46,8 @@ typedef struct
|
||||
|
||||
|
||||
|
||||
static GpgmeError
|
||||
trustlist_status_handler (void *priv, GpgmeStatusCode code, char *args)
|
||||
static gpgme_error_t
|
||||
trustlist_status_handler (void *priv, gpgme_status_code_t code, char *args)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -64,14 +64,14 @@ trustlist_status_handler (void *priv, GpgmeStatusCode code, char *args)
|
||||
counter and only available on U lines CC is the same for the
|
||||
complete count NAME ist the username and only printed on U
|
||||
lines. */
|
||||
static GpgmeError
|
||||
static gpgme_error_t
|
||||
trustlist_colon_handler (void *priv, char *line)
|
||||
{
|
||||
GpgmeCtx ctx = (GpgmeCtx) priv;
|
||||
GpgmeError err;
|
||||
gpgme_ctx_t ctx = (gpgme_ctx_t) priv;
|
||||
gpgme_error_t err;
|
||||
char *p, *pend;
|
||||
int field = 0;
|
||||
GpgmeTrustItem item = NULL;
|
||||
gpgme_trust_item_t item = NULL;
|
||||
|
||||
if (!line)
|
||||
return 0; /* EOF */
|
||||
@ -121,12 +121,12 @@ trustlist_colon_handler (void *priv, char *line)
|
||||
|
||||
|
||||
void
|
||||
_gpgme_op_trustlist_event_cb (void *data, GpgmeEventIO type, void *type_data)
|
||||
_gpgme_op_trustlist_event_cb (void *data, gpgme_event_io_t type, void *type_data)
|
||||
{
|
||||
GpgmeCtx ctx = (GpgmeCtx) data;
|
||||
GpgmeError err;
|
||||
gpgme_ctx_t ctx = (gpgme_ctx_t) data;
|
||||
gpgme_error_t err;
|
||||
op_data_t opd;
|
||||
GpgmeTrustItem item = (GpgmeTrustItem) type_data;
|
||||
gpgme_trust_item_t item = (gpgme_trust_item_t) type_data;
|
||||
struct trust_queue_item_s *q, *q2;
|
||||
|
||||
assert (type == GPGME_EVENT_NEXT_TRUSTITEM);
|
||||
@ -160,10 +160,10 @@ _gpgme_op_trustlist_event_cb (void *data, GpgmeEventIO type, void *type_data)
|
||||
}
|
||||
|
||||
|
||||
GpgmeError
|
||||
gpgme_op_trustlist_start (GpgmeCtx ctx, const char *pattern, int max_level)
|
||||
gpgme_error_t
|
||||
gpgme_op_trustlist_start (gpgme_ctx_t ctx, const char *pattern, int max_level)
|
||||
{
|
||||
GpgmeError err = 0;
|
||||
gpgme_error_t err = 0;
|
||||
op_data_t opd;
|
||||
|
||||
if (!pattern || !*pattern)
|
||||
@ -189,10 +189,10 @@ gpgme_op_trustlist_start (GpgmeCtx ctx, const char *pattern, int max_level)
|
||||
}
|
||||
|
||||
|
||||
GpgmeError
|
||||
gpgme_op_trustlist_next (GpgmeCtx ctx, GpgmeTrustItem *r_item)
|
||||
gpgme_error_t
|
||||
gpgme_op_trustlist_next (gpgme_ctx_t ctx, gpgme_trust_item_t *r_item)
|
||||
{
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
op_data_t opd;
|
||||
struct trust_queue_item_s *q;
|
||||
|
||||
@ -227,8 +227,8 @@ gpgme_op_trustlist_next (GpgmeCtx ctx, GpgmeTrustItem *r_item)
|
||||
|
||||
|
||||
/* Terminate a pending trustlist operation within CTX. */
|
||||
GpgmeError
|
||||
gpgme_op_trustlist_end (GpgmeCtx ctx)
|
||||
gpgme_error_t
|
||||
gpgme_op_trustlist_end (gpgme_ctx_t ctx)
|
||||
{
|
||||
if (!ctx)
|
||||
return GPGME_Invalid_Value;
|
||||
|
@ -72,7 +72,7 @@ int _gpgme_hextobyte (const unsigned char *str);
|
||||
the result. Currently, LEN is only used to specify if allocation
|
||||
is desired or not, the caller is expected to make sure that *DESTP
|
||||
is large enough if LEN is not zero. */
|
||||
GpgmeError _gpgme_decode_c_string (const char *src, char **destp, int len);
|
||||
gpgme_error_t _gpgme_decode_c_string (const char *src, char **destp, int len);
|
||||
|
||||
/* Decode the percent escaped string SRC and store the result in the
|
||||
buffer *DESTP which is LEN bytes long. If LEN is zero, then a
|
||||
@ -80,9 +80,9 @@ GpgmeError _gpgme_decode_c_string (const char *src, char **destp, int len);
|
||||
the result. Currently, LEN is only used to specify if allocation
|
||||
is desired or not, the caller is expected to make sure that *DESTP
|
||||
is large enough if LEN is not zero. */
|
||||
GpgmeError _gpgme_decode_percent_string (const char *src, char **destp,
|
||||
gpgme_error_t _gpgme_decode_percent_string (const char *src, char **destp,
|
||||
int len);
|
||||
|
||||
GpgmeError _gpgme_map_gnupg_error (char *err);
|
||||
gpgme_error_t _gpgme_map_gnupg_error (char *err);
|
||||
|
||||
#endif /* UTIL_H */
|
||||
|
116
gpgme/verify.c
116
gpgme/verify.c
@ -35,7 +35,7 @@ typedef struct
|
||||
{
|
||||
struct _gpgme_op_verify_result result;
|
||||
|
||||
GpgmeSignature current_sig;
|
||||
gpgme_signature_t current_sig;
|
||||
} *op_data_t;
|
||||
|
||||
|
||||
@ -43,16 +43,16 @@ static void
|
||||
release_op_data (void *hook)
|
||||
{
|
||||
op_data_t opd = (op_data_t) hook;
|
||||
GpgmeSignature sig = opd->result.signatures;
|
||||
gpgme_signature_t sig = opd->result.signatures;
|
||||
|
||||
while (sig)
|
||||
{
|
||||
GpgmeSignature next = sig->next;
|
||||
GpgmeSigNotation notation = sig->notations;
|
||||
gpgme_signature_t next = sig->next;
|
||||
gpgme_sig_notation_t notation = sig->notations;
|
||||
|
||||
while (notation)
|
||||
{
|
||||
GpgmeSigNotation next_nota = notation->next;
|
||||
gpgme_sig_notation_t next_nota = notation->next;
|
||||
|
||||
if (notation->name)
|
||||
free (notation->name);
|
||||
@ -69,11 +69,11 @@ release_op_data (void *hook)
|
||||
}
|
||||
|
||||
|
||||
GpgmeVerifyResult
|
||||
gpgme_op_verify_result (GpgmeCtx ctx)
|
||||
gpgme_verify_result_t
|
||||
gpgme_op_verify_result (gpgme_ctx_t ctx)
|
||||
{
|
||||
op_data_t opd;
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
|
||||
err = _gpgme_op_data_lookup (ctx, OPDATA_VERIFY, (void **) &opd, -1, NULL);
|
||||
if (err || !opd)
|
||||
@ -85,7 +85,7 @@ gpgme_op_verify_result (GpgmeCtx ctx)
|
||||
|
||||
/* Build a summary vector from RESULT. */
|
||||
static void
|
||||
calc_sig_summary (GpgmeSignature sig)
|
||||
calc_sig_summary (gpgme_signature_t sig)
|
||||
{
|
||||
unsigned long sum = 0;
|
||||
|
||||
@ -143,10 +143,10 @@ calc_sig_summary (GpgmeSignature sig)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
parse_new_sig (op_data_t opd, GpgmeStatusCode code, char *args)
|
||||
static gpgme_error_t
|
||||
parse_new_sig (op_data_t opd, gpgme_status_code_t code, char *args)
|
||||
{
|
||||
GpgmeSignature sig;
|
||||
gpgme_signature_t sig;
|
||||
char *end = strchr (args, ' ');
|
||||
|
||||
if (end)
|
||||
@ -225,8 +225,8 @@ parse_new_sig (op_data_t opd, GpgmeStatusCode code, char *args)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
parse_valid_sig (GpgmeSignature sig, char *args)
|
||||
static gpgme_error_t
|
||||
parse_valid_sig (gpgme_signature_t sig, char *args)
|
||||
{
|
||||
char *end = strchr (args, ' ');
|
||||
|
||||
@ -264,12 +264,12 @@ parse_valid_sig (GpgmeSignature sig, char *args)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
parse_notation (GpgmeSignature sig, GpgmeStatusCode code, char *args)
|
||||
static gpgme_error_t
|
||||
parse_notation (gpgme_signature_t sig, gpgme_status_code_t code, char *args)
|
||||
{
|
||||
GpgmeError err;
|
||||
GpgmeSigNotation *lastp = &sig->notations;
|
||||
GpgmeSigNotation notation = sig->notations;
|
||||
gpgme_error_t err;
|
||||
gpgme_sig_notation_t *lastp = &sig->notations;
|
||||
gpgme_sig_notation_t notation = sig->notations;
|
||||
char *end = strchr (args, ' ');
|
||||
|
||||
if (end)
|
||||
@ -370,8 +370,8 @@ parse_notation (GpgmeSignature sig, GpgmeStatusCode code, char *args)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
parse_trust (GpgmeSignature sig, GpgmeStatusCode code, char *args)
|
||||
static gpgme_error_t
|
||||
parse_trust (gpgme_signature_t sig, gpgme_status_code_t code, char *args)
|
||||
{
|
||||
char *end = strchr (args, ' ');
|
||||
|
||||
@ -406,10 +406,10 @@ parse_trust (GpgmeSignature sig, GpgmeStatusCode code, char *args)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
parse_error (GpgmeSignature sig, char *args)
|
||||
static gpgme_error_t
|
||||
parse_error (gpgme_signature_t sig, char *args)
|
||||
{
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
char *where = strchr (args, ' ');
|
||||
char *which;
|
||||
|
||||
@ -438,13 +438,13 @@ parse_error (GpgmeSignature sig, char *args)
|
||||
}
|
||||
|
||||
|
||||
GpgmeError
|
||||
_gpgme_verify_status_handler (void *priv, GpgmeStatusCode code, char *args)
|
||||
gpgme_error_t
|
||||
_gpgme_verify_status_handler (void *priv, gpgme_status_code_t code, char *args)
|
||||
{
|
||||
GpgmeCtx ctx = (GpgmeCtx) priv;
|
||||
GpgmeError err;
|
||||
gpgme_ctx_t ctx = (gpgme_ctx_t) priv;
|
||||
gpgme_error_t err;
|
||||
op_data_t opd;
|
||||
GpgmeSignature sig;
|
||||
gpgme_signature_t sig;
|
||||
|
||||
err = _gpgme_op_data_lookup (ctx, OPDATA_VERIFY, (void **) &opd, -1, NULL);
|
||||
if (err)
|
||||
@ -505,8 +505,8 @@ _gpgme_verify_status_handler (void *priv, GpgmeStatusCode code, char *args)
|
||||
}
|
||||
|
||||
|
||||
GpgmeError
|
||||
_gpgme_op_verify_init_result (GpgmeCtx ctx)
|
||||
gpgme_error_t
|
||||
_gpgme_op_verify_init_result (gpgme_ctx_t ctx)
|
||||
{
|
||||
op_data_t opd;
|
||||
|
||||
@ -515,11 +515,11 @@ _gpgme_op_verify_init_result (GpgmeCtx ctx)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
_gpgme_op_verify_start (GpgmeCtx ctx, int synchronous, GpgmeData sig,
|
||||
GpgmeData signed_text, GpgmeData plaintext)
|
||||
static gpgme_error_t
|
||||
_gpgme_op_verify_start (gpgme_ctx_t ctx, int synchronous, gpgme_data_t sig,
|
||||
gpgme_data_t signed_text, gpgme_data_t plaintext)
|
||||
{
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
|
||||
err = _gpgme_op_reset (ctx, synchronous);
|
||||
if (err)
|
||||
@ -543,9 +543,9 @@ _gpgme_op_verify_start (GpgmeCtx ctx, int synchronous, GpgmeData sig,
|
||||
|
||||
/* Decrypt ciphertext CIPHER and make a signature verification within
|
||||
CTX and store the resulting plaintext in PLAIN. */
|
||||
GpgmeError
|
||||
gpgme_op_verify_start (GpgmeCtx ctx, GpgmeData sig, GpgmeData signed_text,
|
||||
GpgmeData plaintext)
|
||||
gpgme_error_t
|
||||
gpgme_op_verify_start (gpgme_ctx_t ctx, gpgme_data_t sig, gpgme_data_t signed_text,
|
||||
gpgme_data_t plaintext)
|
||||
{
|
||||
return _gpgme_op_verify_start (ctx, 0, sig, signed_text, plaintext);
|
||||
}
|
||||
@ -553,11 +553,11 @@ gpgme_op_verify_start (GpgmeCtx ctx, GpgmeData sig, GpgmeData signed_text,
|
||||
|
||||
/* Decrypt ciphertext CIPHER and make a signature verification within
|
||||
CTX and store the resulting plaintext in PLAIN. */
|
||||
GpgmeError
|
||||
gpgme_op_verify (GpgmeCtx ctx, GpgmeData sig, GpgmeData signed_text,
|
||||
GpgmeData plaintext)
|
||||
gpgme_error_t
|
||||
gpgme_op_verify (gpgme_ctx_t ctx, gpgme_data_t sig, gpgme_data_t signed_text,
|
||||
gpgme_data_t plaintext)
|
||||
{
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
|
||||
err = _gpgme_op_verify_start (ctx, 1, sig, signed_text, plaintext);
|
||||
if (!err)
|
||||
@ -570,11 +570,11 @@ gpgme_op_verify (GpgmeCtx ctx, GpgmeData sig, GpgmeData signed_text,
|
||||
|
||||
/* Get the key used to create signature IDX in CTX and return it in
|
||||
R_KEY. */
|
||||
GpgmeError
|
||||
gpgme_get_sig_key (GpgmeCtx ctx, int idx, GpgmeKey *r_key)
|
||||
gpgme_error_t
|
||||
gpgme_get_sig_key (gpgme_ctx_t ctx, int idx, gpgme_key_t *r_key)
|
||||
{
|
||||
GpgmeVerifyResult result;
|
||||
GpgmeSignature sig;
|
||||
gpgme_verify_result_t result;
|
||||
gpgme_signature_t sig;
|
||||
|
||||
result = gpgme_op_verify_result (ctx);
|
||||
sig = result->signatures;
|
||||
@ -595,11 +595,11 @@ gpgme_get_sig_key (GpgmeCtx ctx, int idx, GpgmeKey *r_key)
|
||||
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. */
|
||||
const char *gpgme_get_sig_status (GpgmeCtx ctx, int idx,
|
||||
GpgmeSigStat *r_stat, time_t *r_created)
|
||||
const char *gpgme_get_sig_status (gpgme_ctx_t ctx, int idx,
|
||||
_gpgme_sig_stat_t *r_stat, time_t *r_created)
|
||||
{
|
||||
GpgmeVerifyResult result;
|
||||
GpgmeSignature sig;
|
||||
gpgme_verify_result_t result;
|
||||
gpgme_signature_t sig;
|
||||
|
||||
result = gpgme_op_verify_result (ctx);
|
||||
sig = result->signatures;
|
||||
@ -655,11 +655,11 @@ const char *gpgme_get_sig_status (GpgmeCtx ctx, int idx,
|
||||
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 (GpgmeCtx ctx, int idx,
|
||||
GpgmeAttr what, int whatidx)
|
||||
unsigned long gpgme_get_sig_ulong_attr (gpgme_ctx_t ctx, int idx,
|
||||
_gpgme_attr_t what, int whatidx)
|
||||
{
|
||||
GpgmeVerifyResult result;
|
||||
GpgmeSignature sig;
|
||||
gpgme_verify_result_t result;
|
||||
gpgme_signature_t sig;
|
||||
|
||||
result = gpgme_op_verify_result (ctx);
|
||||
sig = result->signatures;
|
||||
@ -718,11 +718,11 @@ unsigned long gpgme_get_sig_ulong_attr (GpgmeCtx ctx, int idx,
|
||||
}
|
||||
|
||||
|
||||
const char *gpgme_get_sig_string_attr (GpgmeCtx ctx, int idx,
|
||||
GpgmeAttr what, int whatidx)
|
||||
const char *gpgme_get_sig_string_attr (gpgme_ctx_t ctx, int idx,
|
||||
_gpgme_attr_t what, int whatidx)
|
||||
{
|
||||
GpgmeVerifyResult result;
|
||||
GpgmeSignature sig;
|
||||
gpgme_verify_result_t result;
|
||||
gpgme_signature_t sig;
|
||||
|
||||
result = gpgme_op_verify_result (ctx);
|
||||
sig = result->signatures;
|
||||
|
@ -68,9 +68,9 @@ struct ctx_list_item
|
||||
struct ctx_list_item *next;
|
||||
struct ctx_list_item *prev;
|
||||
|
||||
GpgmeCtx ctx;
|
||||
gpgme_ctx_t ctx;
|
||||
/* The status is set when the ctx is moved to the done list. */
|
||||
GpgmeError status;
|
||||
gpgme_error_t status;
|
||||
};
|
||||
|
||||
/* The active list contains all contexts that are in the global event
|
||||
@ -87,8 +87,8 @@ static struct ctx_list_item *ctx_done_list;
|
||||
|
||||
|
||||
/* Enter the context CTX into the active list. */
|
||||
static GpgmeError
|
||||
ctx_active (GpgmeCtx ctx)
|
||||
static gpgme_error_t
|
||||
ctx_active (gpgme_ctx_t ctx)
|
||||
{
|
||||
struct ctx_list_item *li = malloc (sizeof (struct ctx_list_item));
|
||||
if (!li)
|
||||
@ -109,7 +109,7 @@ ctx_active (GpgmeCtx ctx)
|
||||
|
||||
/* Enter the context CTX into the done list with status STATUS. */
|
||||
static void
|
||||
ctx_done (GpgmeCtx ctx, GpgmeError status)
|
||||
ctx_done (gpgme_ctx_t ctx, gpgme_error_t status)
|
||||
{
|
||||
struct ctx_list_item *li;
|
||||
|
||||
@ -143,8 +143,8 @@ ctx_done (GpgmeCtx ctx, GpgmeError status)
|
||||
return its status in STATUS after removing it from the done list.
|
||||
If a matching context could be found, return it. Return NULL if no
|
||||
context could be found. */
|
||||
static GpgmeCtx
|
||||
ctx_wait (GpgmeCtx ctx, GpgmeError *status)
|
||||
static gpgme_ctx_t
|
||||
ctx_wait (gpgme_ctx_t ctx, gpgme_error_t *status)
|
||||
{
|
||||
struct ctx_list_item *li;
|
||||
|
||||
@ -184,9 +184,9 @@ ctx_wait (GpgmeCtx ctx, GpgmeError *status)
|
||||
event loops. */
|
||||
|
||||
void
|
||||
_gpgme_wait_global_event_cb (void *data, GpgmeEventIO type, void *type_data)
|
||||
_gpgme_wait_global_event_cb (void *data, gpgme_event_io_t type, void *type_data)
|
||||
{
|
||||
GpgmeCtx ctx = (GpgmeCtx) data;
|
||||
gpgme_ctx_t ctx = (gpgme_ctx_t) data;
|
||||
|
||||
assert (ctx);
|
||||
|
||||
@ -194,7 +194,7 @@ _gpgme_wait_global_event_cb (void *data, GpgmeEventIO type, void *type_data)
|
||||
{
|
||||
case GPGME_EVENT_START:
|
||||
{
|
||||
GpgmeError err = ctx_active (ctx);
|
||||
gpgme_error_t err = ctx_active (ctx);
|
||||
|
||||
if (err)
|
||||
{
|
||||
@ -212,7 +212,7 @@ _gpgme_wait_global_event_cb (void *data, GpgmeEventIO type, void *type_data)
|
||||
|
||||
case GPGME_EVENT_DONE:
|
||||
{
|
||||
GpgmeError *errp = (GpgmeError *) type_data;
|
||||
gpgme_error_t *errp = (gpgme_error_t *) type_data;
|
||||
assert (errp);
|
||||
ctx_done (ctx, *errp);
|
||||
}
|
||||
@ -248,8 +248,8 @@ _gpgme_wait_global_event_cb (void *data, GpgmeEventIO type, void *type_data)
|
||||
the timeout expires, NULL is returned and *STATUS is 0. If an
|
||||
error occurs, NULL is returned and *STATUS is set to the error
|
||||
value. */
|
||||
GpgmeCtx
|
||||
gpgme_wait (GpgmeCtx ctx, GpgmeError *status, int hang)
|
||||
gpgme_ctx_t
|
||||
gpgme_wait (gpgme_ctx_t ctx, gpgme_error_t *status, int hang)
|
||||
{
|
||||
do
|
||||
{
|
||||
@ -293,8 +293,8 @@ gpgme_wait (GpgmeCtx ctx, GpgmeError *status, int hang)
|
||||
{
|
||||
if (fdt.fds[i].fd != -1 && fdt.fds[i].signaled)
|
||||
{
|
||||
GpgmeCtx ictx;
|
||||
GpgmeError err;
|
||||
gpgme_ctx_t ictx;
|
||||
gpgme_error_t err;
|
||||
struct wait_item_s *item;
|
||||
|
||||
assert (nr);
|
||||
@ -330,14 +330,14 @@ gpgme_wait (GpgmeCtx ctx, GpgmeError *status, int hang)
|
||||
break;
|
||||
if (i == ctx->fdt.size)
|
||||
{
|
||||
GpgmeError err = 0;
|
||||
gpgme_error_t err = 0;
|
||||
_gpgme_engine_io_event (ctx->engine, GPGME_EVENT_DONE, &err);
|
||||
}
|
||||
}
|
||||
UNLOCK (ctx_list_lock);
|
||||
|
||||
{
|
||||
GpgmeCtx dctx = ctx_wait (ctx, status);
|
||||
gpgme_ctx_t dctx = ctx_wait (ctx, status);
|
||||
|
||||
if (dctx)
|
||||
{
|
||||
|
@ -42,7 +42,7 @@
|
||||
event loops. */
|
||||
|
||||
void
|
||||
_gpgme_wait_private_event_cb (void *data, GpgmeEventIO type, void *type_data)
|
||||
_gpgme_wait_private_event_cb (void *data, gpgme_event_io_t type, void *type_data)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
@ -68,10 +68,10 @@ _gpgme_wait_private_event_cb (void *data, GpgmeEventIO type, void *type_data)
|
||||
/* If COND is a null pointer, wait until the blocking operation in CTX
|
||||
finished and return its error value. Otherwise, wait until COND is
|
||||
satisfied or the operation finished. */
|
||||
GpgmeError
|
||||
_gpgme_wait_on_condition (GpgmeCtx ctx, volatile int *cond)
|
||||
gpgme_error_t
|
||||
_gpgme_wait_on_condition (gpgme_ctx_t ctx, volatile int *cond)
|
||||
{
|
||||
GpgmeError err = 0;
|
||||
gpgme_error_t err = 0;
|
||||
int hang = 1;
|
||||
|
||||
do
|
||||
@ -141,8 +141,8 @@ _gpgme_wait_on_condition (GpgmeCtx ctx, volatile int *cond)
|
||||
|
||||
/* Wait until the blocking operation in context CTX has finished and
|
||||
return the error value. */
|
||||
GpgmeError
|
||||
_gpgme_wait_one (GpgmeCtx ctx)
|
||||
gpgme_error_t
|
||||
_gpgme_wait_one (gpgme_ctx_t ctx)
|
||||
{
|
||||
return _gpgme_wait_on_condition (ctx, NULL);
|
||||
}
|
||||
|
@ -35,12 +35,12 @@
|
||||
|
||||
/* Internal I/O Callbacks. */
|
||||
|
||||
GpgmeError
|
||||
gpgme_error_t
|
||||
_gpgme_user_io_cb_handler (void *data, int fd)
|
||||
{
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
struct tag *tag = (struct tag *) data;
|
||||
GpgmeCtx ctx;
|
||||
gpgme_ctx_t ctx;
|
||||
struct wait_item_s *item;
|
||||
|
||||
assert (data);
|
||||
@ -77,13 +77,13 @@ _gpgme_user_io_cb_handler (void *data, int fd)
|
||||
FNC_DATA as its first argument) for the direction DIR. DATA should
|
||||
be the context for which the fd is added. R_TAG will hold the tag
|
||||
that can be used to remove the fd. */
|
||||
GpgmeError
|
||||
_gpgme_wait_user_add_io_cb (void *data, int fd, int dir, GpgmeIOCb fnc,
|
||||
gpgme_error_t
|
||||
_gpgme_wait_user_add_io_cb (void *data, int fd, int dir, gpgme_io_cb_t fnc,
|
||||
void *fnc_data, void **r_tag)
|
||||
{
|
||||
GpgmeCtx ctx = (GpgmeCtx) data;
|
||||
gpgme_ctx_t ctx = (gpgme_ctx_t) data;
|
||||
struct tag *tag;
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
|
||||
assert (ctx);
|
||||
err = _gpgme_add_io_cb (data, fd, dir, fnc, fnc_data, r_tag);
|
||||
@ -104,7 +104,7 @@ void
|
||||
_gpgme_wait_user_remove_io_cb (void *data)
|
||||
{
|
||||
struct tag *tag = (struct tag *) data;
|
||||
GpgmeCtx ctx;
|
||||
gpgme_ctx_t ctx;
|
||||
|
||||
assert (tag);
|
||||
ctx = tag->ctx;
|
||||
@ -115,9 +115,9 @@ _gpgme_wait_user_remove_io_cb (void *data)
|
||||
|
||||
|
||||
void
|
||||
_gpgme_wait_user_event_cb (void *data, GpgmeEventIO type, void *type_data)
|
||||
_gpgme_wait_user_event_cb (void *data, gpgme_event_io_t type, void *type_data)
|
||||
{
|
||||
GpgmeCtx ctx = data;
|
||||
gpgme_ctx_t ctx = data;
|
||||
|
||||
if (ctx->io_cbs.event)
|
||||
(*ctx->io_cbs.event) (ctx->io_cbs.event_priv, type, type_data);
|
||||
|
14
gpgme/wait.c
14
gpgme/wait.c
@ -53,7 +53,7 @@ _gpgme_fd_table_deinit (fd_table_t fdt)
|
||||
|
||||
|
||||
/* XXX We should keep a marker and roll over for speed. */
|
||||
static GpgmeError
|
||||
static gpgme_error_t
|
||||
fd_table_put (fd_table_t fdt, int fd, int dir, void *opaque, int *idx)
|
||||
{
|
||||
int i, j;
|
||||
@ -93,12 +93,12 @@ fd_table_put (fd_table_t fdt, int fd, int dir, void *opaque, int *idx)
|
||||
FNC_DATA as its first argument) for the direction DIR. DATA should
|
||||
be the context for which the fd is added. R_TAG will hold the tag
|
||||
that can be used to remove the fd. */
|
||||
GpgmeError
|
||||
_gpgme_add_io_cb (void *data, int fd, int dir, GpgmeIOCb fnc, void *fnc_data,
|
||||
void **r_tag)
|
||||
gpgme_error_t
|
||||
_gpgme_add_io_cb (void *data, int fd, int dir, gpgme_io_cb_t fnc,
|
||||
void *fnc_data, void **r_tag)
|
||||
{
|
||||
GpgmeError err;
|
||||
GpgmeCtx ctx = (GpgmeCtx) data;
|
||||
gpgme_error_t err;
|
||||
gpgme_ctx_t ctx = (gpgme_ctx_t) data;
|
||||
fd_table_t fdt;
|
||||
struct wait_item_s *item;
|
||||
struct tag *tag;
|
||||
@ -143,7 +143,7 @@ void
|
||||
_gpgme_remove_io_cb (void *data)
|
||||
{
|
||||
struct tag *tag = data;
|
||||
GpgmeCtx ctx;
|
||||
gpgme_ctx_t ctx;
|
||||
fd_table_t fdt;
|
||||
int idx;
|
||||
|
||||
|
23
gpgme/wait.h
23
gpgme/wait.h
@ -35,8 +35,8 @@ typedef struct fd_table *fd_table_t;
|
||||
a callback handler. */
|
||||
struct wait_item_s
|
||||
{
|
||||
GpgmeCtx ctx;
|
||||
GpgmeIOCb handler;
|
||||
gpgme_ctx_t ctx;
|
||||
gpgme_io_cb_t handler;
|
||||
void *handler_value;
|
||||
int dir;
|
||||
};
|
||||
@ -46,7 +46,7 @@ struct wait_item_s
|
||||
struct tag
|
||||
{
|
||||
/* The context for which the fd was registered. */
|
||||
GpgmeCtx ctx;
|
||||
gpgme_ctx_t ctx;
|
||||
|
||||
/* The index into the fd table for this context. */
|
||||
int idx;
|
||||
@ -59,17 +59,18 @@ struct tag
|
||||
void _gpgme_fd_table_init (fd_table_t fdt);
|
||||
void _gpgme_fd_table_deinit (fd_table_t fdt);
|
||||
|
||||
GpgmeError _gpgme_add_io_cb (void *data, int fd, int dir,
|
||||
GpgmeIOCb fnc, void *fnc_data, void **r_tag);
|
||||
gpgme_error_t _gpgme_add_io_cb (void *data, int fd, int dir,
|
||||
gpgme_io_cb_t fnc, void *fnc_data, void **r_tag);
|
||||
void _gpgme_remove_io_cb (void *tag);
|
||||
void _gpgme_wait_private_event_cb (void *data, GpgmeEventIO type, void *type_data);
|
||||
void _gpgme_wait_global_event_cb (void *data, GpgmeEventIO type, void *type_data);
|
||||
void _gpgme_wait_private_event_cb (void *data, gpgme_event_io_t type, void *type_data);
|
||||
void _gpgme_wait_global_event_cb (void *data, gpgme_event_io_t type, void *type_data);
|
||||
|
||||
GpgmeError _gpgme_wait_user_add_io_cb (void *data, int fd, int dir,
|
||||
GpgmeIOCb fnc, void *fnc_data, void **r_tag);
|
||||
gpgme_error_t _gpgme_wait_user_add_io_cb (void *data, int fd, int dir,
|
||||
gpgme_io_cb_t fnc, void *fnc_data,
|
||||
void **r_tag);
|
||||
void _gpgme_wait_user_remove_io_cb (void *tag);
|
||||
void _gpgme_wait_user_event_cb (void *data, GpgmeEventIO type, void *type_data);
|
||||
void _gpgme_wait_user_event_cb (void *data, gpgme_event_io_t type, void *type_data);
|
||||
|
||||
GpgmeError _gpgme_wait_one (GpgmeCtx ctx);
|
||||
gpgme_error_t _gpgme_wait_one (gpgme_ctx_t ctx);
|
||||
|
||||
#endif /* WAIT_H */
|
||||
|
@ -31,7 +31,7 @@
|
||||
{ \
|
||||
if (err) \
|
||||
{ \
|
||||
fprintf (stderr, "%s:%d: GpgmeError %s\n", \
|
||||
fprintf (stderr, "%s:%d: gpgme_error_t %s\n", \
|
||||
__FILE__, __LINE__, gpgme_strerror (err)); \
|
||||
exit (1); \
|
||||
} \
|
||||
@ -40,7 +40,7 @@
|
||||
|
||||
|
||||
static void
|
||||
print_data (GpgmeData dh)
|
||||
print_data (gpgme_data_t dh)
|
||||
{
|
||||
#define BUF_SIZE 512
|
||||
char buf[BUF_SIZE + 1];
|
||||
@ -56,7 +56,7 @@ print_data (GpgmeData dh)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
static gpgme_error_t
|
||||
passphrase_cb (void *opaque, const char *desc, void **hd, const char **result)
|
||||
{
|
||||
/* Cleanup by looking at *hd. */
|
||||
@ -91,10 +91,10 @@ make_filename (const char *fname)
|
||||
|
||||
|
||||
static void
|
||||
check_verify_result (GpgmeVerifyResult result, int summary, char *fpr,
|
||||
GpgmeError status)
|
||||
check_verify_result (gpgme_verify_result_t result, int summary, char *fpr,
|
||||
gpgme_error_t status)
|
||||
{
|
||||
GpgmeSignature sig;
|
||||
gpgme_signature_t sig;
|
||||
|
||||
sig = result->signatures;
|
||||
if (!sig || sig->next)
|
||||
@ -151,11 +151,11 @@ check_verify_result (GpgmeVerifyResult result, int summary, char *fpr,
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
GpgmeCtx ctx;
|
||||
GpgmeError err;
|
||||
GpgmeData in, out;
|
||||
GpgmeDecryptResult decrypt_result;
|
||||
GpgmeVerifyResult verify_result;
|
||||
gpgme_ctx_t ctx;
|
||||
gpgme_error_t err;
|
||||
gpgme_data_t in, out;
|
||||
gpgme_decrypt_result_t decrypt_result;
|
||||
gpgme_verify_result_t verify_result;
|
||||
const char *cipher_2_asc = make_filename ("cipher-2.asc");
|
||||
char *agent_info;
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
{ \
|
||||
if (err) \
|
||||
{ \
|
||||
fprintf (stderr, "%s:%d: GpgmeError %s\n", \
|
||||
fprintf (stderr, "%s:%d: gpgme_error_t %s\n", \
|
||||
__FILE__, __LINE__, gpgme_strerror (err)); \
|
||||
exit (1); \
|
||||
} \
|
||||
@ -39,7 +39,7 @@
|
||||
|
||||
|
||||
static void
|
||||
print_data (GpgmeData dh)
|
||||
print_data (gpgme_data_t dh)
|
||||
{
|
||||
#define BUF_SIZE 512
|
||||
char buf[BUF_SIZE + 1];
|
||||
@ -55,7 +55,7 @@ print_data (GpgmeData dh)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
static gpgme_error_t
|
||||
passphrase_cb (void *opaque, const char *desc, void **hd, const char **result)
|
||||
{
|
||||
/* Cleanup by looking at *hd. */
|
||||
@ -92,10 +92,10 @@ make_filename (const char *fname)
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
GpgmeCtx ctx;
|
||||
GpgmeError err;
|
||||
GpgmeData in, out;
|
||||
GpgmeDecryptResult result;
|
||||
gpgme_ctx_t ctx;
|
||||
gpgme_error_t err;
|
||||
gpgme_data_t in, out;
|
||||
gpgme_decrypt_result_t result;
|
||||
const char *cipher_1_asc = make_filename ("cipher-1.asc");
|
||||
char *agent_info;
|
||||
|
||||
|
@ -28,13 +28,13 @@
|
||||
#include <gpgme.h>
|
||||
|
||||
struct passphrase_cb_info_s {
|
||||
GpgmeCtx c;
|
||||
gpgme_ctx_t c;
|
||||
int did_it;
|
||||
};
|
||||
|
||||
|
||||
#define fail_if_err(a) do { if(a) { int my_errno = errno; \
|
||||
fprintf (stderr, "%s:%d: GpgmeError %s\n", \
|
||||
fprintf (stderr, "%s:%d: gpgme_error_t %s\n", \
|
||||
__FILE__, __LINE__, gpgme_strerror(a)); \
|
||||
if ((a) == GPGME_File_Error) \
|
||||
fprintf (stderr, "\terrno=`%s'\n", strerror (my_errno)); \
|
||||
@ -42,7 +42,7 @@ struct passphrase_cb_info_s {
|
||||
} while(0)
|
||||
|
||||
static void
|
||||
flush_data (GpgmeData dh)
|
||||
flush_data (gpgme_data_t dh)
|
||||
{
|
||||
char buf[100];
|
||||
int ret;
|
||||
@ -57,7 +57,7 @@ flush_data (GpgmeData dh)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
static gpgme_error_t
|
||||
passphrase_cb (void *opaque, const char *desc,
|
||||
void **r_hd, const char **result)
|
||||
{
|
||||
@ -73,10 +73,10 @@ passphrase_cb (void *opaque, const char *desc,
|
||||
}
|
||||
|
||||
|
||||
GpgmeError
|
||||
edit_fnc (void *opaque, GpgmeStatusCode status, const char *args, const char **result)
|
||||
gpgme_error_t
|
||||
edit_fnc (void *opaque, gpgme_status_code_t status, const char *args, const char **result)
|
||||
{
|
||||
GpgmeData out = (GpgmeData) opaque;
|
||||
gpgme_data_t out = (gpgme_data_t) opaque;
|
||||
|
||||
fputs ("[-- Response --]\n", stdout);
|
||||
flush_data (out);
|
||||
@ -120,10 +120,10 @@ edit_fnc (void *opaque, GpgmeStatusCode status, const char *args, const char **r
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
GpgmeCtx ctx;
|
||||
GpgmeError err;
|
||||
GpgmeData out = NULL;
|
||||
GpgmeKey key = NULL;
|
||||
gpgme_ctx_t ctx;
|
||||
gpgme_error_t err;
|
||||
gpgme_data_t out = NULL;
|
||||
gpgme_key_t key = NULL;
|
||||
struct passphrase_cb_info_s info;
|
||||
const char *pattern = "Alpha";
|
||||
char *p;
|
||||
|
@ -29,7 +29,7 @@
|
||||
{ \
|
||||
if (err) \
|
||||
{ \
|
||||
fprintf (stderr, "%s:%d: GpgmeError %s\n", \
|
||||
fprintf (stderr, "%s:%d: gpgme_error_t %s\n", \
|
||||
__FILE__, __LINE__, gpgme_strerror (err)); \
|
||||
exit (1); \
|
||||
} \
|
||||
@ -38,7 +38,7 @@
|
||||
|
||||
|
||||
static void
|
||||
print_data (GpgmeData dh)
|
||||
print_data (gpgme_data_t dh)
|
||||
{
|
||||
#define BUF_SIZE 512
|
||||
char buf[BUF_SIZE + 1];
|
||||
@ -54,7 +54,7 @@ print_data (GpgmeData dh)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
static gpgme_error_t
|
||||
passphrase_cb (void *opaque, const char *desc, void **hd, const char **result)
|
||||
{
|
||||
/* Cleanup by looking at *hd. */
|
||||
@ -67,7 +67,7 @@ passphrase_cb (void *opaque, const char *desc, void **hd, const char **result)
|
||||
|
||||
|
||||
static void
|
||||
check_result (GpgmeSignResult result, GpgmeSigMode type)
|
||||
check_result (gpgme_sign_result_t result, gpgme_sig_mode_t type)
|
||||
{
|
||||
if (result->invalid_signers)
|
||||
{
|
||||
@ -116,12 +116,12 @@ check_result (GpgmeSignResult result, GpgmeSigMode type)
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
GpgmeCtx ctx;
|
||||
GpgmeError err;
|
||||
GpgmeData in, out;
|
||||
GpgmeRecipients rset;
|
||||
GpgmeEncryptResult result;
|
||||
GpgmeSignResult sign_result;
|
||||
gpgme_ctx_t ctx;
|
||||
gpgme_error_t err;
|
||||
gpgme_data_t in, out;
|
||||
gpgme_recipients_t rset;
|
||||
gpgme_encrypt_result_t result;
|
||||
gpgme_sign_result_t sign_result;
|
||||
char *agent_info;
|
||||
|
||||
err = gpgme_engine_check_version (GPGME_PROTOCOL_OpenPGP);
|
||||
|
@ -27,13 +27,13 @@
|
||||
#include <gpgme.h>
|
||||
|
||||
#define fail_if_err(a) do { if(a) { \
|
||||
fprintf (stderr, "%s:%d: GpgmeError %s\n", \
|
||||
fprintf (stderr, "%s:%d: gpgme_error_t %s\n", \
|
||||
__FILE__, __LINE__, gpgme_strerror(a)); \
|
||||
exit (1); } \
|
||||
} while(0)
|
||||
|
||||
static void
|
||||
print_data (GpgmeData dh)
|
||||
print_data (gpgme_data_t dh)
|
||||
{
|
||||
char buf[100];
|
||||
int ret;
|
||||
@ -47,7 +47,7 @@ print_data (GpgmeData dh)
|
||||
fail_if_err (GPGME_File_Error);
|
||||
}
|
||||
|
||||
static GpgmeError
|
||||
static gpgme_error_t
|
||||
passphrase_cb (void *opaque, const char *desc,
|
||||
void **r_hd, const char **result)
|
||||
{
|
||||
@ -66,9 +66,9 @@ passphrase_cb (void *opaque, const char *desc,
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
GpgmeCtx ctx;
|
||||
GpgmeError err;
|
||||
GpgmeData plain, cipher;
|
||||
gpgme_ctx_t ctx;
|
||||
gpgme_error_t err;
|
||||
gpgme_data_t plain, cipher;
|
||||
const char *text = "Hallo Leute\n";
|
||||
char *text2;
|
||||
char *p;
|
||||
@ -101,8 +101,7 @@ main (int argc, char **argv)
|
||||
print_data (cipher);
|
||||
fputs ("End Result.\n", stdout);
|
||||
|
||||
err = gpgme_data_rewind (cipher);
|
||||
fail_if_err (err);
|
||||
gpgme_data_seek (cipher, 0, SEEK_SET);
|
||||
|
||||
gpgme_data_release (plain);
|
||||
err = gpgme_data_new (&plain);
|
||||
|
@ -29,7 +29,7 @@
|
||||
{ \
|
||||
if (err) \
|
||||
{ \
|
||||
fprintf (stderr, "%s:%d: GpgmeError %s\n", \
|
||||
fprintf (stderr, "%s:%d: gpgme_error_t %s\n", \
|
||||
__FILE__, __LINE__, gpgme_strerror (err)); \
|
||||
exit (1); \
|
||||
} \
|
||||
@ -38,7 +38,7 @@
|
||||
|
||||
|
||||
static void
|
||||
print_data (GpgmeData dh)
|
||||
print_data (gpgme_data_t dh)
|
||||
{
|
||||
#define BUF_SIZE 512
|
||||
char buf[BUF_SIZE + 1];
|
||||
@ -57,11 +57,11 @@ print_data (GpgmeData dh)
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
GpgmeCtx ctx;
|
||||
GpgmeError err;
|
||||
GpgmeData in, out;
|
||||
GpgmeRecipients rset;
|
||||
GpgmeEncryptResult result;
|
||||
gpgme_ctx_t ctx;
|
||||
gpgme_error_t err;
|
||||
gpgme_data_t in, out;
|
||||
gpgme_recipients_t rset;
|
||||
gpgme_encrypt_result_t result;
|
||||
|
||||
err = gpgme_engine_check_version (GPGME_PROTOCOL_OpenPGP);
|
||||
fail_if_err (err);
|
||||
|
@ -28,13 +28,13 @@
|
||||
#include <gpgme.h>
|
||||
|
||||
#define fail_if_err(a) do { if(a) { \
|
||||
fprintf (stderr, "%s:%d: GpgmeError %s\n", \
|
||||
fprintf (stderr, "%s:%d: gpgme_error_t %s\n", \
|
||||
__FILE__, __LINE__, gpgme_strerror(a)); \
|
||||
exit (1); } \
|
||||
} while(0)
|
||||
|
||||
static void
|
||||
print_data (GpgmeData dh)
|
||||
print_data (gpgme_data_t dh)
|
||||
{
|
||||
char buf[100];
|
||||
int ret;
|
||||
@ -54,7 +54,7 @@ print_data (GpgmeData dh)
|
||||
struct op_result
|
||||
{
|
||||
int done;
|
||||
GpgmeError err;
|
||||
gpgme_error_t err;
|
||||
};
|
||||
|
||||
struct op_result op_result;
|
||||
@ -63,15 +63,15 @@ struct one_fd
|
||||
{
|
||||
int fd;
|
||||
int dir;
|
||||
GpgmeIOCb fnc;
|
||||
gpgme_io_cb_t fnc;
|
||||
void *fnc_data;
|
||||
};
|
||||
|
||||
#define FDLIST_MAX 32
|
||||
struct one_fd fdlist[FDLIST_MAX];
|
||||
|
||||
GpgmeError
|
||||
add_io_cb (void *data, int fd, int dir, GpgmeIOCb fnc, void *fnc_data,
|
||||
gpgme_error_t
|
||||
add_io_cb (void *data, int fd, int dir, gpgme_io_cb_t fnc, void *fnc_data,
|
||||
void **r_tag)
|
||||
{
|
||||
struct one_fd *fds = data;
|
||||
@ -103,14 +103,14 @@ remove_io_cb (void *tag)
|
||||
}
|
||||
|
||||
void
|
||||
io_event (void *data, GpgmeEventIO type, void *type_data)
|
||||
io_event (void *data, gpgme_event_io_t type, void *type_data)
|
||||
{
|
||||
struct op_result *result = data;
|
||||
|
||||
if (type == GPGME_EVENT_DONE)
|
||||
{
|
||||
result->done = 1;
|
||||
result->err = * (GpgmeError *) type_data;
|
||||
result->err = * (gpgme_error_t *) type_data;
|
||||
}
|
||||
}
|
||||
|
||||
@ -166,7 +166,7 @@ my_wait (void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct GpgmeIOCbs io_cbs =
|
||||
struct gpgme_io_cbs io_cbs =
|
||||
{
|
||||
add_io_cb,
|
||||
fdlist,
|
||||
@ -178,10 +178,10 @@ struct GpgmeIOCbs io_cbs =
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
GpgmeCtx ctx;
|
||||
GpgmeError err;
|
||||
GpgmeData in, out;
|
||||
GpgmeRecipients rset;
|
||||
gpgme_ctx_t ctx;
|
||||
gpgme_error_t err;
|
||||
gpgme_data_t in, out;
|
||||
gpgme_recipients_t rset;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < FDLIST_MAX; i++)
|
||||
|
@ -27,14 +27,14 @@
|
||||
#include <gpgme.h>
|
||||
|
||||
#define fail_if_err(a) do { if(a) { \
|
||||
fprintf (stderr, "%s:%d: GpgmeError %s\n", \
|
||||
fprintf (stderr, "%s:%d: gpgme_error_t %s\n", \
|
||||
__FILE__, __LINE__, gpgme_strerror(a)); \
|
||||
exit (1); } \
|
||||
} while(0)
|
||||
|
||||
|
||||
static void
|
||||
print_data (GpgmeData dh)
|
||||
print_data (gpgme_data_t dh)
|
||||
{
|
||||
char buf[100];
|
||||
int ret;
|
||||
@ -51,10 +51,10 @@ print_data (GpgmeData dh)
|
||||
int
|
||||
main (int argc, char **argv )
|
||||
{
|
||||
GpgmeCtx ctx;
|
||||
GpgmeError err;
|
||||
GpgmeData out;
|
||||
GpgmeRecipients rset;
|
||||
gpgme_ctx_t ctx;
|
||||
gpgme_error_t err;
|
||||
gpgme_data_t out;
|
||||
gpgme_recipients_t rset;
|
||||
|
||||
do {
|
||||
err = gpgme_new (&ctx);
|
||||
|
@ -29,7 +29,7 @@
|
||||
{ \
|
||||
if (err) \
|
||||
{ \
|
||||
fprintf (stderr, "%s:%d: GpgmeError %s\n", \
|
||||
fprintf (stderr, "%s:%d: gpgme_error_t %s\n", \
|
||||
__FILE__, __LINE__, gpgme_strerror (err)); \
|
||||
exit (1); \
|
||||
} \
|
||||
@ -62,8 +62,8 @@ progress (void *self, const char *what, int type, int current, int total)
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
GpgmeCtx ctx;
|
||||
GpgmeError err;
|
||||
gpgme_ctx_t ctx;
|
||||
gpgme_error_t err;
|
||||
const char *parms = "<GnupgKeyParms format=\"internal\">\n"
|
||||
"Key-Type: DSA\n"
|
||||
"Key-Length: 1024\n"
|
||||
@ -75,7 +75,7 @@ main (int argc, char **argv)
|
||||
"Expire-Date: 0\n"
|
||||
"Passphrase: abc\n"
|
||||
"</GnupgKeyParms>\n";
|
||||
GpgmeGenKeyResult result;
|
||||
gpgme_genkey_result_t result;
|
||||
|
||||
err = gpgme_new (&ctx);
|
||||
fail_if_err (err);
|
||||
|
@ -31,7 +31,7 @@
|
||||
{ \
|
||||
if (err) \
|
||||
{ \
|
||||
fprintf (stderr, "%s:%d: GpgmeError %s\n", \
|
||||
fprintf (stderr, "%s:%d: gpgme_error_t %s\n", \
|
||||
__FILE__, __LINE__, gpgme_strerror (err)); \
|
||||
exit (1); \
|
||||
} \
|
||||
@ -58,7 +58,7 @@ mk_fname (const char *fname)
|
||||
|
||||
|
||||
void
|
||||
check_result (GpgmeImportResult result, char *fpr, int secret)
|
||||
check_result (gpgme_import_result_t result, char *fpr, int secret)
|
||||
{
|
||||
if (result->considered != 1)
|
||||
{
|
||||
@ -183,10 +183,10 @@ check_result (GpgmeImportResult result, char *fpr, int secret)
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
GpgmeCtx ctx;
|
||||
GpgmeError err;
|
||||
GpgmeData in;
|
||||
GpgmeImportResult result;
|
||||
gpgme_ctx_t ctx;
|
||||
gpgme_error_t err;
|
||||
gpgme_data_t in;
|
||||
gpgme_import_result_t result;
|
||||
const char *pubkey_1_asc = mk_fname ("pubkey-1.asc");
|
||||
const char *seckey_1_asc = mk_fname ("seckey-1.asc");
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
{ \
|
||||
if (err) \
|
||||
{ \
|
||||
fprintf (stderr, "%s:%d: GpgmeError %s\n", \
|
||||
fprintf (stderr, "%s:%d: gpgme_error_t %s\n", \
|
||||
__FILE__, __LINE__, gpgme_strerror (err)); \
|
||||
exit (1); \
|
||||
} \
|
||||
@ -49,7 +49,7 @@ struct
|
||||
char *email;
|
||||
struct
|
||||
{
|
||||
GpgmePubKeyAlgo algo;
|
||||
gpgme_pubkey_algo_t algo;
|
||||
char *keyid;
|
||||
char *name;
|
||||
char *comment;
|
||||
@ -77,10 +77,10 @@ keys[] =
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
GpgmeError err;
|
||||
GpgmeCtx ctx;
|
||||
GpgmeKey key;
|
||||
GpgmeKeyListResult result;
|
||||
gpgme_error_t err;
|
||||
gpgme_ctx_t ctx;
|
||||
gpgme_key_t key;
|
||||
gpgme_keylist_result_t result;
|
||||
int mode;
|
||||
int i = 0;
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
{ \
|
||||
if (err) \
|
||||
{ \
|
||||
fprintf (stderr, "%s:%d: GpgmeError %s\n", \
|
||||
fprintf (stderr, "%s:%d: gpgme_error_t %s\n", \
|
||||
__FILE__, __LINE__, gpgme_strerror (err)); \
|
||||
exit (1); \
|
||||
} \
|
||||
@ -118,10 +118,10 @@ keys[] =
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
GpgmeError err;
|
||||
GpgmeCtx ctx;
|
||||
GpgmeKey key;
|
||||
GpgmeKeyListResult result;
|
||||
gpgme_error_t err;
|
||||
gpgme_ctx_t ctx;
|
||||
gpgme_key_t key;
|
||||
gpgme_keylist_result_t result;
|
||||
int i = 0;
|
||||
|
||||
err = gpgme_engine_check_version (GPGME_PROTOCOL_OpenPGP);
|
||||
|
@ -29,7 +29,7 @@
|
||||
{ \
|
||||
if (err) \
|
||||
{ \
|
||||
fprintf (stderr, "%s:%d: GpgmeError %s\n", \
|
||||
fprintf (stderr, "%s:%d: gpgme_error_t %s\n", \
|
||||
__FILE__, __LINE__, gpgme_strerror (err)); \
|
||||
exit (1); \
|
||||
} \
|
||||
@ -38,7 +38,7 @@
|
||||
|
||||
|
||||
static void
|
||||
print_data (GpgmeData dh)
|
||||
print_data (gpgme_data_t dh)
|
||||
{
|
||||
#define BUF_SIZE 512
|
||||
char buf[BUF_SIZE + 1];
|
||||
@ -54,7 +54,7 @@ print_data (GpgmeData dh)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
static gpgme_error_t
|
||||
passphrase_cb (void *opaque, const char *desc, void **hd, const char **result)
|
||||
{
|
||||
/* Cleanup by looking at *hd. */
|
||||
@ -67,7 +67,7 @@ passphrase_cb (void *opaque, const char *desc, void **hd, const char **result)
|
||||
|
||||
|
||||
static void
|
||||
check_result (GpgmeSignResult result, GpgmeSigMode type)
|
||||
check_result (gpgme_sign_result_t result, gpgme_sig_mode_t type)
|
||||
{
|
||||
if (result->invalid_signers)
|
||||
{
|
||||
@ -116,10 +116,10 @@ check_result (GpgmeSignResult result, GpgmeSigMode type)
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
GpgmeCtx ctx;
|
||||
GpgmeError err;
|
||||
GpgmeData in, out;
|
||||
GpgmeSignResult result;
|
||||
gpgme_ctx_t ctx;
|
||||
gpgme_error_t err;
|
||||
gpgme_data_t in, out;
|
||||
gpgme_sign_result_t result;
|
||||
char *agent_info;
|
||||
|
||||
err = gpgme_new (&ctx);
|
||||
@ -146,7 +146,7 @@ main (int argc, char **argv)
|
||||
gpgme_data_release (out);
|
||||
|
||||
/* Now a detached signature. */
|
||||
gpgme_data_rewind (in);
|
||||
gpgme_data_seek (in, 0, SEEK_SET);
|
||||
err = gpgme_data_new (&out);
|
||||
fail_if_err (err);
|
||||
err = gpgme_op_sign (ctx, in, out, GPGME_SIG_MODE_DETACH);
|
||||
@ -157,7 +157,7 @@ main (int argc, char **argv)
|
||||
gpgme_data_release (out);
|
||||
|
||||
/* And finally a cleartext signature. */
|
||||
gpgme_data_rewind (in);
|
||||
gpgme_data_seek (in, 0, SEEK_SET);
|
||||
err = gpgme_data_new (&out);
|
||||
fail_if_err (err);
|
||||
err = gpgme_op_sign (ctx, in, out, GPGME_SIG_MODE_CLEAR);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* t-signers.c - Regression tests for the Gpgme multiple signers interface.
|
||||
/* t-signers.c - Regression tests for the multiple signers interface.
|
||||
Copyright (C) 2000 Werner Koch (dd9jn)
|
||||
Copyright (C) 2001, 2003 g10 Code GmbH
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
{ \
|
||||
if (err) \
|
||||
{ \
|
||||
fprintf (stderr, "%s:%d: GpgmeError %s\n", \
|
||||
fprintf (stderr, "%s:%d: gpgme_error_t %s\n", \
|
||||
__FILE__, __LINE__, gpgme_strerror (err)); \
|
||||
exit (1); \
|
||||
} \
|
||||
@ -38,7 +38,7 @@
|
||||
|
||||
|
||||
static void
|
||||
print_data (GpgmeData dh)
|
||||
print_data (gpgme_data_t dh)
|
||||
{
|
||||
#define BUF_SIZE 512
|
||||
char buf[BUF_SIZE + 1];
|
||||
@ -54,7 +54,7 @@ print_data (GpgmeData dh)
|
||||
}
|
||||
|
||||
|
||||
static GpgmeError
|
||||
static gpgme_error_t
|
||||
passphrase_cb (void *opaque, const char *desc, void **hd, const char **result)
|
||||
{
|
||||
/* Cleanup by looking at *hd. */
|
||||
@ -67,9 +67,9 @@ passphrase_cb (void *opaque, const char *desc, void **hd, const char **result)
|
||||
|
||||
|
||||
static void
|
||||
check_result (GpgmeSignResult result, GpgmeSigMode type)
|
||||
check_result (gpgme_sign_result_t result, gpgme_sig_mode_t type)
|
||||
{
|
||||
GpgmeNewSignature signature;
|
||||
gpgme_new_signature_t signature;
|
||||
|
||||
if (result->invalid_signers)
|
||||
{
|
||||
@ -127,11 +127,11 @@ check_result (GpgmeSignResult result, GpgmeSigMode type)
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
GpgmeCtx ctx;
|
||||
GpgmeError err;
|
||||
GpgmeData in, out;
|
||||
GpgmeKey key[2];
|
||||
GpgmeSignResult result;
|
||||
gpgme_ctx_t ctx;
|
||||
gpgme_error_t err;
|
||||
gpgme_data_t in, out;
|
||||
gpgme_key_t key[2];
|
||||
gpgme_sign_result_t result;
|
||||
char *agent_info;
|
||||
|
||||
err = gpgme_new (&ctx);
|
||||
@ -172,7 +172,7 @@ main (int argc, char *argv[])
|
||||
gpgme_data_release (out);
|
||||
|
||||
/* Now a detached signature. */
|
||||
gpgme_data_rewind (in);
|
||||
gpgme_data_seek (in, 0, SEEK_SET);
|
||||
err = gpgme_data_new (&out);
|
||||
fail_if_err (err);
|
||||
err = gpgme_op_sign (ctx, in, out, GPGME_SIG_MODE_DETACH);
|
||||
@ -183,7 +183,7 @@ main (int argc, char *argv[])
|
||||
gpgme_data_release (out);
|
||||
|
||||
/* And finally a cleartext signature. */
|
||||
gpgme_data_rewind (in);
|
||||
gpgme_data_seek (in, 0, SEEK_SET);
|
||||
err = gpgme_data_new (&out);
|
||||
fail_if_err (err);
|
||||
err = gpgme_op_sign (ctx, in, out, GPGME_SIG_MODE_CLEAR);
|
||||
@ -192,7 +192,7 @@ main (int argc, char *argv[])
|
||||
check_result (result, GPGME_SIG_MODE_CLEAR);
|
||||
print_data (out);
|
||||
gpgme_data_release (out);
|
||||
gpgme_data_rewind (in);
|
||||
gpgme_data_seek (in, 0, SEEK_SET);
|
||||
|
||||
gpgme_data_release (in);
|
||||
gpgme_release (ctx);
|
||||
|
@ -30,7 +30,7 @@
|
||||
{ \
|
||||
if (err) \
|
||||
{ \
|
||||
fprintf (stderr, "%s:%d: GpgmeError %s\n", \
|
||||
fprintf (stderr, "%s:%d: gpgme_error_t %s\n", \
|
||||
__FILE__, __LINE__, gpgme_strerror (err)); \
|
||||
exit (1); \
|
||||
} \
|
||||
@ -41,9 +41,9 @@
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
GpgmeCtx ctx;
|
||||
GpgmeError err;
|
||||
GpgmeTrustItem item;
|
||||
gpgme_ctx_t ctx;
|
||||
gpgme_error_t err;
|
||||
gpgme_trust_item_t item;
|
||||
|
||||
err = gpgme_new (&ctx);
|
||||
fail_if_err (err);
|
||||
|
@ -30,7 +30,7 @@
|
||||
{ \
|
||||
if (err) \
|
||||
{ \
|
||||
fprintf (stderr, "%s:%d: GpgmeError %s\n", \
|
||||
fprintf (stderr, "%s:%d: gpgme_error_t %s\n", \
|
||||
__FILE__, __LINE__, gpgme_strerror (err)); \
|
||||
exit (1); \
|
||||
} \
|
||||
@ -82,10 +82,10 @@ static const char test_sig2[] =
|
||||
|
||||
|
||||
static void
|
||||
check_result (GpgmeVerifyResult result, int summary, char *fpr,
|
||||
GpgmeError status, int notation)
|
||||
check_result (gpgme_verify_result_t result, int summary, char *fpr,
|
||||
gpgme_error_t status, int notation)
|
||||
{
|
||||
GpgmeSignature sig;
|
||||
gpgme_signature_t sig;
|
||||
|
||||
sig = result->signatures;
|
||||
if (!sig || sig->next)
|
||||
@ -157,10 +157,10 @@ check_result (GpgmeVerifyResult result, int summary, char *fpr,
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
GpgmeCtx ctx;
|
||||
GpgmeError err;
|
||||
GpgmeData sig, text;
|
||||
GpgmeVerifyResult result;
|
||||
gpgme_ctx_t ctx;
|
||||
gpgme_error_t err;
|
||||
gpgme_data_t sig, text;
|
||||
gpgme_verify_result_t result;
|
||||
|
||||
err = gpgme_new (&ctx);
|
||||
fail_if_err (err);
|
||||
@ -180,7 +180,7 @@ main (int argc, char *argv[])
|
||||
gpgme_data_release (text);
|
||||
err = gpgme_data_new_from_mem (&text, test_text1f, strlen (test_text1f), 0);
|
||||
fail_if_err (err);
|
||||
gpgme_data_rewind (sig);
|
||||
gpgme_data_seek (sig, 0, SEEK_SET);
|
||||
err = gpgme_op_verify (ctx, sig, text, NULL);
|
||||
fail_if_err (err);
|
||||
result = gpgme_op_verify_result (ctx);
|
||||
|
@ -40,7 +40,7 @@ static const char test_cip1[] =
|
||||
"-----END CMS OBJECT-----\n";
|
||||
|
||||
#define fail_if_err(a) do { if(a) { int my_errno = errno; \
|
||||
fprintf (stderr, "%s:%d: GpgmeError %s\n", \
|
||||
fprintf (stderr, "%s:%d: gpgme_error_t %s\n", \
|
||||
__FILE__, __LINE__, gpgme_strerror(a)); \
|
||||
if ((a) == GPGME_File_Error) \
|
||||
fprintf (stderr, "\terrno=`%s'\n", strerror (my_errno)); \
|
||||
@ -48,7 +48,7 @@ static const char test_cip1[] =
|
||||
} while(0)
|
||||
|
||||
static void
|
||||
print_data (GpgmeData dh)
|
||||
print_data (gpgme_data_t dh)
|
||||
{
|
||||
#define BUF_SIZE 512
|
||||
char buf[BUF_SIZE + 1];
|
||||
@ -67,10 +67,10 @@ print_data (GpgmeData dh)
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
GpgmeCtx ctx;
|
||||
GpgmeError err;
|
||||
GpgmeData in, out;
|
||||
GpgmeDecryptResult result;
|
||||
gpgme_ctx_t ctx;
|
||||
gpgme_error_t err;
|
||||
gpgme_data_t in, out;
|
||||
gpgme_decrypt_result_t result;
|
||||
|
||||
err = gpgme_new (&ctx);
|
||||
fail_if_err (err);
|
||||
|
@ -29,7 +29,7 @@
|
||||
{ \
|
||||
if (err) \
|
||||
{ \
|
||||
fprintf (stderr, "%s:%d: GpgmeError %s\n", \
|
||||
fprintf (stderr, "%s:%d: gpgme_error_t %s\n", \
|
||||
__FILE__, __LINE__, gpgme_strerror (err)); \
|
||||
exit (1); \
|
||||
} \
|
||||
@ -38,7 +38,7 @@
|
||||
|
||||
|
||||
static void
|
||||
print_data (GpgmeData dh)
|
||||
print_data (gpgme_data_t dh)
|
||||
{
|
||||
#define BUF_SIZE 512
|
||||
char buf[BUF_SIZE + 1];
|
||||
@ -57,11 +57,11 @@ print_data (GpgmeData dh)
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
GpgmeCtx ctx;
|
||||
GpgmeError err;
|
||||
GpgmeData in, out;
|
||||
GpgmeRecipients rset;
|
||||
GpgmeEncryptResult result;
|
||||
gpgme_ctx_t ctx;
|
||||
gpgme_error_t err;
|
||||
gpgme_data_t in, out;
|
||||
gpgme_recipients_t rset;
|
||||
gpgme_encrypt_result_t result;
|
||||
|
||||
err = gpgme_engine_check_version (GPGME_PROTOCOL_CMS);
|
||||
fail_if_err (err);
|
||||
|
@ -27,13 +27,13 @@
|
||||
#include <gpgme.h>
|
||||
|
||||
#define fail_if_err(a) do { if(a) { \
|
||||
fprintf (stderr, "%s:%d: GpgmeError %s\n", \
|
||||
fprintf (stderr, "%s:%d: gpgme_error_t %s\n", \
|
||||
__FILE__, __LINE__, gpgme_strerror(a)); \
|
||||
exit (1); } \
|
||||
} while(0)
|
||||
|
||||
static void
|
||||
print_data (GpgmeData dh)
|
||||
print_data (gpgme_data_t dh)
|
||||
{
|
||||
char buf[100];
|
||||
int ret;
|
||||
@ -51,10 +51,10 @@ print_data (GpgmeData dh)
|
||||
int
|
||||
main (int argc, char **argv )
|
||||
{
|
||||
GpgmeCtx ctx;
|
||||
GpgmeError err;
|
||||
GpgmeData out;
|
||||
GpgmeRecipients rset;
|
||||
gpgme_ctx_t ctx;
|
||||
gpgme_error_t err;
|
||||
gpgme_data_t out;
|
||||
gpgme_recipients_t rset;
|
||||
|
||||
do {
|
||||
err = gpgme_new (&ctx);
|
||||
|
@ -30,7 +30,7 @@
|
||||
{ \
|
||||
if (err) \
|
||||
{ \
|
||||
fprintf (stderr, "%s:%d: GpgmeError %s\n", \
|
||||
fprintf (stderr, "%s:%d: gpgme_error_t %s\n", \
|
||||
__FILE__, __LINE__, gpgme_strerror (err)); \
|
||||
exit (1); \
|
||||
} \
|
||||
@ -39,7 +39,7 @@
|
||||
|
||||
|
||||
static void
|
||||
print_data (GpgmeData dh)
|
||||
print_data (gpgme_data_t dh)
|
||||
{
|
||||
#define BUF_SIZE 512
|
||||
char buf[BUF_SIZE + 1];
|
||||
@ -81,16 +81,16 @@ progress (void *self, const char *what, int type, int current, int total)
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
GpgmeCtx ctx;
|
||||
GpgmeError err;
|
||||
gpgme_ctx_t ctx;
|
||||
gpgme_error_t err;
|
||||
const char *parms = "<GnupgKeyParms format=\"internal\">\n"
|
||||
"Key-Type: RSA\n"
|
||||
"Key-Length: 1024\n"
|
||||
"Name-DN: C=de,O=g10 code,OU=Testlab,CN=Joe 2 Tester\n"
|
||||
"Name-Email: joe@foo.bar\n"
|
||||
"</GnupgKeyParms>\n";
|
||||
GpgmeGenKeyResult result;
|
||||
GpgmeData certreq;
|
||||
gpgme_genkey_result_t result;
|
||||
gpgme_data_t certreq;
|
||||
|
||||
err = gpgme_engine_check_version (GPGME_PROTOCOL_CMS);
|
||||
fail_if_err (err);
|
||||
|
@ -31,7 +31,7 @@
|
||||
{ \
|
||||
if (err) \
|
||||
{ \
|
||||
fprintf (stderr, "%s:%d: GpgmeError %s\n", \
|
||||
fprintf (stderr, "%s:%d: gpgme_error_t %s\n", \
|
||||
__FILE__, __LINE__, gpgme_strerror (err)); \
|
||||
exit (1); \
|
||||
} \
|
||||
@ -62,7 +62,7 @@ make_filename (const char *fname)
|
||||
|
||||
|
||||
void
|
||||
check_result (GpgmeImportResult result, char *fpr, int total)
|
||||
check_result (gpgme_import_result_t result, char *fpr, int total)
|
||||
{
|
||||
if (result->considered != total)
|
||||
{
|
||||
@ -154,10 +154,10 @@ check_result (GpgmeImportResult result, char *fpr, int total)
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
GpgmeCtx ctx;
|
||||
GpgmeError err;
|
||||
GpgmeData in;
|
||||
GpgmeImportResult result;
|
||||
gpgme_ctx_t ctx;
|
||||
gpgme_error_t err;
|
||||
gpgme_data_t in;
|
||||
gpgme_import_result_t result;
|
||||
const char *cert_1 = make_filename ("cert_dfn_pca01.der");
|
||||
const char *cert_2 = make_filename ("cert_dfn_pca15.der");
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
{ \
|
||||
if (err) \
|
||||
{ \
|
||||
fprintf (stderr, "%s:%d: GpgmeError %s\n", \
|
||||
fprintf (stderr, "%s:%d: gpgme_error_t %s\n", \
|
||||
__FILE__, __LINE__, gpgme_strerror (err)); \
|
||||
exit (1); \
|
||||
} \
|
||||
@ -76,10 +76,10 @@ keys[] =
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
GpgmeError err;
|
||||
GpgmeCtx ctx;
|
||||
GpgmeKey key;
|
||||
GpgmeKeyListResult result;
|
||||
gpgme_error_t err;
|
||||
gpgme_ctx_t ctx;
|
||||
gpgme_key_t key;
|
||||
gpgme_keylist_result_t result;
|
||||
int i = 0;
|
||||
|
||||
err = gpgme_engine_check_version (GPGME_PROTOCOL_CMS);
|
||||
|
@ -29,7 +29,7 @@
|
||||
{ \
|
||||
if (err) \
|
||||
{ \
|
||||
fprintf (stderr, "%s:%d: GpgmeError %s\n", \
|
||||
fprintf (stderr, "%s:%d: gpgme_error_t %s\n", \
|
||||
__FILE__, __LINE__, gpgme_strerror (err)); \
|
||||
exit (1); \
|
||||
} \
|
||||
@ -38,7 +38,7 @@
|
||||
|
||||
|
||||
static void
|
||||
print_data (GpgmeData dh)
|
||||
print_data (gpgme_data_t dh)
|
||||
{
|
||||
#define BUF_SIZE 512
|
||||
char buf[BUF_SIZE + 1];
|
||||
@ -55,7 +55,7 @@ print_data (GpgmeData dh)
|
||||
|
||||
|
||||
static void
|
||||
check_result (GpgmeSignResult result, GpgmeSigMode type)
|
||||
check_result (gpgme_sign_result_t result, gpgme_sig_mode_t type)
|
||||
{
|
||||
if (result->invalid_signers)
|
||||
{
|
||||
@ -104,10 +104,10 @@ check_result (GpgmeSignResult result, GpgmeSigMode type)
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
GpgmeCtx ctx;
|
||||
GpgmeError err;
|
||||
GpgmeData in, out;
|
||||
GpgmeSignResult result;
|
||||
gpgme_ctx_t ctx;
|
||||
gpgme_error_t err;
|
||||
gpgme_data_t in, out;
|
||||
gpgme_sign_result_t result;
|
||||
|
||||
err = gpgme_engine_check_version (GPGME_PROTOCOL_CMS);
|
||||
fail_if_err (err);
|
||||
@ -133,7 +133,7 @@ main (int argc, char **argv)
|
||||
gpgme_data_release (out);
|
||||
|
||||
/* Now a detached signature. */
|
||||
gpgme_data_rewind (in);
|
||||
gpgme_data_seek (in, 0, SEEK_SET);
|
||||
err = gpgme_data_new (&out);
|
||||
fail_if_err (err);
|
||||
err = gpgme_op_sign (ctx, in, out, GPGME_SIG_MODE_DETACH);
|
||||
|
@ -30,7 +30,7 @@
|
||||
{ \
|
||||
if (err) \
|
||||
{ \
|
||||
fprintf (stderr, "%s:%d: GpgmeError %s\n", \
|
||||
fprintf (stderr, "%s:%d: gpgme_error_t %s\n", \
|
||||
__FILE__, __LINE__, gpgme_strerror (err)); \
|
||||
exit (1); \
|
||||
} \
|
||||
@ -54,10 +54,10 @@ static const char test_sig1[] =
|
||||
|
||||
|
||||
static void
|
||||
check_result (GpgmeVerifyResult result, int summary, char *fpr,
|
||||
GpgmeError status, GpgmeValidity validity)
|
||||
check_result (gpgme_verify_result_t result, int summary, char *fpr,
|
||||
gpgme_error_t status, gpgme_validity_t validity)
|
||||
{
|
||||
GpgmeSignature sig;
|
||||
gpgme_signature_t sig;
|
||||
|
||||
sig = result->signatures;
|
||||
if (!sig || sig->next)
|
||||
@ -114,10 +114,10 @@ check_result (GpgmeVerifyResult result, int summary, char *fpr,
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
GpgmeCtx ctx;
|
||||
GpgmeError err;
|
||||
GpgmeData sig, text;
|
||||
GpgmeVerifyResult result;
|
||||
gpgme_ctx_t ctx;
|
||||
gpgme_error_t err;
|
||||
gpgme_data_t sig, text;
|
||||
gpgme_verify_result_t result;
|
||||
|
||||
err = gpgme_new (&ctx);
|
||||
fail_if_err (err);
|
||||
@ -139,7 +139,7 @@ main (int argc, char **argv)
|
||||
gpgme_data_release (text);
|
||||
err = gpgme_data_new_from_mem (&text, test_text1f, strlen (test_text1f), 0);
|
||||
fail_if_err (err);
|
||||
gpgme_data_rewind (sig);
|
||||
gpgme_data_seek (sig, 0, SEEK_SET);
|
||||
err = gpgme_op_verify (ctx, sig, text, NULL);
|
||||
fail_if_err (err);
|
||||
result = gpgme_op_verify_result (ctx);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* t-data - Regression tests for the GpgmeData abstraction.
|
||||
/* t-data - Regression tests for the gpgme_data_t abstraction.
|
||||
* Copyright (C) 2001 g10 Code GmbH
|
||||
*
|
||||
* This file is part of GPGME.
|
||||
@ -27,7 +27,7 @@
|
||||
#include <gpgme.h>
|
||||
|
||||
#define fail_if_err(a) do { if(a) { \
|
||||
fprintf (stderr, "%s:%d: (%i) GpgmeError " \
|
||||
fprintf (stderr, "%s:%d: (%i) gpgme_error_t " \
|
||||
"%s\n", __FILE__, __LINE__, round, \
|
||||
gpgme_strerror(a)); \
|
||||
exit (1); } \
|
||||
@ -104,7 +104,7 @@ read_cb (void *cb_value, char *buffer, size_t count, size_t *nread)
|
||||
}
|
||||
|
||||
void
|
||||
read_once_test (round_t round, GpgmeData data)
|
||||
read_once_test (round_t round, gpgme_data_t data)
|
||||
{
|
||||
char buffer[1024];
|
||||
size_t read;
|
||||
@ -128,9 +128,8 @@ read_once_test (round_t round, GpgmeData data)
|
||||
}
|
||||
|
||||
void
|
||||
read_test (round_t round, GpgmeData data)
|
||||
read_test (round_t round, gpgme_data_t data)
|
||||
{
|
||||
GpgmeError err;
|
||||
char buffer[1024];
|
||||
size_t read;
|
||||
|
||||
@ -147,15 +146,13 @@ read_test (round_t round, GpgmeData data)
|
||||
}
|
||||
|
||||
read_once_test (round, data);
|
||||
err = gpgme_data_rewind (data);
|
||||
fail_if_err (err);
|
||||
gpgme_data_seek (data, 0, SEEK_SET);
|
||||
read_once_test (round, data);
|
||||
}
|
||||
|
||||
void
|
||||
write_test (round_t round, GpgmeData data)
|
||||
write_test (round_t round, gpgme_data_t data)
|
||||
{
|
||||
GpgmeError err;
|
||||
char buffer[1024];
|
||||
size_t amt;
|
||||
|
||||
@ -163,8 +160,7 @@ write_test (round_t round, GpgmeData data)
|
||||
if (amt != strlen (text))
|
||||
fail_if_err (GPGME_File_Error);
|
||||
|
||||
err = gpgme_data_rewind (data);
|
||||
fail_if_err (err);
|
||||
gpgme_data_seek (data, 0, SEEK_SET);
|
||||
|
||||
if (round == TEST_INOUT_NONE)
|
||||
read_once_test (round, data);
|
||||
@ -196,8 +192,8 @@ main (int argc, char **argv)
|
||||
const char *text_filename = make_filename ("t-data-1.txt");
|
||||
const char *longer_text_filename = make_filename ("t-data-2.txt");
|
||||
const char *missing_filename = "this-file-surely-does-not-exist";
|
||||
GpgmeError err = GPGME_No_Error;
|
||||
GpgmeData data;
|
||||
gpgme_error_t err = GPGME_No_Error;
|
||||
gpgme_data_t data;
|
||||
|
||||
while (++round)
|
||||
{
|
||||
|
@ -33,7 +33,7 @@
|
||||
{ \
|
||||
if (err) \
|
||||
{ \
|
||||
fprintf (stderr, "%s:%d: GpgmeError %s\n", \
|
||||
fprintf (stderr, "%s:%d: gpgme_error_t %s\n", \
|
||||
__FILE__, __LINE__, gpgme_strerror (err)); \
|
||||
exit (1); \
|
||||
} \
|
||||
@ -42,7 +42,7 @@
|
||||
|
||||
|
||||
void
|
||||
check_engine_info (GpgmeEngineInfo info, GpgmeProtocol protocol,
|
||||
check_engine_info (gpgme_engine_info_t info, gpgme_protocol_t protocol,
|
||||
const char *file_name, const char *req_version)
|
||||
{
|
||||
if (info->protocol != protocol)
|
||||
@ -69,8 +69,8 @@ check_engine_info (GpgmeEngineInfo info, GpgmeProtocol protocol,
|
||||
int
|
||||
main (int argc, char **argv )
|
||||
{
|
||||
GpgmeEngineInfo info;
|
||||
GpgmeError err;
|
||||
gpgme_engine_info_t info;
|
||||
gpgme_error_t err;
|
||||
|
||||
err = gpgme_get_engine_info (&info);
|
||||
fail_if_err (err);
|
||||
|
Loading…
Reference in New Issue
Block a user