* src/data.c (_gpgme_data_new): Check for failed selftest.
* tests/run-support.h (make_filename): Print a message on mallooc
failure.
(init_gpgme_basic): New.
* tests/run-identify.c (main): Call init_gpgme_basic becuase we do not
need to setup a protocol.
* tests/t-data.c: Define PGM and include run-support.h.
(make_filename): Remove.
(main): Call init_gpgme_basic.
--
Note: This patch may break applications which used gpgme_data but no
gpgme_new without having called the required gpgme_check_version.
GPGME can be used without a protocol for example to work with the data
object abstraction. Thus a call to gpgme_data_new also needs to check
the result of the core selftests - including on whether
gpgme_check_version has been called.
Signed-off-by: Werner Koch <wk@gnupg.org>
* README: Refer to COPYING.LESSER and "each file" instead of
COPYING.
* COPYING.LESSER: New file.
* gpgme.spec.in (%doc): Add COPYING.LESSER.
* acinclude.m4, configure.ac, Makefile.am: Change license to LGPL
2.1 or later.
* TODO: Add copyright notice.
* README.CVS: Likewise.
assuan/
2004-12-07 Marcus Brinkmann <marcus@g10code.de>
* README.1st: Add copyright notice.
doc/
2004-12-07 Marcus Brinkmann <marcus@g10code.de>
* Makefile.am: Change license to LGPL.
(gpgme_TEXINFOS): Replace gpl.texi with lesser.texi.
* gpgme.texi: Change license to LGPL (also for documentation of
GPGME's license).
* lesser.texi: New file.
* gpl.texi: File removed.
gpgme/
2004-12-07 Marcus Brinkmann <marcus@g10code.de>
* putc_unlocked.c, funopen.c: I just claim copyright on these
files and change their license to LGPL, because they are totally
trivial wrapper functions.
* isascii.c: Change copyright notice to the one from ctype/ctype.h
in the GNU C Library (CVS Head 2004-10-10), where isascii is
defined as a macro doing exactly the same as the function in this
file.
* memrchr.c: Update from the GNU C Library (CVS Head 2001-07-06).
* stpcpy.c: Update from the GNU C Library (CVS Head 2004-10-10).
* ath.c, ath-compat.c, ath.h, ath-pth.c, ath-pth-compat.c,
ath-pthread.c, ath-pthread-compat.c, context.h, conversion.c,
data.c, data-compat.c, data-fd.c, data.h, data-mem.c,
data-stream.c, data-user.c, debug.c, debug.h, decrypt.c,
decrypt-verify.c, delete.c, edit.c, encrypt.c, encrypt-sign.c,
engine-backend.h, engine.c, engine-gpgsm.c, engine.h, error.c,
export.c, genkey.c, get-env.c, gpgme.c, gpgme.h, import.c, io.h,
key.c, keylist.c, mkstatus, Makefile.am, ops.h, op-support.c,
passphrase.c, posix-io.c, posix-sema.c, posix-util.c, progress.c,
rungpg.c, sema.h, sign.c, signers.c, trust-item.c, trustlist.c,
util.h, verify.c, version.c, w32-io.c, w32-sema.c, w32-util.c,
wait.c, wait-global.c, wait.h, wait-private.c, wait-user.c: Change
license to LGPL.
tests/
2004-12-07 Marcus Brinkmann <marcus@g10code.de>
* gpg/mkdemodirs: Add copyright notice.
* gpgsm/Makefile.am, gpgsm/t-support.h, gpgsm/t-decrypt.c,
gpgsm/t-encrypt.c, gpgsm/t-export.c, gpgsm/t-genkey.c,
gpgsm/t-import.c, gpgsm/t-keylist.c, gpgsm/t-sign.c,
gpgsm/t-verify.c, gpg/Makefile.am, gpg/t-decrypt.c,
gpg/t-decrypt-verify.c, gpg/t-edit.c, gpg/t-encrypt.c,
gpg/t-encrypt-sign.c, gpg/t-encrypt-sym.c, gpg/t-eventloop.c,
gpg/t-export.c, gpg/t-genkey.c, gpg/t-import.c, gpg/t-keylist.c,
gpg/t-keylist-sig.c, gpg/t-sign.c, gpg/t-signers.c,
gpg/t-support.h, gpg/t-thread1.c, gpg/t-trustlist.c,
gpg/t-verify.c, Makefile.am, t-data.c, t-engine-info.c,
t-version.c: Change license to LGPL.
* gpg/t-verify.c (check_result): Change type of SUMMARY to
unsigned int.
* gpg/t-decrypt-verify.c (check_verify_result): Likewise.
* gpg/t-keylist-sig.c (keys): Change type of member CLASS to
unsigned int.
* t-data.c (read_cb): Change type of AMOUNT to unsigned int.
* t-version.c (version): Remove unused variable.
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.
2002-10-08 Marcus Brinkmann <marcus@g10code.de>
New data object component:
* gpgme.h (GpgmeDataReadCb, GpgmeDataWriteCb, GpgmeDataSeekCb,
GpgmeDataReleaseCb): New types.
(struct GpgmeDataCbs): New structure.
(gpgme_data_read): Changed prototype to match that of read() closely.
(gpgme_data_write): Similar for write().
(gpgme_data_seek, gpgme_data_new_from_cbs, gpgme_data_new_from_fd,
gpgme_data_new_from_stream): New prototypes.
(gpgme_data_get_type, gpgme_check_engine): Prototype removed.
* Makefile.am (libgpgme_la_SOURCES): Add data.h, data-fd.c,
data-stream.c, data-mem.c, data-user.c and data-compat.c.
* data.c: Reimplemented from scratch.
* (data-compat.c, data-fd.c, data.h, data-mem.c, data-stream.c,
data-user.c): New file.
* context.h (struct gpgme_data_s): Removed.
* conversion.c: Include <errno.h> and <sys/types.h>.
(_gpgme_data_append): New function.
* data.c (_gpgme_data_append_string): Move to ...
* conversion.c (_gpgme_data_append_string): ... here.
* data.c (_gpgme_data_append_for_xml): Move to ...
* conversion.c (_gpgme_data_append_for_xml): ... here.
* data.c (_gpgme_data_append_string_for_xml): Move to ...
* conversion.c (_gpgme_data_append_string_for_xml): ... here.
* data.c (_gpgme_data_append_percentstring_for_xml): Move to ...
* conversion.c (_gpgme_data_append_percentstring_for_xml): ... here.
* ops.h (_gpgme_data_get_mode, _gpgme_data_set_mode): Prototype
removed.
* types.h (GpgmeDataMode): Type removed.
* decrypt.c (_gpgme_decrypt_start): Don't check data type or mode.
* edit.c (_gpgme_op_edit_start): Likewise.
* encrypt.c (_gpgme_op_encrypt_start): Likewise.
* encrypt-sign.c (_gpgme_op_encrypt_sign_start): Likewise.
* encrypt-sign.c (_gpgme_op_encrypt_sign_start): Likewise.
* export.c (_gpgme_op_export_start): Likewise.
* genkey.c (_gpgme_op_genkey_start): Likewise.
* import.c (_gpgme_op_import_start): Likewise.
* sign.c (_gpgme_op_sign_start): Likewise.
* verify.c (_gpgme_op_verify_start): Likewise.
* encrypt.c (gpgme_op_encrypt): Remove hack that returns invalid
no recipient if no data was returned.
* encrypt-sign.c (gpgme_op_encrypt_sign): Remove hack that returns
no recipient if no data was returned.
* encrypt-sign.c (gpgme_op_encrypt_sign): Remove hack that returns
no recipient if no data was returned.
* engine.c (_gpgme_engine_op_verify): Add new argument to
differentiate detached from normal signatures.
* engine.h (_gpgme_engine_op_verify): Likewise for prototype.
* engine-gpgsm.c (_gpgme_gpgsm_op_verify): Likewise. Don't check
mode of data argument.
* engine-gpgsm.h (_gpgme_gpgsm_op_verify): Likewise for prototype.
* gpgme.h (gpgme_op_verify_start): Likewise for prototype.
(gpgme_op_verify): Likewise for prototype.
* rungpg.c (_gpgme_gpg_op_verify): Likewise.
* rungpg.h (_gpgme_gpg_op_verify): Likewise for prototype.
* verify.c (_gpgme_op_verify_start): Likewise.
(gpgme_op_verify_start): Likewise.
(gpgme_op_verify): Likewise.
* rungpg.c (struct arg_and_data_s): New member INBOUND to hold
direction of data object.
(_gpgme_gpg_add_data): Add new argument INBOUND. Use it to
determine direction of data object.
(_gpgme_gpg_add_pm_data, _gpgme_gpg_set_command_handler,
_gpgme_gpg_op_decrypt, _gpgme_gpg_op_edit, _gpgme_gpg_op_encrypt,
_gpgme_gpg_op_encrypt_sign, _gpgme_gpg_op_export,
_gpgme_gpg_op_genkey, _gpgme_gpg_op_import, _gpgme_gpg_op_sign,
_gpgme_gpg_op_verify): Add new argument to _gpgme_gpg_add_data
invocation.
(build_argv): Use new member INBOUND to determine direction of
file descriptor. Don't check the data type.
* rungpg.h (_gpgme_gpg_add_data): Add new argument to prototype.
* gpgme.c (gpgme_get_op_info): Don't call
_gpgme_data_get_as_string if CTX->op_info is NULL.
* version.c (gpgme_check_engine): Function removed.
tests/
2002-10-09 Marcus Brinkmann <marcus@g10code.de>
* gpg/t-decrypt.c (print_data): Update to new gpgme_data_read
interface, and use gpgme_engine_check_version instead
gpgme_check_version.
* gpg/t-decrypt-verify.c (print_data): Likewise.
* gpg/t-edit.c (main): Likewise.
* gpg/t-encrypt.c (print_data): Likewise.
* gpg/t-encrypt-sign.c (print_data): Likewise.
* gpg/t-encrypt-sym.c (print_data): Likewise.
* gpg/t-eventloop.c (print_data): Likewise.
* gpg/t-export.c (print_data): Likewise.
* gpg/t-sign.c (print_data): Likewise.
* gpg/t-signers.c (print_data): Likewise.
* gpgsm/t-decrypt.c (print_data): Likewise.
* gpgsm/t-encrypt.c (print_data): Likewise.
* gpgsm/t-export.c (print_data): Likewise.
* gpgsm/t-sign.c (print_data): Likewise.
* gpg/t-verify.c (main): Likewise for gpgme_op_verify.
* gpgsm/t-verify.c (main): Likewise for gpgme_op_verify.
* t-data.c (read_once_test): Likewise.
(write_test): Update for new behaviour of data objects.
(main): Remove type test.
2001-11-02 Marcus Brinkmann <marcus@g10code.de>
* rungpg.c (pipemode_copy): Change type of NBYTES to size_t.
* key.c: Include string.h.
* data.c: Likewise.
* recipient.c: Likewise.
tests/
2001-11-02 Marcus Brinkmann <marcus@g10code.de>
* t-data.c: Include stddef.h.
(read_once_test): Change type of READ to size_t.
(read_test): Likewise.
(write_test): Likewise.