Initializing gcrypt in gnutls4win?

View: New views
3 Messages — Rating Filter:   Alert me  

Initializing gcrypt in gnutls4win?

by Jason Pettiss-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks to GnuTLS for Windows I was able to convert an existing application to use TLS in about 30 minutes.  Yay for that.  Everything works fine until I make two connections at the same time (from different threads), where gcrypt asserts on me, complaining of mutex state.

Does GnuTLS for Windows perform the gcry_control(GCRYCTL_SET_THREAD_CBS, ...) operation for me, or is that still my application's responsibility?  If I need to do that, anyone have any pointers on how to accomplish that?

Every time I think I've got the answer, I find I need to download and build yet another peripheral library, most of those of course not quite Windows-friendly.

Thanks for any tips,

Jason Pettiss
jpettiss@...


     


_______________________________________________
Help-gnutls mailing list
Help-gnutls@...
http://lists.gnu.org/mailman/listinfo/help-gnutls

Re: Initializing gcrypt in gnutls4win?

by Nikos Mavrogiannopoulos :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Jason Pettiss wrote:
> Thanks to GnuTLS for Windows I was able to convert an existing application to use TLS in about 30 minutes.  Yay for that.  Everything works fine until I make two connections at the same time (from different threads), where gcrypt asserts on me, complaining of mutex state.
>
> Does GnuTLS for Windows perform the gcry_control(GCRYCTL_SET_THREAD_CBS, ...) operation for me, or is that still my application's responsibility?  If I need to do that, anyone have any pointers on how to accomplish that?

I believe you have to set your own lock functions and call the
gcry_control.

regards,
Nikos



_______________________________________________
Help-gnutls mailing list
Help-gnutls@...
http://lists.gnu.org/mailman/listinfo/help-gnutls

Re: Initializing gcrypt in gnutls4win?

by Simon Josefsson-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Jason Pettiss <jpettiss@...> writes:

> Thanks to GnuTLS for Windows I was able to convert an existing application to use TLS in about 30 minutes.  Yay for that.  Everything works fine until I make two connections at the same time (from different threads), where gcrypt asserts on me, complaining of mutex state.
>
> Does GnuTLS for Windows perform the gcry_control(GCRYCTL_SET_THREAD_CBS, ...) operation for me,

No.  It doesn't under Unix either.

> or is that still my application's responsibility?

Yes.

> If I need to do that, anyone have any pointers on how to accomplish
> that?

Try asking on libgcrypt's mailing list, it seems to be a general
question for all applications using libgcrypt on Windows.  I don't know
the answer...

> Every time I think I've got the answer, I find I need to download and
> build yet another peripheral library, most of those of course not
> quite Windows-friendly.

I know the feeling. :-(

/Simon


_______________________________________________
Help-gnutls mailing list
Help-gnutls@...
http://lists.gnu.org/mailman/listinfo/help-gnutls