8000 SSL certificate problem with json2veris [NEW FEATURE REQUEST: migrate RCurl code to httr] · Issue #19 · jayjacobs/verisr · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

SSL certificate problem with json2veris [NEW FEATURE REQUEST: migrate RCurl code to httr] #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
juk80x opened this issue Jan 23, 2015 · 8 comments
Assignees

Comments

@juk80x
Copy link
juk80x commented Jan 23, 2015

When json2veris attempts to pull down the schema it gives the following error:

Error in function (type, msg, asError = TRUE) :
SSL certificate problem: unable to get local issuer certificate

I attempted to pull down the schema manually using a getURL call that includes a 'cainfo' parameter. I then used the same fromJSON call to get the schema. But when I passed it in using the 'schema' paramter in json2veris I received another error.

Error in readLines(file, warn = FALSE) : 'con' is not a connection

Unfortunately that is the extent of my R knowledge.

@hrbrmstr
Copy link
Collaborator

Can you paste a dump of sessionInfo() the next time you try to run the code?

@juk80x juk80x closed this as completed Jan 23, 2015
@juk80x
Copy link
Author
juk80x commented Jan 23, 2015

sessionInfo()
R version 3.1.2 (2014-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] verisr_2.0.1 RCurl_1.95-4.5 bitops_1.0-6 devtools_1.6.1
[5] rjson_0.2.15

loaded via a namespace (and not attached):
[1] chron_2.3-45 colorspace_1.2-4 data.table_1.9.4 digest_0.6.6
[5] ggplot2_1.0.0 grid_3.1.2 gridExtra_0.9.1 gtable_0.1.2
[9] httr_0.6.1 MASS_7.3-35 munsell_0.4.2 plyr_1.8.1
[13] proto_0.3-10 Rcpp_0.11.3 reshape2_1.4.1 scales_0.2.4
[17] shinyapps_0.3.61 stringr_0.6.2 tools_3.1.2

@juk80x juk80x reopened this Jan 23, 2015
@hrbrmstr
Copy link
Collaborator

Roger that. Thx. I figured it was Windows. The httr library makes up for some of the certificate deficits on Windows and I'll see how quickly we can migrate to those since the alternative is to do no SSL checking (which would be a bad thing).

@hrbrmstr hrbrmstr self-assigned this Jan 23, 2015
@hrbrmstr hrbrmstr changed the title SSL certificate problem with json2veris SSL certificate problem with json2veris [NEW FEATURE REQUEST: migrate RCurl code to httr] Jan 23, 2015
@juk80x
Copy link
Author
juk80x commented Jan 25, 2015

Here is my workaround.

Requires you download "ca-bundle.crt"

library(verisr)
my_schema.json <- getURL("
https://raw.githubusercontent.com/vz-risk/veris/master/verisc-merged.json",
cainfo = "R/ca-bundle.crt")
write(my_schema.json, file = "data/my_schema.json")
vcdb <- json2veris(vcdb.dir, schema="data/my_schema.json")

On Fri, Jan 23, 2015 at 2:14 PM, boB Rudis notifications@github.com wrote:

Roger that. Thx. I figured it was Windows. The httr library makes up for
some of the certificate deficits on Windows and I'll see how quickly we can
migrate to those since the alternative is to do no SSL checking (which
would be a bad thing).


Reply to this email directly or view it on GitHub
#19 (comment).

@hrbrmstr
Copy link
Collaborator
hrbrmstr commented Feb 8, 2015

(We're in the middle of a big report prep, so I'm leaving the main repo alone). I changed from RCurl to httr in this fork https://github.com/hrbrmstr/verisr but have no Windows environment to test it in. If someone on Windows can test that, I'll merge the changes here.

@smach
Copy link
smach commented Feb 8, 2015

Hi. I tried loading your version but am still getting

Error in function (type, msg, asError = TRUE) :
SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

when I try

my_schema.json <- getURL("https://raw.githubusercontent.com/vz-risk/veris/master/verisc-merged.json")

Not sure if that's supposed to happen or not. The workaround juk80x posted does work for me with the master branch and this fork.

When I tried using already downloaded files locally with

vcdb <- json2veris(vcdb.dir)

that did work.

@hrbrmstr
Copy link
Collaborator
hrbrmstr commented Feb 8, 2015

thx for testing! (I need to get a non-locked down Windows VM up soon).

Give devtools::install_github("jayjacobs/verisr", ref="certs") a go. I added the certs to the pkg and had the geturl call use it. it doesn't break anyting on OS X or Ubuntu but (again) I can't test it on Windows.

@smach
Copy link
smach commented Feb 8, 2015

Glad to help! Same outcome:

my_schema.json <- getURL("https://raw.githubusercontent.com/vz-risk/veris/master/verisc-merged.json") 

doesn't work but

my_schema.json <- getURL("https://raw.githubusercontent.com/vz-risk/veris/master/verisc-merged.json",
                     cainfo = "ca-bundle.crt")

does (after I manually copied a ca-bundle.crt file into my working directory.

This then does work with local json files

vcdb <- json2veris(vcdb.dir, schema="data/my_schema.json")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Pr 3A19 ojects
None yet
Development

No branches or pull requests

3 participants
0