interface

Werner Koch wk at gnupg.org
Fri Feb 25 16:08:25 CET 2000


On Fri, 25 Feb 2000, Nikos Mavroyanopoulos wrote:

> GNUTLS_STATE *state=malloc(SIZEOF_GNUTLS_STATE);

There is not need, that SIZEOF_GNUTLS_STATE is know for users of
gnutls.  Better initialize the state with an init function:

> gnutls_init(state, GNUTLS_SERVER);
> /* or in case of a client: gnutls_init(state, GNUTLS_CLIENT); */

int gnutls_init( *ret_state, GNUTLS_SERVER );

> free(state);

gnutls_deinit(state)

> gnutl_send/receive() will process messages of all types (alert,
> change_cipher_spec, handshake, application_data). So gnutls_handshake
> will be able to use these functions internally.

That looks easy.  However, I don't know much about TLS. 


   Werner



More information about the Gnutls-devel mailing list