sobojack
Sending .pfx file http request
Hi everyone, I have to integrate with an api the requires ssl certification. I have to send three files to the api to do the handshake. It requires a pemfile, a keyfile and a pfxfile. As far as I can tell I believe I can set the pem file and key file using erlangs ssl options http://erlang.org/doc/man/ssl.html#type-cert. but I am Having trouble sending the pfx file. I am using httposion, this is what my request looks like.
res =
HTTPoison.get(url, [{"Authorization", "Bearer my_token"}],
ssl: [
{:versions, [:"tlsv1.2"]},
certfile: crt_path,
keyfile: key_path,
pfxPath: pfx_path
]
)
When I run this request I get
%HTTPoison.Error{
id: nil,
reason: {:options,
{:socket_options,
[
pfxPath: "/Users/jacksobocinski/bowst/talent-management/_build/dev/lib/talent/priv/certs/hype_auth.pfx",
packet_size: 0,
packet: 0,
header: 0,
active: false,
mode: :binary
]}}
}}```
When I remove the pfx path the request works but the api doesn't let me in because I do not have the pfx file. I am open to using other libraries besides poison, any ideas?
Most Liked
sobojack
A potential solution would be doing this in javascript and posting the data back to elixir, thoughts?
1
Popular in Questions
This should be a simple problem but I just can’t seem to figure it out. I have a standalone Elixir app that won’t find the database.
Dep...
New
I am trying to figure out how Mix knows whether the environment is test, dev, or prod -- where is this set?
Thanks.
New
Hey guys.
I'm new to elixir and im really stocked about it. But I ran into a bit of problem - I need to convert a date sting, for examp...
New
Hey all, just started picking up Elixir last week and am writing a scraper as a learning project.
Baby step #1 is extracting the number ...
New
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
Hey all,
I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
Sometimes I want to check if the input into a function is not a blank string.
My first approach:
defmodule Example do
def do_stuff(s...
New
Mix format works fine if run from the cmd. I’ve followed this to facilitate the implementation into VSC which involves downloading an ext...
New
Expanding on this topic: https://forum.elixirforum.net/t/map-typespec-question/19217
Let’s say I have a map with required and optional k...
New
Other popular topics
Credo is smart enough to check for (something like) this:
assert length(the_list) == 0
with this response:
Checking if an enum is empt...
New
I couldn’t find any guides that worked well with Phoenix 1.6.0 and esbuild. I hope this helps people test the waters and eases you into t...
New
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!)
This post collects co...
New
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
Hi folks,
Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
New
How to set Jason to encode all fields in ecto schema, I don’t care about security and implementing only is taking long list of attributes...
New
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
I have a super simple question about elixir - how would I take a file like this
foo bar baz
and output a new file that enumerates th...
New
I am trying to run a deploy with docker and I successfully runned with this command:
docker build -t romenigld/blog-prod .
but when I t...
New








