[Bioc-devel] help with Win10 TLS problem?

Hervé Pagès hp@ge@ @end|ng |rom |redhutch@org
Wed Mar 18 23:22:24 CET 2020


mmh.. for some reason the original post in this thread is only showing 
up now in my mailbox i.e. way after Steffen's answer (and even if 
Steffen's answer includes the original post, I must confess that I 
didn't really pay attention to it)

Anyway, based on that original post I see now that Egon was using 
download.file() but this was not working on Windows 10 so he switched to 
the RCurl solution. And the RCurl solution works on Windows 10 but now 
fails on our Windows builders (Windows Server 2012 R2 Standard). Do I 
get the situation right?

H.


On 3/18/20 14:53, Hervé Pagès wrote:
> The getBridgeNames() function in BridgeDbR uses the following code to 
> download the HTML page at 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__bridgedb.github.io_data_gene-5Fdatabase_&d=DwIDaQ&c=eRAMFD45gAfqt84VtBcfhQ&r=BK7q3XeAvimeWdGbWY_wJYbW0WYiZvSXAJJKaaPhzWA&m=GbdGtFXiT4WW33h7Un9R0XL7r4I1e4JAb9uSyup82Sw&s=qywf3a1JViBPl5ArNq4vLqt8_csFrFDG_G2MREAWwpM&e= 
> 
>    url <- 
> "https://urldefense.proofpoint.com/v2/url?u=https-3A__bridgedb.github.io_data_gene-5Fdatabase_&d=DwIDaQ&c=eRAMFD45gAfqt84VtBcfhQ&r=BK7q3XeAvimeWdGbWY_wJYbW0WYiZvSXAJJKaaPhzWA&m=GbdGtFXiT4WW33h7Un9R0XL7r4I1e4JAb9uSyup82Sw&s=qywf3a1JViBPl5ArNq4vLqt8_csFrFDG_G2MREAWwpM&e= 
> "
>    library(RCurl)
>    CURL_SSLVERSION_TLSv1_2 <- 6L
>    opts <- curlOptions(sslversion=CURL_SSLVERSION_TLSv1_2)
>    site <- basicTextGatherer()
>    curlPerform(url=url, writefunction=site$update, .opts=opts)
>    html <- site$value()
> 
> Not sure why this fails on our Windows builder but if it fails there it 
> might fail on other Windows systems. A more portable/reliable way to get 
> that HTML document is to use download.file():
> 
>    url <- 
> "https://urldefense.proofpoint.com/v2/url?u=https-3A__bridgedb.github.io_data_gene-5Fdatabase_&d=DwIDaQ&c=eRAMFD45gAfqt84VtBcfhQ&r=BK7q3XeAvimeWdGbWY_wJYbW0WYiZvSXAJJKaaPhzWA&m=GbdGtFXiT4WW33h7Un9R0XL7r4I1e4JAb9uSyup82Sw&s=qywf3a1JViBPl5ArNq4vLqt8_csFrFDG_G2MREAWwpM&e= 
> "
>    destfile <- tempfile()
>    download.file(url, destfile)
>    html2 <- paste0(readLines(destfile), "\n", collapse="")
> 
>    identical(html, html2)  # TRUE
> 
> This works everywhere I tested e.g. my laptop, malbec1, merida1, tokay2, 
> etc... and doesn't rely on some obscure RCurl/SSL settings.
> 
> By doing the same kind of change in their getDatabase() function, the 
> BridgeDbR maintainers can get rid of their dependency on RCurl.
> 
> Hope this helps,
> H.
> 
> 
> On 3/18/20 12:20, Neumann, Steffen wrote:
>> Hi,
>>
>> can you get me the URL that wants to be downloaded ?
>>
>> The "tlsv1 alert protocol version" indicates that the proper
>> solution might be to notify the server to reconfigure
>> the web server supported TLS versions.
>>
>> Yours,
>> Steffen
>>
>>
>> On Wed, 2020-03-18 at 19:55 +0100, Egon Willighagen wrote:
>>> Hi all,
>>>
>>> in the BridgeDbR package I have a TSL issue, just on Windows10 [0]:
>>>
>>>> location <- getDatabase("Bacillus subtilis")
>>>
>>> Error in function (type, msg, asError = TRUE)  :
>>>    error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert
>>> protocol version
>>> Calls: getDatabase ... getBridgeNames -> curlPerform -> <Anonymous>
>>> -> fun
>>> Execution halted
>>>
>>> This method is using the download.file() method (see [1]). I am not
>>> sure
>>> what this method uses by default. I have been googling and found a
>>> number
>>> of suggestions on how to get RCurl to use other SSL version, such as:
>>>
>>> CURL_SSLVERSION_TLSv1_2 <- 1Lopts <- RCurl::curlOptions(  verbose =
>>> TRUE, sslversion = CURL_SSLVERSION_TLSv1_2)download.file(url, file,
>>> mode = "wb", .opts=opts)
>>>
>>>
>>> But I haven't found something that works. Error messages are very
>>> cryptic,
>>> and I'm running out of ideas.
>>>
>>> Does someone have a suggestion how to debug this? Maybe even have a
>>> solution?
>>>
>>> All feedback is very much appreciated!
>>>
>>> Egon
>>>
>>>
>>>
>>> 0.
>>>
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__bioconductor.org_checkResults_release_bioc-2DLATEST_BridgeDbR_tokay1-2Dchecksrc.html&d=DwICAg&c=eRAMFD45gAfqt84VtBcfhQ&r=BK7q3XeAvimeWdGbWY_wJYbW0WYiZvSXAJJKaaPhzWA&m=6ZUwYkvqkDVxUXnwM4Ny0c26DHiOZSSZMb3TcjTEhTU&s=SDaSu90TFdkKtZZR37pGYXHlqzxNF52W5cEYLNRIl88&e= 
>>
>>> 1.
>>> https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_bridgedb_BridgeDbR_blob_master_R_getDatabase.R-23L23&d=DwICAg&c=eRAMFD45gAfqt84VtBcfhQ&r=BK7q3XeAvimeWdGbWY_wJYbW0WYiZvSXAJJKaaPhzWA&m=6ZUwYkvqkDVxUXnwM4Ny0c26DHiOZSSZMb3TcjTEhTU&s=IIwoUM7vnfvLY_e0j7jr4Vd3-EFsgGD1khuegLj83KI&e= 
>>>
>>>
>>>
>>>
> 

-- 
Hervé Pagès

Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.O. Box 19024
Seattle, WA 98109-1024

E-mail: hpages using fredhutch.org
Phone:  (206) 667-5791
Fax:    (206) 667-1319



More information about the Bioc-devel mailing list