nhpip
Hi,
I’ve got a project where I have to decode an X.509 certificate. I’m using Erlang’s public_key module to decode either a PEM or DER file. I get back a beautiful Erlang record. I know I can use Record for this purpose, but that seems overkill. I want to avoid adding yet another library.
Anyone got any recommendations for nicely extracting items out of a nested tuple in Elixir?
Thanks
Trending in Questions
One of my LiveView view’s has a very heavy javascript dependency so I want to avoid loading it for every page on the site, while still us...
New
Hi all!
I know that quite a few people use Phoenix LiveView but it is hard to get a more up-to-date list of folks/companies using it. I ...
New
Hello everyone!
I am new to coding with Elixir/Erlang. And i am looking for some utilities for fuzzing testing like AFL++.
Does anyone ...
New
I’m very new to Elixir, so sorry if this is a silly question:
I am wondering what happens to the mailbox of a process when the machine i...
New
I load tested a plain Phoenix chat app backed by Postgres with 100 million messages in it, everything on default settings, to see what br...
New
Hey, I know this has been discussed ad nauseum, but I couldn’t find a definitive answer or at least some consensus around this, so let me...
New
I don’t suppose you can lazy load a library depending on runtime data? For example if it’s a certain user they can lazy load ‘library A’ ...
New
Other Trending Topics
Edit: 2026 May 15 - This post is archived.
Mob is alive!!
Main docs: mob v0.7.11 — Documentation
A bit of explanation for the slightly c...
New
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Hi everyone :waving_hand:
I’ve been working on PhiaUI, an open-source UI component library for Phoenix LiveView, and I wanted to share i...
New
On November 23, 2026, an unauthorized third party exploited a vulnerability in hex.pm (CVE-2026-129514, CVSS 10.0) that let them run comm...
New
@hugobarauna, Dr. Dimitrios Koutmos (my brother) and I (Alex Koutmos) have been hard at work on writing a book on how you can use Elixir ...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #code-sync
- #exunit
- #discussion
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #ai
- #authentication
- #elixirconf-us
- #umbrella
- #full-time-contract
- #blog-post
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-eu
- #distillery
- #security
- #processes
- #api
- #forms
- #hex










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
D4no0
Pattern matching, using
elem/2, are you looking for anything in particular?I would recommend to use x509 library though, it’s really neat library written by @voltone. When you start decoding things by hand, that code is really hard to comprehend afterwards, better use a well tested library instead IMO.
voltone
You could use
get_in/2andAccess.elem/1, e.g.But I also like @D4no0 's suggestion
nhpip
Thanks. I ended up using the X509 library. Took 5 lines of code.
D4no0
For reference of what I meant by incomprehensible code, take a look at this
: lib/ssl_moon/network/ssl/certificate.ex · main · SSL MOON / SSL MOON · GitLab
ghannam80
thanks for pointing us to this library which is raising actually a question how we can make finding libraries easier
I was looking for something similar a month ago as it is what I need for the below dealing with MC OAUTH keys :
Actually MC have github repositories for other languages like JAVA/Python/..etc but no Elixir or erlang as below :
https://www.npmjs.com/package/mastercard-oauth1-signer
D4no0
This is the problem we are struggling on a daily basis, the best bet now is to ask the community for advice.
Ironically enough with this “AI” hype, this is actually a place where a LLM that would be trained exclusively on documentation of elixir libraries would be excellent.
ghannam80
that is really a good use case , maybe the team can embed it in the forum so similar to what you get when you search the forum , maybe it can auto generate responses and page of details and links , nice idea
nhpip
I was actually playing with using Erlang to turn the thing into a map:
then
voltone
Recent OTP versions support generating code from ASN.1 that produces and accepts maps:
nhpip
That’s pretty cool