x509 icon indicating copy to clipboard operation
x509 copied to clipboard

(UndefinedFunctionError) function X509.PKCS7.sign/3 is undefined (module X509.PKCS7 is not available) after upgrading from x509 0.8.5 => 0.8.6

Open neel-desh opened this issue 1 year ago • 4 comments

Hello @voltone , I am facing this issue where after updating x509 0.8.5 => 0.8.6

It it throwing this error while signing

** (UndefinedFunctionError) function X509.PKCS7.sign/3 is undefined (module X509.PKCS7 is not available)

neel-desh avatar Apr 06 '23 06:04 neel-desh

That's odd, I'm pretty sure PKCS7 support was never added to X509, so it can't have been removed. I did once publish a quick-and-dirty sample PKCS7 implementation. Did you perhaps create your own fork of X509 with this module added in?

voltone avatar Apr 06 '23 07:04 voltone

No, I never wrote a fork of my own. I did had to refer to the PKCS7 implementation shared by you for reference.

The file just somehow exists in x509 image

and now I'm worried about where it came from. I'll try to look where it came from. let me know if you have any idea. I can see in git that the file was not added by you. 😟 😨

The hex metadata config.

{<<"app">>,<<"x509">>}. {<<"build_tools">>,[<<"mix">>]}. {<<"description">>, <<"Elixir package for working with X.509 certificates, Certificate Signing Requests (CSRs), Certificate Revocation Lists (CRLs) and RSA/ECC key pairs">>}. {<<"elixir">>,<<"~> 1.5">>}. {<<"files">>, [<<"lib">>,<<"lib/mix">>,<<"lib/mix/tasks">>, <<"lib/mix/tasks/x509.test_server.ex">>, <<"lib/mix/tasks/x509.gen.suite.ex">>, <<"lib/mix/tasks/x509.gen.selfsigned.ex">>,<<"lib/x509.ex">>,<<"lib/x509">>, <<"lib/x509/private_key.ex">>,<<"lib/x509/asn1">>, <<"lib/x509/asn1/oid_import.ex">>,<<"lib/x509/certificate">>, <<"lib/x509/certificate/validity.ex">>, <<"lib/x509/certificate/extension.ex">>, <<"lib/x509/certificate/template.ex">>,<<"lib/x509/test">>, <<"lib/x509/test/server.ex">>,<<"lib/x509/test/suite.ex">>, <<"lib/x509/test/crl_server.ex">>,<<"lib/x509/crl.ex">>,<<"lib/x509/crl">>, <<"lib/x509/crl/entry.ex">>,<<"lib/x509/crl/extension.ex">>, <<"lib/x509/certificate.ex">>,<<"lib/x509/signature_algorithm.ex">>, <<"lib/x509/date_time.ex">>,<<"lib/x509/rdn_sequence.ex">>, <<"lib/x509/public_key.ex">>,<<"lib/x509/asn1.ex">>,<<"lib/x509/pkcs7.ex">>, <<"lib/x509/csr.ex">>,<<".formatter.exs">>,<<"mix.exs">>,<<"README.md">>, <<"LICENSE">>,<<"CHANGELOG.md">>]}. {<<"licenses">>,[<<"BSD-3-Clause">>]}. {<<"links">>, [{<<"Changelog">>, <<"https://github.com/voltone/x509/blob/master/CHANGELOG.md">>}, {<<"GitHub">>,<<"https://github.com/voltone/x509">>}]}. {<<"name">>,<<"x509">>}. {<<"requirements">>,[]}. {<<"version">>,<<"0.8.5">>}.

neel-desh avatar Apr 06 '23 09:04 neel-desh

Ah, I suppose I must have had that file in my local directory when publishing 0.8.5 to Hex, and Hex picked it up from there. It was never committed to GitHub, though. The reason I never wanted to make it official is that it would be tricky to support all the various algorithms, as I mentioned in that Elixir Forum post.

Sorry about that! Could you please move the file to your own project once you upgrade to 0.8.6?

voltone avatar Apr 06 '23 10:04 voltone

No worries, I had a discussion with my team regarding this. We decided to stick on 0.8.5 for now.

Thank you soo much tho, for helping with this.

Ps: Should we close the issue then?

neel-desh avatar Apr 06 '23 10:04 neel-desh