Commit Graph

1973 Commits

Author SHA1 Message Date
Marcus Brinkmann
0913218bcc gpgme/
2001-12-14  Marcus Brinkmann  <marcus@g10code.de>

	* engine-gpgsm.c (struct gpgsm_object_s): New member colon.attic.
	(_gpgme_gpgsm_new): Initialize some more members.
	(_gpgme_gpgsm_release): Free the colon line handler's attic line.
	(gpgsm_status_handler): Rework the inline-data processing.

tests/
2001-12-14  Marcus Brinkmann  <marcus@g10code.de>

	* gpgsm/t-keylist.c: New file.
	* gpgsm/Makefile.am (TESTS): Add t-keylist.
2001-12-14 00:49:38 +00:00
Marcus Brinkmann
0c05b3d8bd Revert last change. 2001-12-14 00:29:29 +00:00
Marcus Brinkmann
341835864e 2001-12-14 Marcus Brinkmann <marcus@g10code.de>
* assuan-defs.h (LINELENGTH): Define as ASSUAN_LINELENGTH.
	assuan.h: Define ASSUAN_LINELENGTH.
2001-12-13 23:12:37 +00:00
Marcus Brinkmann
f2232e8bc2 2001-12-13 Marcus Brinkmann <marcus@g10code.de>
* rungpg.c (_gpgme_gpg_spawn): Do not add the fds to the child
	list that are not dup'ed, for those the close-on-exec flag is set
	now.
	* version.c (_gpgme_get_program_version): Remove first entry in
	CFD, as the close-on-exec flag is now set for this fd.
2001-12-13 22:36:03 +00:00
Marcus Brinkmann
77a72c0d5e 2001-12-13 Marcus Brinkmann <marcus@g10code.de>
* engine-gpgsm.c (_gpgme_gpgsm_op_encrypt): Do not add `armor'
	option to `ENCRYPT'.
	* engine-gpgsm.c (gpgsm_set_recipients): Free LINE when returning
	successfully.
2001-12-13 22:12:06 +00:00
Marcus Brinkmann
4a55249ee6 2001-12-13 Marcus Brinkmann <marcus@g10code.de>
* engine-gpgsm.c (close_notify_handler): New function.
	(_gpgme_gpgsm_new): Manage the file descriptors a
	bit differently.  Do not set close-on-exec flags.
	(_gpgme_gpgsm_op_decrypt): Do not set message_fd
	to -1, this is done by the close handler.
	(_gpgme_gpgsm_op_encrypt): Likewise.
	(_gpgme_gpgsm_op_import): Likewise (also for output_fd).
	(_gpgme_gpgsm_op_keylist): Likewise (also for input_fd and output_fd).
	(_gpgme_gpgsm_op_sign): Likewise.
	(_gpgme_gpgsm_op_verify): Likewise, but for output_fd.

	* posix-io.c (_gpgme_io_pipe): Set the close-on-exec flag for the
	non-inherited file descriptor index of the pipe.
2001-12-13 22:02:08 +00:00
Marcus Brinkmann
831692ebf7 2001-12-13 Marcus Brinkmann <marcus@g10code.de>
* gpgsm/cert_dfn_pca01.der: New file.
	* gpgsm/cert_dfn_pca15.der: Likewise.
	* gpgsm/cert_g10code_test1.der: Likewise.
	* gpgsm/t-import.c: Likewise.
	* gpgsm/Makefile.am (EXTRADIST): Add new files.
	(TESTS): Add t-import.
2001-12-13 21:51:30 +00:00
Marcus Brinkmann
0dba5161e2 2001-12-13 Marcus Brinkmann <marcus@gnu.org>
* assuan-connect.c (assuan_pipe_connect): Remove code that closes
	all the little file descriptors we set up.
2001-12-13 21:38:11 +00:00
Marcus Brinkmann
05394e788e 2001-12-13 Marcus Brinkmann <marcus@gnu.org>
* assuan-buffer.c (assuan_read_line): Fix order of execution to
	get correct return values.
