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

Unknown type public_key:ec_public_key/0 #27

Closed
martinos opened this issue Jun 7, 2019 · 1 comment
Closed

Unknown type public_key:ec_public_key/0 #27

martinos opened this issue Jun 7, 2019 · 1 comment

Comments

@martinos
Copy link

martinos commented Jun 7, 2019

I am new to elixir and I try to use a typespec for one of my function.

  @spec fetch_key(String.t()) :: {:ok, X509.PublicKey.t()} | {:error, any()}
  def fetch_key(url) do
    CertValidation.fetch_valid_pub_key(url)
  end

When I run dialyzer I get the following error message:

:0: Unknown type public_key:ec_public_key/0
:0: Unknown type public_key:rsa_public_key/0

Do you have an idea of what might be the issue?

@voltone
Copy link
Owner

voltone commented Jun 7, 2019

Yes, this is a known issue (see #22). As I mentioned there, :public_key does not expose the types used in the docs, and I wanted to use those types in my docs to stress the compatibility with the native types used in :public_key and :ssl.

This may get resolved as part of the extraction of core functionality to an Erlang package.

@voltone voltone closed this as completed Jun 7, 2019
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