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

openssl list-public-key-algorithms on crypto docs #9005

Closed
yagop opened this issue Oct 10, 2016 · 12 comments
Closed

openssl list-public-key-algorithms on crypto docs #9005

yagop opened this issue Oct 10, 2016 · 12 comments
Labels
crypto Issues and PRs related to the crypto subsystem. doc Issues and PRs related to the documentations. good first issue Issues that are suitable for first-time contributors.

Comments

@yagop
Copy link

yagop commented Oct 10, 2016

According with docs openssl list-public-key-algorithms shows the available signing algorithms, but isn't very helpfull, in fact I'm still unable to figure out which parameter to pass to crypto.createVerify(algorithm) 😢

By the way, on openssl 1.1.0b does not exists that command:

$ openssl version
OpenSSL 1.1.0b  26 Sep 2016
$ openssl list-public-key-algorithms
Invalid command 'list-public-key-algorithms'; type "help" for a list.
$ openssl list -public-key-algorithms
Name: OpenSSL RSA method
    Type: Builtin Algorithm
    OID: rsaEncryption
    PEM string: RSA
Name: rsa
    Alias for: rsaEncryption
Name: OpenSSL PKCS#3 DH method
    Type: Builtin Algorithm
    OID: dhKeyAgreement
    PEM string: DH
...
@Fishrock123 Fishrock123 added crypto Issues and PRs related to the crypto subsystem. doc Issues and PRs related to the documentations. labels Oct 10, 2016
@Fishrock123
Copy link
Contributor

cc @nodejs/crypto

@mscdex
Copy link
Contributor

mscdex commented Oct 10, 2016

Perhaps we should just add a crypto.getPubKeyAlgos() or similar.

@bnoordhuis
Copy link
Member

I see openssl list-public-key-algorithms mentioned for crypto.createSign() and crypto.createVerify() but I have no idea why. What you want to use is one of the digests from crypto.getHashes(), like RSA-SHA256.

@indutny
Copy link
Member

indutny commented Oct 10, 2016

Yeah, it is basically contained in crypto.getHashes() as @bnoordhuis pointed out.

@bnoordhuis
Copy link
Member

Looks like the documentation has basically always been wrong -- I traced it back to commit afce4c3 from May 2010, released in v0.1.94! In fairness, we didn't have crypto.getHashes() back then. :-)

@indutny
Copy link
Member

indutny commented Oct 10, 2016

Nor did anyone know how these things work ;)

@gibfahn gibfahn added the good first issue Issues that are suitable for first-time contributors. label Oct 10, 2016
@gibfahn
Copy link
Member

gibfahn commented Oct 10, 2016

Sounds like we're somewhat overdue a documentation update then?

@bnoordhuis
Copy link
Member

Yep.

@sstern6
Copy link
Contributor

sstern6 commented Oct 11, 2016

Would like to make a PR for this, from what I understand from the thread I need to:

  1. Remove openssl list-public-key-algorithms explanation from crypto.createSign() and crypto.createVerify() sections in the docs.
  2. Update the crypto.getHashes() to be more clear about listing supported hash algorithms?

Can have a PR open for this shortly!

cc @bnoordhuis

Thanks!

@bnoordhuis
Copy link
Member

@sstern6 Correct. I'd also cross-reference crypto.getHashes() from crypto.createSign() and crypto.createVerify().

@sstern6
Copy link
Contributor

sstern6 commented Oct 11, 2016

@bnoordhuis ON IT! Will have a PR open today! Thank you

@bnoordhuis
Copy link
Member

Closing, fixed in 3d294cf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crypto Issues and PRs related to the crypto subsystem. doc Issues and PRs related to the documentations. good first issue Issues that are suitable for first-time contributors.
Projects
None yet
Development

No branches or pull requests

7 participants