cURL / Mailing Lists / curl-library / Single Mail

curl-library

Seg Faults in curl_easy_perform under SSL mode

From: Satheesh Alle <satheesh_alle_at_persistent.co.in>
Date: Wed, 15 Nov 2006 20:17:18 +0530

Hi,

 

I am getting a Segmentation Fault in the function:

 

 

The backtrace is here:

 

#0 0x081ab737 in SSL_set_ssl_method ()
#1 0x081aa550 in ssl_clear_internal ()
#2 0x081aa438 in ssl_clear_internal ()
#3 0x081aae44 in SSL_connect ()
#4 0x081aae08 in SSL_connect ()
#5 0x0026f2a3 in Curl_ossl_connect_step2 (conn=0x92604f0,
sockindex=135966216, timeout_ms=0x91f7d28) at ssluse.c:1391
#6 0x0026f82d in Curl_ossl_connect_common (conn=0x92604f0, sockindex=0,
nonblocking=0 '\0', done=0x3080b97 "") at ssluse.c:1654
#7 0x0026f959 in Curl_ossl_connect (conn=0x81aae08, sockindex=135966216) at
ssluse.c:1695
#8 0x0027f541 in Curl_ssl_connect (conn=0x0, sockindex=135966216) at
sslgen.c:203
#9 0x0025fcd9 in Curl_http_connect (conn=0x92604f0, done=0x3080cbb "") at
http.c:1404
#10 0x00269f86 in Curl_protocol_connect (conn=0x92604f0,
protocol_done=0x3080cbb "") at url.c:2368
#11 0x0026c2e5 in SetupConnection (conn=0x92604f0, hostaddr=0x81aae08,
protocol_done=0x3080cbb "") at url.c:3930
#12 0x0026c397 in Curl_connect (data=0x9267ab8, in_connect=0x3080cf8,
asyncp=0x3080cba "", protocol_done=0x81aae08 "[\201Ãèga") at url.c:3986
#13 0x002768c2 in Curl_connect_host (data=0x9267ab8, conn=0x3080cf8) at
transfer.c:2164
#14 0x00276a9b in Curl_perform (data=0x9267ab8) at transfer.c:2255
#15 0x002771a6 in curl_easy_perform (curl=0x9267ab8) at easy.c:479

 

 

It seems that the crash is at function: SSL_connect()-> SSL_set_ssl_method
()

 

 

I have set the CURLOPT_VERBOSE to debug. And on the terminal, it comes:

 

== Info: About to connect () to myserver port 443 (#0)
=> Send header, 56 bytes (0x38)
0000: About to connect () to myserver port 443 (#0).
== Info: Trying 10.10.1.66... => Send header, 23 bytes (0x17)
0000: Trying 10.10.1.66...
== Info: connected
=> Send header, 10 bytes (0xa)
0000: connected.
== Info: Connected to myserver (10.10.1.66) port 443 (#0)
=> Send header, 60 bytes (0x3c)
0000: Connected to myserver (10.10.1.66) port 443 (#0).
== Info: successfully set certificate verify locations:
=> Send header, 47 bytes (0x2f)
0000: successfully set certificate verify locations:.
== Info: CAfile: /home/test/CertCA.pem
  CApath: none
=> Send header, 79 bytes (0x4f)
0000: CAfile: /home/test/CertCA.pem.
0040: CApath: none.

At this moment, the PEER authentication (CURLOPT_SSL_VERIFYPEER) is set to
false.

 

 

 

I am using libcurl C Interface (curl-7.16.0) with openssl (0.9.7a)

 

If anyone has any pointers, please let me know.

 

Regards,

Satheesh

 

 
Received on 2006-11-15