cvs

Nikos Mavroyanopoulos nmav@hellug.gr
Wed, 8 Mar 2000 13:12:02 +0200


A description of the existing code:
gnutls.h: There are all the declarations mentioned in the rfc (at least
          the needed ones, for receiving-sending).
gnutls_plaintext.c: converts data to a gnutls_plaintext packet
gnutls_compress.c: converts a gnutls_plaintext packet to a gnutls_compressed one
gnutls_cipher.c: converts a gnutls_compressed packet to a gnutls_ciphertext one
test.c: opens a file descriptor (ciphertext file) and uses gnutls_send to
	write data.
gnutls.c: contains the initialization functions the PRF and gnutls_send/recv
	the recv is not ready yet.

to convert data to a gnutls_ciphertext packet i do the following:

_gnutls_text2TLSPlaintext(type, &gtxt, data, Size); /* data -> plaintext packet */
_gnutls_TLSPlaintext2TLSCompressed(state, &gcomp, gtxt); /* plaintext packet -> compressed */
_gnutls_freeTLSPlaintext(gtxt); /* destroys the plaintext packet */

_gnutls_TLSCompressed2TLSCiphertext( state, &gcipher, gcomp); /* compressed -> ciphertext */
_gnutls_freeTLSCompressed(gcomp); /* destroys the compressed packet */

This scheme may not be good. Do you have any other idea?


-- 
Nikos Mavroyanopoulos
mailto:nmav@hellug.gr