Re: [External] Re: SSL_connect() failing on SSL3_MT_NEWSESSION_TICKET on Raspberry Pi

2022-03-24 Thread Matt Caswell
On 23/03/2022 18:08, Helde, Paavo wrote: Great! That does suggest an unknown bug exists in master though... If you can manage it would be useful for us if you tried the latest master version of OpenSSL with the "no-asm" config option. My guess is new assembler code might be the cause of thi

RE: [External] Re: SSL_connect() failing on SSL3_MT_NEWSESSION_TICKET on Raspberry Pi

2022-03-23 Thread Helde, Paavo via openssl-users
> Great! That does suggest an unknown bug exists in master though... > >If you can manage it would be useful for us if you tried the latest master >version of OpenSSL with the "no-asm" config option. My guess is new assembler >code might be the cause of this. If turning off assembler resolves the

Re: [External] Re: SSL_connect() failing on SSL3_MT_NEWSESSION_TICKET on Raspberry Pi

2022-03-23 Thread Matt Caswell
On 23/03/2022 14:00, Helde, Paavo wrote: - I notice that you are using the latest master version 3.1.0-dev. The master branch is where all dev work goes on and consequently may be unstable. You might be better off using the latest 3.0 stable version, i.e. 3.0.2 Thanks Matt, downgrading to

RE: [External] Re: SSL_connect() failing on SSL3_MT_NEWSESSION_TICKET on Raspberry Pi

2022-03-23 Thread Helde, Paavo via openssl-users
> Some things you could try: > - Do you have an alternative compiler you could use? If its a compiler bug > then swapping to a different compiler might resolve it Compiler is regular gcc 10.2.1. > - I notice that you are using the latest master version 3.1.0-dev. The master > branch is where al

Re: [External] Re: SSL_connect() failing on SSL3_MT_NEWSESSION_TICKET on Raspberry Pi

2022-03-23 Thread Matt Caswell
On 23/03/2022 12:39, Helde, Paavo via openssl-users wrote: It would be interesting to see what output you get from s_client when you use the "-trace" argument. Also, is this TLSv1.3 specific? If you add the argument "-no_tls1_3" to s_client does it start working? Thanks for looking into th

RE: [External] Re: SSL_connect() failing on SSL3_MT_NEWSESSION_TICKET on Raspberry Pi

2022-03-23 Thread Helde, Paavo via openssl-users
3. märts 2022 13:55 To: Helde, Paavo ; openssl-users@openssl.org Subject: [External] Re: SSL_connect() failing on SSL3_MT_NEWSESSION_TICKET on Raspberry Pi Use caution when opening links or attachments. On 23/03/2022 07:39, Helde, Paavo via openssl-users wrote: > Hi, > > We are in a

Re: SSL_connect() failing on SSL3_MT_NEWSESSION_TICKET on Raspberry Pi

2022-03-23 Thread Matt Caswell
On 23/03/2022 07:39, Helde, Paavo via openssl-users wrote: Hi, We are in a process of porting our software to aarch64 (Raspberry Pi). One problem what we have is with openssl, it appears that our build of it always fails in SSL_connect(). I have debugged it a bit and it seems the problem

SSL_connect() failing on SSL3_MT_NEWSESSION_TICKET on Raspberry Pi

2022-03-23 Thread Helde, Paavo via openssl-users
Hi, We are in a process of porting our software to aarch64 (Raspberry Pi). One problem what we have is with openssl, it appears that our build of it always fails in SSL_connect(). I have debugged it a bit and it seems the problem appears in the function ossl_statem_client13_read_transition

SSL_Connect always returrns SSL_ERROR_WANT_READ/SSL_ERROR_WANT_WRITE and stuck in infinite loop

