help-gnutls
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gnutls] GNU TLS inside a loop: what to do at each iteration?


From: Stephane Bortzmeyer
Subject: Re: [Help-gnutls] GNU TLS inside a loop: what to do at each iteration?
Date: Thu, 6 Nov 2003 10:31:26 +0100
User-agent: Mutt/1.5.4i

On Thu, Nov 06, 2003 at 11:12:20AM +0200,
 Nikos Mavroyanopoulos <address@hidden> wrote 
 a message of 34 lines which said:

> > I then tried:
> > gnutls_init(&session, GNU_TLS_CLIENT);
> > gnutls_transport_set_ptr (session, gnutls_transport_ptr) sockfd);
> > gnutls_handshake (session);
> > ... Work
> > gnutls_bye (channel.tls, GNUTLS_SHUT_RDWR);
> > gnutls_deinit (session); 
> > And it fails at the second iteration (ASN1 parser: Element was not
> > found. (Bad file descriptor).
> 
> You probably haven't called gnutls_global_init(). 

Of course I did. I just showed only the instructions that are
loop-specific but, at the beginning of the program, before starting
the loop, I have:

      gnutls_global_init ();
      gnutls_certificate_allocate_credentials (&xcred);

> In any case try reading the examples on how to properly initialize a
> TLS session.

No example on the Web site covers the case of a loop.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]