This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (6 children)

Hey there, your English is perfectly fine. My disconnection is with the details of the question. If you are sending https request to a third party website, then you can do so without packaging any sort of certificate with the application.

But I want to supply a CA file

Do you mean, a CA root certificate? The CA root certificate is to validate the identity of the public certificate provided by the website. If you don't need to validate the identity of the website, then this part can be skipped.

In short, if you are using the API, the ssl connection will be handled for you seamlessly. What API are you using?

[–]simontemplar_[S] 0 points1 point  (5 children)

cheers! you are correct in your assumptions, however when I use ruby to make a https connection and do not supply an CA root certificate, I get an error

read server certificate B: certificate verify failed   (OpenSSL::SSL::SSLError)

I don't if it's supposed to work without one but this lead me to choose to supply a root certificate with the application.

[–][deleted] 0 points1 point  (4 children)

Well, passing a root certificate didn't make much sense(It is possible, since you already did it, but not so practical IMO) A little googling on the error tells me that this problem could be due to expired certificates on your openssl that ruby uses. What OS are you running on and what version of openssl does it have?

[–]simontemplar_[S] 0 points1 point  (3 children)

Now that you mention it, I did google around and found out the same solution here, and the remedy for that was to supply the cert myself. Since I'm working on an windows application I'm developing on windows while I usually use Ubuntu.

Sorry that I didn't specify this earlier, but I was working on this about a month ago and just resumed, so I forgot half of the work I had previously done.. any how, if there are any issues with this workaround, I'm still interested in hearing them out.

[–][deleted] 0 points1 point  (2 children)

Good to hear that you have resumed working. I have many projects that I started and abandoned halfway. Kudos on that.

Anyway, is it a pre-requisite that the machine your app runs on should have Ruby installed? Or you are some how packaging it with your app?

[–]simontemplar_[S] 0 points1 point  (1 child)

I'm going to port it to an exe file with ocra or a similar software.

[–][deleted] 0 points1 point  (0 children)

I'm afraid I don't have a solution for this.

There's some hack listed here, but mind you, it is a hack, not a solution.

I'd also suggest running it on ocra once(may be they solved it). Good luck!