Giter Club home page Giter Club logo

Comments (2)

oyeb avatar oyeb commented on August 15, 2024

On task 3

I honestly don't know what ActiveMerchant's cacert.pm is doing in their repo (seems to be used here reasonably). This is Mozilla's CA bundle, which is available on literally every OS via the system's ssl module. Browsers "trust" CAs that feature in this list. All good HTTP(S) client libs will use the system's certificates to make https requests right out of the box. Like python's requests library.

Client side SSL

This answer on SO helps.
Some gateways require/allow a client (ie, a merchant) to authenticate itself using a Client-Side SSL Certificate instead of using an API token or other popular methods. For such gateways, we need to send this client cert in the request.

HTTPoison uses hackney and any SSL options passed to HTTPoison/hackney fall through to Erlang's SSL module. So, to send a client cert via HTTPoison, just pass the required SSL options cert or certfile as documented.

Server side SSL

A gateway who's SSL cert is not trusted by Mozilla's CA shouldn't won't exist, so we'll never have to use the cacerts or cacertfile options. Which makes me wonder why AM keeps the PEM in the repo...

TL;DR

Maybe need a helper for a gateway that allows/requires client side SSL verification as an authentication mechanism. List of such gateways supported by AM, we have encountered none so far.

from gringotts.

oyeb avatar oyeb commented on August 15, 2024

Closing this as we do not see any way to provide some common helpers to make connections. Vanilla HTTPoison` is best.

from gringotts.

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.