2002-11-15  Timo Schulz  <twoaday@freakmail.de>

	* write-packet.c (write_mpi_array): New.
	* read-packet.c: Check minimal packet size for packets
	where it makes sense.
	* encrypted.c (handle_pubkey_enc): Make bits of key
	congruent modulo 8.
	* armor (update_crc): Make sure it's just 24 bit.
	* Cleanups for the release.
	
2002-11-14  Timo Schulz  <twoaday@freakmail.de>

	* main.h (wipemem): From GPG.
	* Try to wipe out all buffers with sentensive data.
	* misc.c (cdk_utf8_encode): New.
	(cdk_utf8_decode): New.
	
2002-11-14  Timo Schulz  <twoaday@freakmail.de>

	* read-packet.c (read_secret_key): Do not pre-alloc MPI
	structs for encrypted v4 keys. This costs too much secmem.
	Do it here...
	* pubkey.c (cdk_seckey_unprotect): ...instead. And with
	the correct size of the MPI.
	(cdk_pk_decrypt): Check that the seckey is really unprotected.
	(cdk_pk_sign): Likewise.
	* main.c (cdk_handle_set_callback): New.
	* encrypt.c (write_status): New.
	* keylist.c (cdk_pklist_encrypt): I forgot a calloc.
	* sign.c (cdk_file_sign): Avoid problems with streams.
	(cdk_file_sign_cleartext): Ditto.
	
2002-11-14  Timo Schulz  <twoaday@freakmail.de>

	* sig-check.c (_cdk_hash_pubkey): Now we use two different
	modes for v3 keys. One for the fingerprint and one for the
	signature calculation.
	* encrypt.c (handle_encrypted): Error if there is no valid DEK.
	* main.c (cdk_salloc): Increase the size of the secmem due to
	the possibility there are more secret keys.
	
2002-11-13  Timo Schulz  <twoaday@freakmail.de>

	* stream.c (stream_fp_replace): New.
	(stream_filter_walk_write): Use it here.
	(stream_filter_walk_read): Likewise.
	* keyserver.c (init_sockets): For non-POSIX systems.
	* read-packet.c (read_public_key): Corrected v3 key reading.
	* encrypt (cdk_stream_encrypt): Adjust the key length if needed.
	* pubkey.c (checksum_mpi): Forgot to check the last 2 octets.
	* keylist.c (cdk_sklist_build): Unprotect secret keys.
	* new-packet.c (_cdk_copy_seckey): Copy all elements.
	* main.h: Remove unused prototypes.
	* kbnode.c (_cdk_kbnode_clone): Modified for internal use.
	
2002-11-13  Timo Schulz  <twoaday@freakmail.de>

	* keydb.c (keydb_check_key): New.
	(keydb_find_byusage): Do not use revoked or expired keys.
	(keydb_set_expire): Corrected.
	* armor.c (armor_encode): Corrected CRC calculation.
	
2002-11-12  Timo Schulz  <twoaday@freakmail.de>

	* stream.c (cdk_stream_append): New.
	* keydb.c (cdk_keydb_import): Use append to make it easier.
	No key update is possible yet. Add a integer array as the result.
        * main.c (cdk_handle_set_compat): Set some other compatibility
	options.
	* read-packet.c (read_encrypted): Corrected reading for partial
	packet length.
	* compress.c (compress_decode): Set the inbuf pointer each
	call and not only once. This fixes a problem with larger files.
	(decompress_data): Some fixes.
	* seskey.c (passphrase_prompt): New.
	(cdk_passphrase_to_dek): Use it here.
	
2002-11-12  Timo Schulz  <twoaday@freakmail.de>

	* stream.c (cdk_stream_tmp_set_mode): For the filters the object
	needs to know if the request read or write filters. With this
	function we can set it.
	* keyserver.c (keyserver_handle_hkp): Use it here.
	* verify (cdk_file_verify_cleartext): Ditto.
	* sign (cdk_file_clearsign): Ditto.
	* main.c (cdk_handle_set_compat): New.
	* keylist.c (cdk_sklist_write): Support for signature version.
	* sign.c (cdk_file_sign): Ditto.
	(cdk_file_sign_cleartext): Ditto.
	* encrypt.c (write_marker_packet): New.
	(sym_stream_encrypt): Write a marker packet when in compat mode.
	(cdk_file_encrypt): Ditto.
	
2002-11-11  Timo Schulz  <twoaday@freakmail.de>

	* kbnode.c (cdk_kbnode_read_from_mem): New.
	(cdk_kbnode_write_to_mem): New.
	
2002-11-11  Timo Schulz  <twoaday@freakmail.de>

	* new-packet.c (free_symkey_enc): Free the S2K struct.
	(_cdk_free_seckey): Ditto.
	* read-packet.c (read_s2k): Alloc S2K struct.
	* write-packet.c (write_symkey_enc): Ditto.
	(write_secret_key): Ditto.
	* S2K struct is now opaque.
	* seskey.c (cdk_s2k_new): New.
	
2002-11-10  Timo Schulz  <twoaday@freakmail.de>

	* encrypt.c (cdk_file_encrypt): Use armor if requested.
	* sign.c (cdk_file_sign): Ditto for the encrypt & sign mode.
	(clearsign_filter): Removed. Now the STREAMS support encoding
	for read and write (temp) modes.
	* Check for header files when the target platform is not Posix.
	* stream.c (cdk_stream_flush): Premature filter flushing.	
	
