jeroen / openssl

OpenSSL bindings for R
Other
63 stars 20 forks source link

Connect fails under Windows, but work under Linux #50

Closed tuxmaster closed 6 years ago

tuxmaster commented 6 years ago

Using the module under Linux(CentOS7) work fine. But using it under Windows will fail with: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version Here some sample code:

require('opal')
require('datashieldclient')
require('openssl')
server        <- c("test") 
url             <- c("https://foo.example.com")
user            <- c("")
password     <- c("")
table           <- c("test.active")
logindata <- data.frame(server,url,user,password,table)
opals <- datashield.login(logins=logindata,assign=TRUE)
tuxmaster commented 6 years ago

The SSL config of the sample server:

443/tcp open  https
| ssl-enum-ciphers: 
|   TLSv1.2: 
|     ciphers: 
|       TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 (dh 2048) - A
|       TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 (dh 2048) - A
|       TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (secp256r1) - A
|       TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 (secp256r1) - A
|       TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (secp256r1) - A
|       TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 (secp256r1) - A
|     compressors: 
|       NULL
|     cipher preference: server
|_  least strength: A
jeroen commented 6 years ago

Why are you posting this here? I have no idea what datashieldclient is.

tuxmaster commented 6 years ago

It will use openssl. an very short sample will this one:

library(openssl)
library(RCurl)
curl = getCurlHandle()
getURL("https://foo.example.com", curl = curl)
getCurlInfo(curl)
rm(curl) 

It will result in the same error.

jeroen commented 6 years ago

The host foo.example.com is not running a https server so I'm not sure what you expect.

tuxmaster commented 6 years ago

This is only an dummy name, because the real server is only internal reachable. For this reason I added, the used cipher list, to reproduce it.

jeroen commented 6 years ago

There is probably an issue with your server configuration on certificate. What do you see for:

library(curl)
curl_fetch_memory("https://yourserver", handle = new_handle(verbose = TRUE))
tuxmaster commented 6 years ago

On Linux and Windows, the website will dumped. On Windows only RCurl fails

jeroen commented 6 years ago

This is not related to the openssl package, but probably to RCurl. I can't tell because you're not giving any useful information, I don't even know where your datashieldclient is.

You're going to have make a better bug report if you want me to look at this.