Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
neel-desh opened this issue Apr 6, 2023 · 4 comments

Comments

@neel-desh
Copy link

neel-desh commented Apr 6, 2023

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)

@voltone
Copy link
Owner

voltone commented Apr 6, 2023

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?

@neel-desh
Copy link
Author

neel-desh commented Apr 6, 2023

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">>}.

@voltone
Copy link
Owner

voltone commented Apr 6, 2023

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?

@neel-desh
Copy link
Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants