Rlabkey uses the package httr to connect to the LabKey Server.
a variable list of arguments to set the RCurl options
check the existence of a common name and also verify that it matches the hostname provided
specifies whether curl will verify the peer's certificate
specify is curl should follow any location header that is sent in the HTTP request
the SSL version to use
This topic explains how to configure Rlabkey to work with a LabKey Server running SSL.
Rlabkey uses the package httr to connect to the LabKey Server. On Windows, the httr package is not configured for SSL by default. In order to connect to a HTTPS enabled LabKey Server, you will need to perform the following steps:
1. Create or download a "ca-bundle" file.
We recommend using ca-bundle file that is published by Mozilla. See http://curl.haxx.se/docs/caextract.html. You have two options:
Download the ca-bundle.crt file from the link named "HTTPS from github:" on http://curl.haxx.se/docs/caextract.html Create your own ca-bundle.crt file using the instructions provided on http://curl.haxx.se/docs/caextract.html
2. Copy the ca-bundle.crt file to a location on your hard-drive. If you will be the only person using the Rlabkey package on your computer, we recommend that you
create a directory named `labkey` in your home directory copy the ca-bundle.crt into the `labkey` directory
If you are installing this file on a server where multiple users will use may use the Rlabkey package, we recommend that you create a directory named `c:labkey`
copy the ca-bundle.crt into the `c:labkey` directory
3. Create a new Environment variable named `RLABKEY_CAINFO_FILE`
On Windows 7, Windows Server 2008 and earlier
Select Computer from the Start menu. Choose System Properties from the context menu. Click Advanced system settings > Advanced tab. Click on Environment Variables. Under System Variables click on the new button. For Variable Name: enter RLABKEY_CAINFO_FILE For Variable Value: enter the path of the ca-bundle.crt you created above. Hit the Ok buttons to close all the windows. On Windows 8, Windows 2012 and above Drag the Mouse pointer to the Right bottom corner of the screen. Click on the Search icon and type: Control Panel. Click on -> Control Panel -> System and Security. Click on System -> Advanced system settings > Advanced tab. In the System Properties Window, click on Environment Variables. Under System Variables click on the new button. For Variable Name: enter RLABKEY_CAINFO_FILE For Variable Value: enter the path of the ca-bundle.crt you created above. Hit the Ok buttons to close all the windows. Now you can start R and begin working.
This command can also be used to provide an alternate location / path to your
.netrc
file. Example:
labkey.setCurlOptions(NETRC_FILE = '/path/to/alternate/_netrc')