2001-12-13 20:13:34 +00:00
Werner Koch
3634edf055 * engine-gpgsm.c (_gpgme_gpgsm_set_colon_line_handler): New.
(gpgsm_status_handler): Pass datalines to a colon handler
* engine.c (_gpgme_engine_set_colon_line_handler): Set the colon
handler for gpgsm.

* engine-gpgsm.c (_gpgme_gpgsm_op_keylist): Allow NULL for
pattern.
(gpgsm_assuan_simple_command): Removed underscore from
assuan_write_line.
(_gpgme_gpgsm_start): Ditto.
(gpgsm_assuan_simple_command): Replaced interal Assuan read
function by the new assuan_read_line.  Removed the use of the
internal header.
(gpgsm_status_handler): Ditto. Use the new assuan_pending_line.
(_gpgme_gpgsm_start): Use the documented way to get an fd from
assuan.
2001-12-13 17:37:18 +00:00
Werner Koch
b41d06c0a1 * assuan-handler.c (assuan_get_active_fds): Fixed silly bug,
pretty obvious that nobody ever tested this function.
2001-12-13 17:37:04 +00:00
Karl-Heinz Zimmer
cfcac3496a improce memory handling 2001-12-13 15:13:09 +00:00
Werner Koch
9f84291722 .cvsigore updated - I still not tyhing they should go innto the cvs 2001-12-13 15:07:59 +00:00
Werner Koch
4922297af1 Set protocol to CMS to test gpgsm 2001-12-13 15:06:56 +00:00
Werner Koch
0b11af59c7 * engine-gpgsm.c (_gpgme_gpgsm_op_keylist): Allow NULL for
pattern.
(gpgsm_assuan_simple_command): Removed underscore from
assuan_write_line.
(_gpgme_gpgsm_start): Ditto.
* keylist.c (keylist_colon_handler): Handle "crt" records
* key.h (gpgme_key_s): Add an x509 flag.
* key.c (parse_x509_user_id): New.
(_gpgme_key_append_name): Handle x.509 names.

However, it does not yet work.
2001-12-13 15:05:35 +00:00
Werner Koch
3de2384ea5 Updated Assuan to the current version 2001-12-13 15:04:36 +00:00
Werner Koch
70720764e1 *** empty log message *** 2001-12-13 13:24:33 +00:00
Karl-Heinz Zimmer
bc11308fa3 Corrected (for a second time) code status error from previous wrong CVS comits 2001-12-06 17:19:07 +00:00
Karl-Heinz Zimmer
08debc7ab2 Corrected code status error from previous wrong CVS comits 2001-12-06 16:59:09 +00:00
Marcus Brinkmann
8cd3d96f2d 2001-12-05 Marcus Brinkmann <marcus@g10code.de>
* engine-gpgsm.c (gpgsm_status_handler): Make it work with current
	version of assuan.
2001-12-05 20:38:50 +00:00
Marcus Brinkmann
62d0374e72 2001-12-05 Marcus Brinkmann <marcus@g10code.de>
* engine-gpgsm.c (gpgsm_set_fd): Accept one more argument OPT.
	(_gpgme_gpgsm_op_encrypt): Pass armor argument to gpgsm_set_fd for
	output descriptor.
	(_gpgme_gpgsm_op_sign): Likewise.
2001-12-05 20:37:37 +00:00
Marcus Brinkmann
ba1e19e10b Add .cvsignore files. Suggested by Jan-Oliver Wagner <jan@intevation.de>. 2001-12-05 19:50:45 +00:00
Marcus Brinkmann
e9ece11e83 2001-12-05 Marcus Brinkmann <marcus@g10code.de>
* keylist.c (gpgme_op_keylist_next): Set pending to 0 if EOF
	occurs.