2022-03-20 Thread Amit Prajapati
Hi All, I am using below code for creating SSL connection over a non-blocking socket: - ssl_error = SSL_connect(ssl_ctxt); if (ssl_error <= 0) { ssl_error = SSL_get_error(ssl_ctxt, ssl_error); switch (ssl_er

OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to imap.gmail.com:993

2021-08-24 Thread Hongyi Zhao
(1): * OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to imap.gmail.com:993 * Closing connection 0 curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to imap.gmail.com:993 ``` While the other testing will succeed: ``` $ curl -vx socks5h://127.0.0.1:7891 --ssl imaps://imap.gmail

Re: SSL_connect with TLS 1.3 and client Certificates

2021-07-14 Thread Christian Schmidt
t;> application works so far - I can establish connections, certificates are >> verified, data is successfully transmitted, etc. >> >> However, I have an issue, or maybe two. >> >> 1. SSL_connect returns successfully before the client certificate is >> sent from th

Re: SSL_connect with TLS 1.3 and client Certificates

2021-07-14 Thread Matt Caswell
successfully transmitted, etc. However, I have an issue, or maybe two. 1. SSL_connect returns successfully before the client certificate is sent from the client to the server. The client certificate is only sent on the first SSL_write_ex with > 0 bytes, and as such, at this point the server

SSL_connect with TLS 1.3 and client Certificates

2021-07-13 Thread Christian Schmidt
issue, or maybe two. 1. SSL_connect returns successfully before the client certificate is sent from the client to the server. The client certificate is only sent on the first SSL_write_ex with > 0 bytes, and as such, at this point the server can generate SSL alerts like access denied, etc. 2. W

Re: SSL_ERROR_WANT_TIME: Pause SSL_connect to fetch intermediate certificates

2020-08-20 Thread Matt Caswell
On 19/08/2020 20:35, Alex Rousskov wrote: > Does this clarify what I meant? Do you agree that OpenSSL async API is > not suitable for callbacks that _require_ ASYNC_pause_job() to return > control to the application? Yes, it clarifies what you meant. And, yes, its true that strictly speaking th

Re: SSL_ERROR_WANT_TIME: Pause SSL_connect to fetch intermediate certificates

2020-08-19 Thread Alex Rousskov
on the application making progress (e.g., fetching the missing intermediate certificates or declaring a fetch failure before resuming SSL_connect()). This callback cannot work correctly without the application actually getting control. That is why the pausing call comments are different: MAY vs. M

Re: SSL_ERROR_WANT_TIME: Pause SSL_connect to fetch intermediate certificates

2020-08-19 Thread Matt Caswell
lback execution, fetch the intermediate certificates, > and then complete validation before happily returning to the > SSL_connect() caller. Life is easy when you can use threads or block > thousands of concurrent transactions! I suspect this is the way most people do it. > Wh

SSL_ERROR_WANT_TIME: Pause SSL_connect to fetch intermediate certificates

2020-08-18 Thread Alex Rousskov
Hello, TLDR: How can we pause the SSL_connect() progress and return to its caller after the origin certificate is fetched/decrypted, but before OpenSSL starts validating it (so that we can fetch the missing intermediate certificates without threads or blocking I/O)? ASYNC_pause_job() does not

RE: SSL_connect fails on systemd socket

2020-01-30 Thread Tiwari, Hari Sahaya
Hi Matt, I got it working through systemd. My server program needed some modifications to properly respond to SSL_connect. Thanks for your assistance. Regards, Hari. -Original Message- From: Matt Caswell [mailto:m...@openssl.org] Sent: Wednesday, January 29, 2020 11:14 PM To: Tiwari

Re: SSL_connect fails on systemd socket

2020-01-29 Thread Matt Caswell
On 29/01/2020 17:28, Tiwari, Hari Sahaya wrote: > Yes, client is also on same version 1.0.2 > In this case SSL handshake(SSL_connect & SSL_accept) is done through systemd > socket/service, which is failing. > Any references around it will be very helpful. What kind of BIO a

RE: SSL_connect fails on systemd socket

2020-01-29 Thread Tiwari, Hari Sahaya
Yes, client is also on same version 1.0.2 In this case SSL handshake(SSL_connect & SSL_accept) is done through systemd socket/service, which is failing. Any references around it will be very helpful. Regards, Hari. -Original Message- From: openssl-users [mailto:openssl-users-

Re: SSL_connect fails on systemd socket

2020-01-28 Thread Matt Caswell
.2 on the client? Matt > > Here client is able to do normal connect, post that SSL_connect fails. > >   > > This client server program works well outside of systemd. > >   > > Do I need to add some extra steps to get this working? > > Any help or reference would be appreciated. > >   > > Thanks & Regards, > >   > >   >

SSL_connect fails on systemd socket

2020-01-28 Thread Tiwari, Hari Sahaya
, client does the SSL_connect over same connection. (server will do SSL_accept) 4. After that it will be SSL_read & SSL_write. Once, I start the systemd socket I can see the systemd starts listening on port 2000. # systemctl start test_ssl.socket # netstat -an | grep 2000 tcp6 0

Re: Subject: SSL_connect returned=1 errno=0 state=error: dh key too small

2019-08-29 Thread Jakob Bohm via openssl-users
On 29/08/2019 17:05, Hubert Kario wrote: On Wednesday, 28 August 2019 23:20:49 CEST Marcelo Lauxen wrote: ... that server is willing to negotiate ECDHE_RSA ciphers, you'd be better off disabling ciphers that use DHE and RSA key exchange and using ECDHE_RSA instead of trying to make 1024 bit wor

Re: Subject: SSL_connect returned=1 errno=0 state=error: dh key too small

2019-08-29 Thread Salz, Rich via openssl-users
* I've another question, based on your suggestion Salz Rich, this config @SECLEVEL can be set per host/domain, or is it impossible? It totally depends on which webserver you are running and what it’s configuration allows. I’m not able to answer webserver config questions BTW.

Re: Subject: SSL_connect returned=1 errno=0 state=error: dh key too small

2019-08-29 Thread Marcelo Lauxen
Thank you guys for the answers! I've another question, based on your suggestion Salz Rich, this config @SECLEVEL can be set per host/domain, or is it impossible? On Thu, Aug 29, 2019 at 12:38 PM Salz, Rich wrote: > >- We haven't control of the server who are using DH key size of 1048 >b

Re: Subject: SSL_connect returned=1 errno=0 state=error: dh key too small

2019-08-29 Thread Hubert Kario
on we are > getting this error SSL_connect returned=1 errno=0 state=error: dh key too > small, it's because different DH key sizes? 🤔 > > We haven't control of the server who are using DH key size of 1048 bits. > > I've opened the same issue on httparty > https://g

Re: Subject: SSL_connect returned=1 errno=0 state=error: dh key too small

2019-08-29 Thread Salz, Rich
* We haven't control of the server who are using DH key size of 1048 bits. In order to work with this kind of server (terribly poor security characteristics), you need to add “@SECLEVEL=0” to your OpenSSL configuration.

Subject: SSL_connect returned=1 errno=0 state=error: dh key too small

2019-08-28 Thread Marcelo Lauxen
Our server runs with DH key size of 2048 bits and we are trying to make requests with httparty(https://github.com/jnunemaker/httparty) to a server that uses DH key size of 1024 bits, i want to now for what reason we are getting this error SSL_connect returned=1 errno=0 state=error: dh key too

Re: [openssl-users] SSL_connect returns SSL_ERROR_SYSCALL and errno == EWOULDBLOCK

2018-09-10 Thread Matt Caswell
On 10/09/18 09:05, Jahn, Gerhard wrote: > Ad:  The "correct" answer is that if you get SSL_ERROR_SYSCALL then the > connection has failed and you shouldn't use that connection any more. >   > This somehow contradicts the description of returncode <0 on SSL_conn

Re: [openssl-users] SSL_connect returns SSL_ERROR_SYSCALL and errno == EWOULDBLOCK

2018-09-10 Thread Jahn, Gerhard
Ad: The "correct" answer is that if you get SSL_ERROR_SYSCALL then the connection has failed and you shouldn't use that connection any more. This somehow contradicts the description of returncode <0 on SSL_connect which says that <0 The TLS/SSL handshake was not

[openssl-users] SSL_connect returns SSL_ERROR_SYSCALL and errno == EWOULDBLOCK

2018-09-07 Thread Jahn, Gerhard
Hi, We are using OpenSSl 1.0.2n in our server running on LINUX. We call SSL_connect() on async socket (after TCP connect completion) to establish a secure connection. According to DOC SSL_get_error(() has to be called if SSL_connect() returns <=0 We do not understand what to do if SSL_get_er

Re: [openssl-users] SSL_connect returns SSL_ERROR_SYSCALL and errno == EWOULDBLOCK

2018-09-07 Thread Matt Caswell
On 07/09/18 09:16, Jahn, Gerhard wrote: > Hi, >   > We are using OpenSSl 1.0.2n in our server running on LINUX. > We call SSL_connect() on async socket (after TCP connect completion) to > establish a secure connection. > According to DOC SSL_get_error(() has to be cal

Re: [openssl-users] API SSL_Connect fails and always returns SSL_ERROR_WANT_READ causes infinite loop in application

2017-11-21 Thread mahesh gs
> read. Dry event is never read from the lower layer that causes the > > SUB_STATE_ERROR and intern causes the SSL_Connect to loop in application. > > > > Current version of openssl we are using is 01.01.00g. > > > > We have tested and able to reproduce this issue with t

Re: [openssl-users] API SSL_Connect fails and always returns SSL_ERROR_WANT_READ causes infinite loop in application

2017-11-21 Thread Matt Caswell
ot; that is received from the server and waiting to be > read. Dry event is never read from the lower layer that causes the > SUB_STATE_ERROR and intern causes the SSL_Connect to loop in application. > > Current version of openssl we are using is 01.01.00g. > > We have tested and a

Re: [openssl-users] API SSL_Connect fails and always returns SSL_ERROR_WANT_READ causes infinite loop in application

2017-11-21 Thread mahesh gs
the message waiting in the lower layer is 15 which size is exactly the size of "Handshake Alert" that is received from the server and waiting to be read. Dry event is never read from the lower layer that causes the SUB_STATE_ERROR and intern causes the SSL_Connect to loop in application.

Re: [openssl-users] API SSL_Connect fails and always returns SSL_ERROR_WANT_READ causes infinite loop in application

2017-11-20 Thread mahesh gs
rs "read_state_machine" where alert is to be red.This causes SSL_Connect to be in infinite loop. Thanks, Mahesh G S On Fri, Nov 17, 2017 at 3:36 PM, Matt Caswell wrote: > > > On 17/11/17 06:42, mahesh gs wrote: > > Why > > does client respond with "Client key exc

Re: [openssl-users] API SSL_Connect fails and always returns SSL_ERROR_WANT_READ causes infinite loop in application

2017-11-17 Thread Matt Caswell
On 17/11/17 06:42, mahesh gs wrote: > Why > does client respond with "Client key exchange" even if the the handshake > failure alert is sent from server? The client will send its entire flight of messages before it attempts to read anything from the server. So, in this case, the ClientKeyExchan

Re: [openssl-users] API SSL_Connect fails and always returns SSL_ERROR_WANT_READ causes infinite loop in application

2017-11-16 Thread mahesh gs
34:43] 803F1700 Link-2 SSL File : ssl/statem/statem_srvr.c , Line number : 2882 , Linux Error Code 0 Logs on client side: [10/15/0117 10:34:43] 7DDE1700 Link-1 SSL_connect() fails to connect need to retry, returned error code 2 , retry ? true [10/15/0117 10:34:43] 7DDE1700

Re: [openssl-users] API SSL_Connect fails and always returns SSL_ERROR_WANT_READ causes infinite loop in application

2017-11-14 Thread Matt Caswell
On 14/11/17 10:44, mahesh gs wrote: > case SSL_ERROR_SYSCALL: > > if (EWOULDBLOCK == errno || EAGAIN == errno) > { >   /* Nothing to do, retry to connect again */ > } This doesn't look right. If SSL_connect() fails due to an NBIO event then you should get

Re: [openssl-users] API SSL_Connect fails and always returns SSL_ERROR_WANT_READ causes infinite loop in application

2017-11-14 Thread mahesh gs
Hi, As per the suggestion from openssl documentation whenever the SSL API returns SSL_ERROR_WANT_READ or SSL_ERROR_WANT_WRITE, The calling process then must repeat the call after taking appropriate action to satisfy the needs of SSL_connect(). I am copying the code bits here, do { /* Clear

Re: [openssl-users] API SSL_Connect fails and always returns SSL_ERROR_WANT_READ causes infinite loop in application

2017-11-14 Thread Graham Leggett
On 14 Nov 2017, at 12:00 PM, mahesh gs wrote: > We have application that provide DTLS security for SCTP connections. During > our testing we found that API "SSL_connect " fail and always returns > SSL_ERROR_WANT_READ which causes infinite loop in the application. Are yo

[openssl-users] API SSL_Connect fails and always returns SSL_ERROR_WANT_READ causes infinite loop in application

2017-11-14 Thread mahesh gs
Hi All, We have application that provide DTLS security for SCTP connections. During our testing we found that API "*SSL_connect* " fail and always returns SSL_ERROR_WANT_READ which causes infinite loop in the application. Scenario: 1) On Server side "Client Certificate Request

[openssl-users] Encryption/decryption using parameters obtained via handshake (SSL_accept/SSL_connect)

2016-01-15 Thread vgt
()); if(!SSL_CTX_use_certificate_file(context, certFile, SSL_FILETYPE_PEM)) ... if(SSL_CTX_use_PrivateKey_file(context, keyFile, SSL_FILETYPE_PEM)<0 ) ... ssl = SSL_new(context); SSL_set_fd(ssl,fd); /// fd is an open socket descriptor SSL_accept(ssl); // or SSL_connect(ssl); in client and then

Re: [openssl-users] [openssl.org #4060] AutoReply: a crash happened inside SSL_Connect function

2015-09-29 Thread Viktor Dukhovni
would not disable TLSv1 at this time, just SSLv2 and SSLv3. > While the above code didn't work. I couldn't reach the server. Though the > SSL_connect() didn't crash, it returned as: > > 17:49:12.939 [5499]- SSL_connect res : -1 And did you print the error stack? Loo

SSL_ERROR_WANT_READ on SSL_connect()

2014-08-12 Thread Shreyas Heranjal
Hi All, I have a DTLS implementation where I am trying to connect to a server using SSL_connect(). I am checking for the error codes using the SSL_get_error. My underlying BIO is non-blocking. Is there a way to figure out if the remote peer exists or not? As of now, I get SSL_ERROR_WANT_READ for

Re: SSL_Connect() invalid write

2014-06-05 Thread Brandon W Yuille
Please ignore. Turned out another library I was linking against had a function called MD5_Final and the linker was using this one instead of OpenSSL's. On 6/4/2014 4:12 PM, Brandon W Yuille wrote: Hi, I'm getting the following error when using SSL_Connect on a non-blocking so

SSL_Connect() invalid write

2014-06-05 Thread Brandon W. Yuille
Hi, I'm getting the following error when using SSL_Connect on a non-blocking socket. I've included some debug output that shows POLLOUT was set after the socket successfully connected. SSL_Connect then returns SSL_ERROR_WANT_READ, so the program waits for a POLLIN to be set at whic

RE: SSL_Connect return 0 with error 5

2014-02-27 Thread Dave Thompson
ow about socket error codes and you need to use FormatError (or look up manually). In some cases the openssl error queue, most easily displayed with ERR_print_errors[_fp], may contain additional information, but for SSL_connect in my experience usually not. From: owner-openssl-us...@ope

Re: SSL_Connect return 0 with error 5

2014-02-26 Thread Viktor Dukhovni
On Wed, Feb 26, 2014 at 04:52:11AM +, Afroz Jahan wrote: > We could not able to trace out where exactly the problem is as > SSL_connect() returned 0 with ErrorNo:5 > Error:error:0005:lib(0):func(0):DH lib $ perl -le 'print $!=5;' Input/output error The probl

SSL_Connect return 0 with error 5

2014-02-26 Thread Afroz Jahan
Hi, We could not able to trace out where exactly the problem is as SSL_connect() returned 0 with ErrorNo:5 Error:error:0005:lib(0):func(0):DH lib Thanks & Regards Afroz Jahan | Software Engineer EiQ Networks(r), Inc. | www.eiqnetworks.com<http://www.eiqnetworks.com/&

SNI and NPN timing in relation to SSL_accept(), SSL_connect()

2013-11-11 Thread Programmist Setevik
orming any of the SSL_read()/write(), as long as it makes sure to receive success from SSL_accept() or SSL_connect() beforehand ?

Re: SSL_connect blocks for almost 1 minute

2013-10-29 Thread bhavikchauhan
Dorin & others, Has this got resolved? we have been experiencing exactly the same behaviour in our Client Simulor. any clue why we only see for first connect only? however, we see varying blockage (from 3 to 40s) based on number of user simulated. Does it depend on client simulator's memory uti

SSL_Connect blocking for 25 sec for the first connection

2013-10-10 Thread Madupuvenkatesh Arun-PJH784
I have a situation where my application is trying to open 5000 SSL connections with server, one after another, I see the very first ssl connect is blocking nearly 25seconds and times out. (Interestingly this blocking time is in proportion to the number of connections im intending to open. For eg

SSL_connect failure if key size is less than 1024 bits in fips mode

2013-10-04 Thread Anil Kumar K K
Hi All, I am trying to find whether there is minimum key length restriction when operating SSL/TLS in fips mode. Documents say that if key length is < 1024 bits, fips 140-2 compliant openssl-fips-1.2p1 ssl library will not allow the SSL connection. I know that SSL_connect() should fail if t

Re: possible SSL_connect/accept bug?

2013-09-27 Thread Viktor Dukhovni
r you're connected. Only once the connection is complete, should you attempt to call SSL_connect(). -- Viktor. __ OpenSSL Project http://www.openssl.org User Support Mailing List

RE: possible SSL_connect/accept bug?

2013-09-27 Thread Roger Miller
y advice or debugging tips would be appreciated. > > Thanks, > Roger > Update on above: this was a client-side problem, and may be specific to Windows - the 'wrong version number' message from the server was a red herring. (Unfortunately, my application was sending

RE: possible SSL_connect/accept bug?

2013-09-26 Thread Roger Miller
> -Original Message- > From: bensonkwok...@air-watch.com [mailto:bensonkwok...@air-watch.com] > > I have a similar problem and have found a fix for it. Please see the > thread below to see if your problem is the same: > > http://www.mail-archive.com/openssl-dev@openssl.org/msg33010.html

Re: possible SSL_connect/accept bug?

2013-09-26 Thread bensonkwok...@air-watch.com
I have a similar problem and have found a fix for it. Please see the thread below to see if your problem is the same: http://www.mail-archive.com/openssl-dev@openssl.org/msg33010.html Benson Kwok Development Www.air-watch.com On 9/25/13 6:35 PM, "Roger Miller" wrote: >Using OpenSSL librari

possible SSL_connect/accept bug?

2013-09-25 Thread Roger Miller
Using OpenSSL libraries to provide basic encryption between client and server. Using non-blocking sockets, and client can connect to multiple servers. I have an intermittent issue where server reports 'SSL3_GET_RECORD:wrong version number' during client hello. I have added trace statements to the

Re: ssl_connect fails Windows Non-blocking

2013-06-11 Thread titonus
Hi Stephan, I didn't handle properly fd_write and fd_read events after ssl_accept returning WANT_READ or WANT_WRITE. So sometimes SSL handshake didn't complete succesfully. I use plain socket descriptors with some WSA functions for selecting events, instead of MFC-Windows AsyncSocket classes. -

Re: ssl_connect fails Windows Non-blocking

2013-06-11 Thread Stephan Menzel
Hi Titonus, would you care to share the solution? I am interested too. Cheers, Stephan On Tue, Jun 11, 2013 at 12:07 PM, titonus wrote: > Solved! > > > > -- > View this message in context: > http://openssl.6102.n7.nabble.com/ssl-connect-fails-Windows-Non-blocking-tp45348p45480.html > Sent fro

Re: ssl_connect fails Windows Non-blocking

2013-06-11 Thread titonus
Solved! -- View this message in context: http://openssl.6102.n7.nabble.com/ssl-connect-fails-Windows-Non-blocking-tp45348p45480.html Sent from the OpenSSL - User mailing list archive at Nabble.com. __ OpenSSL Project

Re: ssl_connect fails Windows Non-blocking

2013-06-07 Thread titonus
] ***ERROR: ssl_connect - error 5 - here it's the problem Server SSL log: [SSL_accept:before/accept initialization] [SSL_accept:SSLv3 read client hello A] [SSL_accept:SSLv3 write server hello A] [SSL_accept:SSLv3 write certificate A] [SSL_accept:SSLv3 write key exchange A] [SSL_accept:SSLv3 write s

ssl_connect fails Windows Non-blocking

2013-05-29 Thread titonus
OpenSSL latest version I use. This is the bad sequence, client and server are already connected at TCP level: Client --> ssl_connect returns WANT_READ, so I've wait for next select/WSAEventSelect --- SSLv2/v3 read server hello A Server --> ssl_accept returns WANT_READ, same wait ---

SSL_Connect sys call taking more time

2013-05-05 Thread Arjun SM
Hi all, I have a daemon where I am trying to retrieve the common name from the certificate during an HTTPS connection. What i am observing is that , SSL_Connect() function is taking more time to connect on some of the websites. I am trying on Mac OS X 10.8.3. Below is the code I have been using

RE: SSL_connect with pselect failing

2012-10-14 Thread Dave Thompson
>From: owner-openssl-us...@openssl.org On Behalf Of Derek Cole >Sent: Sunday, 14 October, 2012 17:36 >I am trying to use SSL_connect. I have bound a socket to my interface, >set up the context, and call SSL_connect(). This is returning a -1, >which I catch, and call SSL_get_

Re: SSL_connect with pselect failing

2012-10-14 Thread Derek Cole
Nevermind. I didn't realize that I did have the call in there for my socket connect() (which was in another part of the code for non-ssl connections...it is needed for both). I had though SSL_connect took care of that too. On Sun, Oct 14, 2012 at 5:35 PM, Derek Cole wrote: > Hello,

SSL_connect with pselect failing

2012-10-14 Thread Derek Cole
Hello, I am trying to use SSL_connect. I have bound a socket to my interface, set up the context, and call SSL_connect(). This is returning a -1, which I catch, and call SSL_get_error() to fall through a switch statement. It is retuning a SSL_ERROR_WANT_WRITE So I am trying to use pselect in a

[FWD] About SSL_connect error

2012-09-24 Thread Lutz Jaenicke
0.9.8d, when executing more than 2 threads at the same time, the following error sometimes appears: SSL_connect error, ip=192.168.1.xxx,err:error:0001:lib(0):func(0):reason(1) why? 2. But in OpenSSL OpenSSL1.0.1c, the error never happened.I want know the diference between the two version OpenSSL

SSL_connect() in 0.9.8h - memory leak, or user error?

2012-03-26 Thread Rogerborg
Ahoy the list. I'm seeing a memory leak using openssl 0.9.8h (0x0090808f 28 May 2008) on Solaris 5.10 from calling SSL_connect() and am trying to nail down the cause. I'm sure it's a PEBKAC error, but can't spot it. The leak was identified by watching the process me

Re: Deadlock - SSL_Connect()

2012-01-16 Thread Michael S. Zick
org > Sent: Monday, 16 January 2012, 16:21 > Subject: Re: Deadlock - SSL_Connect() > > > did you try making use of non blocking fd? it cannot deadlock in if you use > that. > > Thanks > --Gayathri > > > On Mon, Jan 16, 2012 at 10:17 AM, Nathan Smyth w

Re: Deadlock - SSL_Connect()

2012-01-16 Thread Gayathri Sundar
you should be setting the non blocking thing before the ssl connect is called, which is part of the SSL handshake. SSL_connect will internally do socket read/write, so if its blocking then it will not come out until the underlying operation is completed. setting it after the SSL connect is done

Re: Deadlock - SSL_Connect()

2012-01-16 Thread Nathan Smyth
me special considerations? From: Gayathri Sundar To: openssl-users@openssl.org Sent: Monday, 16 January 2012, 16:21 Subject: Re: Deadlock - SSL_Connect() did you try making use of non blocking fd? it cannot deadlock in if you use that. Thanks --Gayathri On M

Re: Deadlock - SSL_Connect()

2012-01-16 Thread Gayathri Sundar
did you try making use of non blocking fd? it cannot deadlock in if you use that. Thanks --Gayathri On Mon, Jan 16, 2012 at 10:17 AM, Nathan Smyth wrote: > Just seeking advice/things to consider for deadlock (or 'wait') on a > SSL_Connect(). Unfortunately it stalls here, so t

Deadlock - SSL_Connect()

2012-01-16 Thread Nathan Smyth
Just seeking advice/things to consider for deadlock (or 'wait') on a SSL_Connect(). Unfortunately it stalls here, so there's no return code. The project establishes a number of SSL conns between various application instances. It's in C++, where standard socket libs are u

observing a crash while doing ssl_connect on linux 5.5 platform

2012-01-02 Thread Patil, Minal
: = /lib/libc.so.6[0xb325a5] /lib/libc.so.6(cfree+0x59)[0xb329e9] /opt/bmc/common/bmc/bin/linux-2-4-x86-nptl/liboss_t.so.9(CRYPTO_free+0x2d)[0xf7ad7f7e] /lib/libssl.so.6(ssl3_connect+0x852)[0xf6ddda32] /lib/libssl.so.6(SSL_connect+0x2a)[0xf6defc0a] /lib/libssl.so.6(ssl23_connect+0xb01

observing a crash while doing ssl_connect

2011-12-27 Thread Patil, Minal
: = /lib/libc.so.6[0xb325a5] /lib/libc.so.6(cfree+0x59)[0xb329e9] /opt/bmc/common/bmc/bin/linux-2-4-x86-nptl/liboss_t.so.9(CRYPTO_free+0x2d)[0xf7ad7f7e] /lib/libssl.so.6(ssl3_connect+0x852)[0xf6ddda32] /lib/libssl.so.6(SSL_connect+0x2a)[0xf6defc0a] /lib/libssl.so.6(ssl23_connect+0xb01

RE: SSL_Connect call gives SSL_ERROR_WANT_READ for non blocking sockets

2011-11-23 Thread Steffen DETTMER
> Since I wait until the SSL_connect() function succeeds I > wanted to know if there is a better approach. Yes, there is a better approach, for example the one mentioned in the manual: * http://www.openssl.org/docs/ssl/SSL_connect.html > If the underlying BIO is non-blocking, SSL_conne

Re: SSL_Connect call gives SSL_ERROR_WANT_READ for non blocking sockets

2011-11-22 Thread Arjun SM
Ohh .. ok. But I just want the SSL_connect to succeed because I want to fetch the certificate of an HTTPS website. So after the success of SSL_connect() function, I would call SSL_get_peer_certificate(). Since I wait until the SSL_connect() function succeeds I wanted to know if there is a better

Re: SSL_Connect call gives SSL_ERROR_WANT_READ for non blocking sockets

2011-11-21 Thread Michael S. Zick
#x27;t respond to the want-write and/or want-read. Something which your code must do when using non-blocking sockets. Mike > ~Arjun > > On Thu, Nov 17, 2011 at 11:50 PM, Michael S. Zick wrote: > > > On Thu November 17 2011, Arjun SM wrote: > > > Hi, > > >

Re: SSL_Connect call gives SSL_ERROR_WANT_READ for non blocking sockets

2011-11-21 Thread Arjun SM
Well yes, these are not errors. My bad for naming the variable as 'error'. ~Arjun On Thu, Nov 17, 2011 at 11:50 PM, Michael S. Zick wrote: > On Thu November 17 2011, Arjun SM wrote: > > Hi, > > Thanks for the reply. > > I have called the ssl_connect() fu

Re: SSL_Connect call gives SSL_ERROR_WANT_READ for non blocking sockets

2011-11-17 Thread Michael S. Zick
On Thu November 17 2011, Arjun SM wrote: > Hi, > Thanks for the reply. > I have called the ssl_connect() function again after checking for > SSL_ERROR_WANT_READ > and SSL_ERROR_WANT_WRITE. But I wanted to know if I can optimize my code. > Below is my code > > int coun

Re: SSL_Connect call gives SSL_ERROR_WANT_READ for non blocking sockets

2011-11-17 Thread Arjun SM
Hi, Thanks for the reply. I have called the ssl_connect() function again after checking for SSL_ERROR_WANT_READ and SSL_ERROR_WANT_WRITE. But I wanted to know if I can optimize my code. Below is my code int counter = 6; while (status < 0 && --counter >0 ) {

Re: SSL_Connect call gives SSL_ERROR_WANT_READ for non blocking sockets

2011-11-15 Thread Huaqing Wang
Hi, Arjun, For non-blocking case, you have to handle SSL_ERROR_WANT_READ and SSL_ERROR_WANT_WRITE In that case you need to redo *SSL_connect.* * * Huaqing On Tue, Nov 15, 2011 at 5:51 AM, Arjun SM wrote: > Hi all, >I am newbie to openssl any help is greatly appreciated. > &

SSL_Connect call gives SSL_ERROR_WANT_READ for non blocking sockets

2011-11-15 Thread Arjun SM
call. 2. Use *SSL_connect()* system call to perform handshake. 3. Use *SSL_get_peer_certificate()* to get the certificate. The problem I faced was that, the connect() call would at times return a errno 4 (EINTR) error . So i changed code from blocking to non-blocking sockets and used select() call

SSL_connect is indicating the www.google.com certificate is expired

2011-10-11 Thread Shaw Andy
Hi! When I use SSL_connect with the https://www.google.com address then it is claiming that the certificate is expired even though I have checked the certificate and the issuers and anything I can find related to it to see why it might think that but it all looks correct. This only happens on

SSL_ERROR_ZERO_RETURN with ssl_connect

2011-09-14 Thread anandkumarsrinivas
hi , iam getting ssl_error_zero_return erro when i used ssl_connect . it returns 0 and the ssl_get error functio returns SSL_ERROR_ZERO_RETURN . web search shows that solution as to retry till it works. but it might not work in every case. the issue seems to be only with 2008 windoes on vmware

Re: Query Regarding usage of SSL_Connect()

2011-07-17 Thread David Schwartz
On 7/14/2011 6:17 AM, Amit Kumar wrote: Hi team, I am using SSL_Connect() in one of my projects and this SSL_connect is returning a value of -1. With SSL_get_error() i can see it is *SSL_ERROR_WANT_READ ?* * * * Now i am not understanding why this can come and if this is there then

Fwd: Query Regarding usage of SSL_Connect()

2011-07-16 Thread Sushil Singh
this. If it is in non-blocking mode, then you put the SSL_connect in do while and continue this till SSL_pending is zero bytes or any other error comes. Whichever is earlier. This is based on my assumptions. I can provide you help only when you send your code. Take care. Sushil On Thu, Jul 14,

Re: Query Regarding usage of SSL_Connect()

2011-07-14 Thread Gayathri Sundar
Please dont expect much response to this question. Going thro the man pages of openssl will have all the necessary answers you are expecting. Do you homework before coding. Thanks --Gayathri On Thu, Jul 14, 2011 at 8:17 AM, Amit Kumar wrote: > Hi team, >I am using SSL_Connect() in

Query Regarding usage of SSL_Connect()

2011-07-14 Thread Amit Kumar
Hi team, I am using SSL_Connect() in one of my projects and this SSL_connect is returning a value of -1. With SSL_get_error() i can see it is *SSL_ERROR_WANT_READ ?* * * * Now i am not understanding why this can come and if this is there then should i call SSL_Connect again. * I am

Re: Why my SSL_Connect() hangs at times?

2011-06-13 Thread David Schwartz
On 6/11/2011 8:52 AM, kali muthu wrote: I have Linux Server which has been connected with a Windows XP client using SSL Sockets. I am able to read and write through those sockets. Good. Recently my calls to SSL_Connect() waits for long time. And yes I am using in Blocking mode. My search on

RE: Why my SSL_Connect() hangs at times?

2011-06-12 Thread Dave Thompson
erver? Is it something you wrote? openssl or not? I assume you created or at least are debugging the client. Can you try another client program, like openssl commandline s_client? Do you try your client on more than one machine, or can you? > Recently my calls to SSL_Connect() waits for lon

Why my SSL_Connect() hangs at times?

2011-06-11 Thread kali muthu
I have Linux Server which has been connected with a Windows XP client using SSL Sockets. I am able to read and write through those sockets. Recently my calls to SSL_Connect() waits for long time. And yes I am using in Blocking mode. My search on that issue ended up with, "I have to us

RE: ssl_connect core dump in multi-threading application

2011-05-31 Thread Yan, Bob
Thanks Steve, Currently my test program does not setup the locking callbacks as well as the thread ID callback. In general, should I must setup them in multi-threading openssl application? If so, should the following two functions be used to setup the locking callbacks and the thread ID callbac

Re: ssl_connect core dump in multi-threading application

2011-05-31 Thread Dr. Stephen Henson
On Tue, May 31, 2011, Yan, Bob wrote: > Hi, > > I have an application which has more than 100 SSL client threads and each of > those threads tried to connect to a SSL server simultaneously. Occasionally > the application process got coredump on the call to ssl_connect(), pl

ssl_connect core dump in multi-threading application

2011-05-31 Thread Yan, Bob
Hi, I have an application which has more than 100 SSL client threads and each of those threads tried to connect to a SSL server simultaneously. Occasionally the application process got coredump on the call to ssl_connect(), please see the stack trace below for detail. *** glibc detected

Re: SSL_connect failed with FATAL FIPS SELFTEST FAILURE

2011-03-27 Thread Dr. Stephen Henson
On Sun, Mar 27, 2011, Yolanda Liu (liuyu) wrote: > Hi: > > Our application crashed during startup when tried to connect to the > remote server via libCurl which calls SSL_connect with the following > error: > > fips.c(146): OpenSSL internal error, assertion failed: FATAL FI

SSL_connect failed with FATAL FIPS SELFTEST FAILURE

2011-03-27 Thread Yolanda Liu (liuyu)
Hi: Our application crashed during startup when tried to connect to the remote server via libCurl which calls SSL_connect with the following error: fips.c(146): OpenSSL internal error, assertion failed: FATAL FIPS SELFTEST FAILURE Program received signal SIGABRT, Aborted. Wondering what could

Re: SSL_connect( ) want read

2011-03-04 Thread David Schwartz
On 3/3/2011 6:50 AM, ikuzar wrote: Hello, I have got a SSL_ERROR_WANT_READ after a call to SSL_connect. I 'd like to know what should I do exactly ? Thanks Retry the connect operation later, ideally after confirming that the underlying socket is readable.

  1   2   3   4   >