voltone / x509

Elixir package for working with X.509 certificates, Certificate Signing Requests (CSRs), Certificate Revocation Lists (CRLs) and RSA/ECC key pairs
BSD 3-Clause "New" or "Revised" License
120 stars 28 forks source link

Fix version check for Elixir #76

Closed wojtekmach closed 4 months ago

wojtekmach commented 4 months ago

Prior to this patch, we couldn't use this package because it was crashing when using Elixir pre-releases (here, 1.18.0-dev):

== Compilation error in file lib/x509/logger.ex ==
** (ArgumentError) errors were found at the given arguments:

  * 1st argument: not a textual representation of an integer

    :erlang.binary_to_integer("0-dev")
    (elixir 1.18.0-dev) lib/enum.ex:1703: Enum."-map/2-lists^map/1-1-"/2
    (elixir 1.18.0-dev) lib/enum.ex:1703: Enum."-map/2-lists^map/1-1-"/2
    lib/x509/logger.ex:7: (module)

This is now fixed. X509.Util.app_version/1 is still used in a couple other places but just for applications that ship with OTP and they should not have this problem.

voltone commented 4 months ago

Thanks!