2001-12-05 13:23:59 +00:00
Marcus Brinkmann
e0da4fbd31 2001-11-29 Marcus Brinkmann <marcus@g10code.de>
* gpgmeplug.c (checkMessageSignature): Add call to gpgme_set_protocol.
2001-12-05 13:21:04 +00:00
Karl-Heinz Zimmer
ee33d9f146 added error detection to signing and encrypting methodes: this has to be improved furtheron 2001-11-29 12:29:55 +00:00
Matthias Kalle Dalheimer
4dcc18b102 Check for out-of-memory in signature verification 2001-11-26 16:43:00 +00:00
Karl-Heinz Zimmer
86490c114b enabled fetching meta data after checking of signature(s) 2001-11-26 15:54:12 +00:00
Marcus Brinkmann
a8c76a0f83 2001-11-26 Marcus Brinkmann <marcus@g10code.de>
* engine-gpgsm.c (_gpgme_gpgsm_op_sign): Fix stupid typo.
2001-11-23  Marcus Brinkmann  <marcus@g10code.de>
2001-11-26 11:41:17 +00:00
Matthias Kalle Dalheimer
a0f861940e Filling the SignatureMetaData struct (the crucial code is #ifdef'd out for safety's sake)
Changes to SignatureMetaData
Added SignatureMetaDataExtendedInfo
2001-11-25 21:53:39 +00:00
Karl-Heinz Zimmer
aa51d5af33 changed specification of SignatureMetaData struct 2001-11-25 20:31:36 +00:00
Karl-Heinz Zimmer
9e24b66475 [Kalle] signature verification and decoding of encrypted mails 2001-11-25 15:23:21 +00:00
Karl-Heinz Zimmer
14aa91a95b Now gpgmeplug.c can also create encrypted and signed+encrypted S/MIME mails. 2001-11-25 05:07:44 +00:00
Karl-Heinz Zimmer
49b7969a49 adjusted 'encryptMessage' parameters: now also the addressee is given 2001-11-25 03:37:13 +00:00
Werner Koch
4e56c2dddd Guess what. 2001-11-24 21:27:22 +00:00
Werner Koch
dc8410cbcf Updated from canonical source location in GnuPG. 2001-11-24 21:22:18 +00:00
Marcus Brinkmann
a22eef99a2 2001-11-24 Marcus Brinkmann <marcus@g10code.de>
* engine-gpgsm.c (gpgsm_status_handler): Don't break if bsearch fails.
	Deal with assuan read line returning more than one line (for now).
2001-11-24 19:31:26 +00:00
Marcus Brinkmann
46bb2a4470 2001-11-24 Marcus Brinkmann <marcus@g10code.de>
* Makefile.am (libgpgsmplug_la_SOURCES): Fix source file.
2001-11-24 17:11:15 +00:00
Karl-Heinz Zimmer
83855db196 signing now returns only the SIGNATURE - not the original text - since building of the S/MIME object is done in the calling program (the MUA...) 2001-11-24 10:51:55 +00:00
Marcus Brinkmann
8c3726d634 2001-11-23 Marcus Brinkmann <marcus@g10code.de>
* engine-gpgsm.c (_gpgme_gpgsm_op_sign): Implement it according to
	the current protocol definition.
2001-11-23 11:52:09 +00:00
Karl-Heinz Zimmer
64da5fc845 signing of mail bodies is working now - buuuuut: I changed the behaviour of the 'signMessage()' function, it now returns *only* the signature part (with a trailing zero). This is neccessary to avoid confugion at the KMail side: otherwise KMail might try to convert the whole MIME block into quoted printable - of course this is only allowed for the body part but not for the signature part. 2001-11-23 02:08:53 +00:00
Marcus Brinkmann
09b1be8339 Explain more of the build system. 2001-11-23 01:12:04 +00:00
Marcus Brinkmann
662f9b185b 2001-11-23 Marcus Brinkmann <marcus@g10code.de>
* engine-gpgsm.c (_gpgme_gpgsm_new): Set CLOEXEC flag for parent
	ends of the pipe.
2001-11-23 00:48:51 +00:00
Marcus Brinkmann
d1ded512c4 2001-11-22 Marcus Brinkmann <marcus@g10code.de>
* engine-gpgsm.c: Include stdlib.h and string.h.  Also include,
	for now, rungpg.h and status-table.h.
	(gpgsm_status_handler): Implement more of the status handler.
2001-11-22 21:27:41 +00:00
Marcus Brinkmann
884de0606b 2001-11-22 Marcus Brinkmann <marcus@g10code.de>
* engine.c (_gpgme_engine_op_decrypt): Implement CMS case.
	(_gpgme_engine_op_delete): Likewise.
	(_gpgme_engine_op_encrypt): Likewise.
	(_gpgme_engine_op_export): Likewise.
	(_gpgme_engine_op_genkey): Likewise.
	(_gpgme_engine_op_keylist): Likewise.
	(_gpgme_engine_op_sign): Likewise.
	(_gpgme_engine_op_trustlist): Likewise.

	* engine-gpgsm.c (_gpgme_gpgsm_op_encrypt): New function.
	(gpgsm_assuan_simple_command): Likewise.
	(gpgsm_set_recipients): Likewise.
	(gpgsm_set_fd): Reimplement using gpgsm_assuan_simple_command.
	(_gpgme_gpgsm_op_delete): New function.
	(_gpgme_gpgsm_op_export): Likewise.
	(_gpgme_gpgsm_op_genkey): Likewise.
	(_gpgme_gpgsm_op_sign): Likewise.
	(_gpgme_gpgsm_op_keylist): Likewise.
	(_gpgme_gpgsm_op_trustlist): Likewise.
	(_gpgme_gpgsm_release): Release command.
	(_gpgme_gpgsm_op_decrypt): Allocate command.
	(_gpgme_gpgsm_op_import): Likewise.
	(gpgsm_status_handler): Also treat `ERR' strings as EOF.
2001-11-22 20:48:37 +00:00
Marcus Brinkmann
8993173dfb 2001-11-22 Marcus Brinkmann <marcus@g10code.de>
* gpgme.h (gpgme_set_protocol): New prototype.

2001-11-22  Marcus Brinkmann  <marcus@g10code.de>

	* Makefile.am (libgpgsmplug_la_LIBADD): New variable.
	(libgpgsmplug_la_LDFLAGS): Likewise.
	(libgpgsmplug_la_SOURCES): Likewise.
	(lib_LTLIBRARIES): Add libgpgsmplug.la.
	(INCLUDES): Include the local gpgme.h.

	* gpgmeplug.c (signMessage): Set protocol.
	(GPGMEPLUG_PROTOCOL) [!GPGMEPLUG_PROTOCOL]: Set
	GPGMEPLUG_PROTOCOL.
	* gpgsmplug.c: New file.
2001-11-22 18:48:53 +00:00
Karl-Heinz Zimmer
c703e0c27e removed stupid C bug (malloc of strlen(..) instead of 1+strlen) 2001-11-22 17:32:21 +00:00
Marcus Brinkmann
6290f74605 2001-11-22 Marcus Brinkmann <marcus@g10code.de>
* engine-gpgsm.c (_gpgme_gpgsm_op_decrypt): New function.
	(_gpgme_gpgsm_op_import): Likewise.
2001-11-22 15:22:27 +00:00
Marcus Brinkmann
c23a9b5e74 2001-11-22 Marcus Brinkmann <marcus@gnu.org>
* engine-gpgsm.c: Shuffle around header inclusion a bit, to still
	keep them seperate.
	(_gpgme_set_status_handler) [!ENABLE_GPGSM]: New function.
2001-11-22 13:47:46 +00:00
Werner Koch
9ece643cba * engine-gpgsm.c: Include more headers so that NULL and mk_error
is defined even with an undefined GPGSM_PATH.
2001-11-22 10:29:52 +00:00
Karl-Heinz Zimmer
66f4b09b45 Now send the signature back to the calling function (instead of just printing it to stdout) 2001-11-22 09:36:53 +00:00