Giter Site home page Giter Site logo

SSL error about abettor HOT 12 CLOSED

phillc73 avatar phillc73 commented on June 7, 2024
SSL error

from abettor.

Comments (12)

phillc73 avatar phillc73 commented on June 7, 2024

Seems valid and a good fix. This one didn't crop up for me, as I guess I didn't have a self signed certificate in place. My only concern would be one of security. That risk is slight, but would it be better to write an if loop to deal with the error this throws? Although I suppose I could make this change now, as a quick fix, and deal with the error loop when I take on writing a wider set of error checking. Would appreciate your thoughts.

from abettor.

rethinkr-hub avatar rethinkr-hub commented on June 7, 2024

I'm by no means experienced in coding R or any other language. I was playing around with that login function all day and the only way I could get R to login was to disable the SSL check which is a good quick fix i suppose, but i agree about the concern for security. I tried adding:
cainfo = path.expand("~/client-2048.crt")
into the the RCURL POST but this would give me this first error again or an unmatched table error i cant reproduce. I know my certificates work because i was able to login to Betfair with them using cURL with Cygwin. I just think the RCurl error messages are generic and dont give enough insight into the problem. I think the error message is caused by the restriction of only being able to submit either a certificate or a key because Betfair wants both (according to the cURL requirements). Coming back to your thoughts about if loops, and think that would be a great idea to create a loop that would bypass the SSL certificate for people who are on delay and trying to just play around like im doing right now. And i appreciate the time you took to build this package, ive seen a lot of people wanting an R package for the new Betfair API-NG.

from abettor.

phillc73 avatar phillc73 commented on June 7, 2024

Before I make any changes, I was wondering if you were connecting through a proxy of some description? Just trying to figure out the circumstances where people are using a self signed certificate.

from abettor.

rethinkr-hub avatar rethinkr-hub commented on June 7, 2024

That completely slipped my mind, and yeah i am behind a proxy.

from abettor.

phillc73 avatar phillc73 commented on June 7, 2024

I think the way I am going to address this is to add another argument to the loginBF() function. By default ssl.verifypeer = TRUE, but people hitting the same error as this can manually set it to ssl.verifypeer = FALSE, from within their R code.

In this way, the default login always retains the best security through a verified SSL certificate, however people can still choose to manually change this to achieve login.

I didn't want a simple "if" loop, as it would mean some logins may default to non-verified SSL certificates, without the user being aware of it. And I didn't want to particularly add a stop to the loop, requiring user input acknowledgment, as this would make the automation process more difficult for those with self-signed certificates.

Hopefully the new argument option, with appropriate documentation, will work well.

from abettor.

rethinkr-hub avatar rethinkr-hub commented on June 7, 2024

Looking forward to the fix. I'll let you know if any more error pop up.

from abettor.

phillc73 avatar phillc73 commented on June 7, 2024

I've released a fix for this error. Please do re-install the package to test. loginBF() has a new argument - sslVerify. This defaults to TRUE, but may be explicitly changed to FALSE for self signed SSL certificates. If the fix tests successfully I'll close this issue.

from abettor.

JJHeathview avatar JJHeathview commented on June 7, 2024

Hi Phil,
I think the sslVerify argument needs to be added to each of the places where the PostForm() function is used, namely listEventTypes.R, listCountries.R, listMarketTypes.R, listCountries.R, listMarketBook.R, listMarketCatalogue.R and placeorders.R.

BTW the package looks as if it could be very useful, thanks for putting on github. I wondered how a cancelOrder function might look, do you have a design for it yet? If you'd like me to make a contribution in some way I'd be happy to try and help.
Regards,
Jason

from abettor.

phillc73 avatar phillc73 commented on June 7, 2024

Thanks Jason. Not the news I'd hoped, but at least the fix should be straight forward, if not elegant.

Haven't looked at cancelOrder yet and thanks for the offer of assistance. Please drop me an email directly. phill [at] starkingdom.co.uk as I'd like to hear more about your cancelOrder use cases.

from abettor.

rethinkr-hub avatar rethinkr-hub commented on June 7, 2024

Hey Phill does the 0.1.2 release fix all the scripts in the abettoR package or just the login? I've got the functions updated to work in R from your original package, so i'm in no rush. Just want to help confirm the package works when everything is fixed.

from abettor.

phillc73 avatar phillc73 commented on June 7, 2024

Apologies it's taken me so long to address this issue. However, now all functions support the sslVerify parameter (v0.1.3).

At this time, it was easiest and quickest to simply add the sslVerify parameter to all functions, rather than implement a global sslVerify function. The current solution has been tested with all functions and appears to work, but is a little inelegant. You will need to set sslVerify = FALSE as a parameter for all abettor functions, if the SSL verification is failing.

If either mrbub or JJHeathview can confirm this solution fixes the problem, I'll close out the issue.

from abettor.

phillc73 avatar phillc73 commented on June 7, 2024

Assuming fixed, so closing.

from abettor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.