2002-11-10  Timo Schulz  <twoaday@freakmail.de>

	* sign.c (cdk_file_sign_encrypt): Removed.
	(write_pubkey_enc_list): New.
	(cdk_file_sign): Merge encryption here.
	Check for invalid combinations.
	* opencdk.h (cdk_file_sign_encrypt): Bye bye.
	Now the file signing interface is complete but incompatible 
	to other versions :-(.
	
2002-11-10  Timo Schulz  <twoaday@freakmail.de>

	* misc.c (_cdk_timestamp): Renamed from make_timestamp.
	* opencdk.h (cdk_file_sign): New.
	(cdk_file_encrypt_sign): New.
	* keydb.c (cdk_keydb_get_sk_byname): Find a secret keyring,
	not a public keyring.
	* sign.c (cdk_file_sign): Fixed the index for the opaque value.
	* write-packet (write_onepass_sig): Fixed base size 15 -> 13.	
	
2002-11-09  Timo Schulz  <twoaday@freakmail.de>

	* encrypt.c (cdk_stream_encrypt): New.
	(cdk_file_decrypt): Remove unused var.	
	
2002-11-08  Timo Schulz  <twoaday@freakmail.de>

	* encrypt.c (cdk_stream_encrypt): New.
	(cdk_file_encrypt): Use the new code.
	(sym_stream_encrypt): New.       
	
2002-11-05  Timo Schulz  <twoaday@freakmail.de>

	* keydb.c (cdk_keydb_import): New.
	
2002-11-04  Timo Schulz  <twoaday@freakmail.de>

	* kbnode.c (cdk_kbnode_find_packet): Return the node that was
	found, not the root node.
	* keyserver.c (keyserver_handle_hkp): Add '\r\n' to the request.
	
2002-11-03  Timo Schulz  <twoaday@freakmail.de>

	* write-packet.c (write_public_key): Flag if we have a subkey.
	* read-packet.c (read_signature): Set the exportable flag
	independent of the signature version. And correct return code
	checking.
	
2002-11-02  Timo Schulz  <twoaday@freakmail.de>

	* plaintext.c (text_encode): New.
	(text_decode): New.
	* stream.c (cdk_stream_set_text_flag): New.
	
2002-11-02  Timo Schulz  <twoaday@freakmail.de>

	* seskey.c (cdk_passphrase_to_dek): Moved from seckey.c.
	* pubkey.c (cdk_seckey_unprotect): Moved from seckey.c
	(checksum_mpi): Ditto.
	* seckey.c: Deleted.
	* encrypt.c (handle_symkey_enc): For the case we've multiple of 
	these packages, ignore the next when we already have a valid DEK.
	
2002-11-01  Timo Schulz  <twoaday@freakmail.de>

	* new-packet.c (cdk_subpkt_get_buf): New.
	* keydb.c (cdk_keydb_search_new): New.
	(cdk_keydb_search_free): New.
	* opencdk.h: CDK_DBSEARCH is now opaque.
	
2002-11-01  Timo Schulz  <twoaday@freakmail.de>

	* write-packet.c (pkt_write_head2): New.
	(write_compressed): Use old header.
	* This fixed the EOF problem for the filter.
	
2002-10-31  Timo Schulz  <twoaday@freakmail.de>

	* verify.c (cdk_verify_cleartext): Fixed md calculation.
	Add an output parameter to store the plaintext.
	* opencdk.h: Use the cdk_file_xxx prefix for all file functions.
	
2002-10-30  Timo Schulz  <twoaday@freakmail.de>

	* sig-check.c (hash_mpi_array): New.
	* plaintext.c (plaintext_decode): Sanity check to avoid segv.
	
2002-10-30  Timo Schulz  <twoaday@freakmail.de>

	* sign.c (cdk_clearsign_file): New.
	(trim_string): New.
	* keylist.c (cdk_sklist_build): Replaced all calloc calls
	with cdk_calloc. Arrg.
	* stream.c (_cdk_stream_gets): New.
	
2002-10-29  Timo Schulz  <twoaday@freakmail.de>

	* verify.c (cdk_verify_file): New.
	(cdk_verify_cleartext): New.
	(cdk_sig_get_ulong_attr): Support for all algorithms.
	* encrypt.c (proc_encryption_packets): New.
	(proc_signature_packets): New.
	
2002-10-29  Timo Schulz  <twoaday@freakmail.de>

	* encrypt.c: Add a context for each file operation.
	* main.c (cdk_handle_new): New.
	(cdk_handle_free): New.
	(cdk_handle_set_compress): New.
	(cdk_handle_set_digest): New.
	(cdk_handle_set_cipher): New.
	* verify.c (cdk_sig_get_ulong_attr): New.
	(cdk_sig_get_data_attr): New.
	(_cdk_result_verify_new): New.
	(_cdk_result_verify_free): New.	
	
2002-10-29  Timo Schulz  <twoaday@freakmail.de>

	* encrypt.c (do_proc_packets): Modified so it will not
	depend on a fixed state. Now it's possible for decryption,
	verifying with one pass signatures with or without compression.
	(set_reset): New.
	
2002-10-29  Timo Schulz  <twoaday@freakmail.de>

	* new-packet.c (_cdk_subpkt_hash): Now it's internal.
	* sig-check.c (_cdk_signature_check): Prefix with _cdk_.
	* encrypt.c (handle_onepass_sig, handle_signature): New.
	(do_proc_packets): Divide function in stages to handle
	nested packets.
	* stream.c (stream_filter_walk_write): Only unlink files
	when the temp flag is not set.
	
2002-10-28  Timo Schulz  <twoaday@freakmail.de>

	* stream.c (cdk_stream_seek): Remove EOF flag when possible.
	* keydb.c (cdk_keydb_new): New.
	* armor.c (cdk_armor_filter_use): Rewind the file after
	reading the first byte.
	
	
	