Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

TLS Peer certificate exponent listed as "10001" #17202

Closed
iamthechad opened this issue Apr 20, 2015 · 17 comments
Closed

TLS Peer certificate exponent listed as "10001" #17202

iamthechad opened this issue Apr 20, 2015 · 17 comments

Comments

@iamthechad
Copy link

The exponent should probably be stored in the peer certificate object as the number 65537 instead of the binary10001 (unless there's a reason for the binary representation).

@misterdjules
Copy link

@iamthechad 10001 is an hexadecimal representation, not a binary representation. The exponent is not stored in any specific human readable representation, 10001 is just the way it's converted by node's native layer.

What is the problem with using this specific representation?

@iamthechad
Copy link
Author

There's no problem per se. It's just inconsistent with tools that show the decimal value by default. (Although, if I can't tell binary and hex apart I have worse issues. Admittedly, other tools show it as 0x10001 which makes it more obvious.)

@misterdjules
Copy link

@iamthechad I agree it is definitely confusing, and some clearer output would be beneficial.

@joyent/node-coreteam I wonder if that would be considered an API change. Even though the API documentation doesn't mention the exponent, some users could be relying on its format to parse getPeerCertificate's output.

I would suggest considering it's an API change and submitting a PR against master to have both the decimal and hexadecimal forms of the exponent displayed, or at least to prefix the hexadecimal form with 0x.

Thoughts?

@indutny
Copy link
Member

indutny commented May 4, 2015

This is certainly would be a breaking change. What do you think about just documenting it?

@misterdjules
Copy link

Documenting in v0.10/v0.12 and making it clearer by changing the output in v0.13 sounds good to me.

@indutny
Copy link
Member

indutny commented May 4, 2015

Ok, makes sense :)

@misterdjules
Copy link

@iamthechad Do you have some time to make the changes as described in my previous comment?

@iamthechad
Copy link
Author

I'd be happy to take a stab at it. Where should I make the changes - against the v0.10 and v0.12 tags?

@misterdjules
Copy link

@iamthechad For the documentation changes, that would be against v0.10. For the code changes, that would be against master. Thank you 👍

@iamthechad
Copy link
Author

I've submitted doc changes. Are you also asking if I could make the code changes? I can certainly take a stab at it. Is there any documentation around for setting up a dev environment for Node? I'd love to be able to load things into a decent IDE so I can at least navigate easier.

@misterdjules
Copy link

@iamthechad If you're interested in making the code changes, of course that would be great too! Make sure you read the README.md file and the CONTRIBUTING.md file too.

There isn't any instruction on how to build node with specific IDEs yet as far as I know.

If you have any question, some of the node contributors are in the #libuv IRC channel on the Freenode servers.

@jasnell
Copy link
Member

jasnell commented May 12, 2015

@iamthechad ... if IDE's are your thing, eclipse has fairly good node/js editing support and you can configure it to use the config/makefile build. It's a bit... "heavyweight"... tho.

@misterdjules
Copy link

I'm available to guide anyone willing to pick this issue up and submit a PR that changes the output to make it clearer as mentioned in #17202 (comment). Ping me on GitHub by mentioning @misterdjules or find me on IRC (jgi in #libuv on Freenode).

@iamthechad
Copy link
Author

@misterdjules I'd be more than happy to pick this up. I've successfully submitted a doc change against 0.12, so I have a better understanding of the expected PR format, but it would definitely be nice to have a guide.

@misterdjules
Copy link

@iamthechad Excellent! If you have any question, please join #libuv on Freenode (IRC) and ping me (I'm jgi in that channel).

@misterdjules
Copy link

@iamthechad I'm also available by email at jgilli at fastmail dot fm.

@misterdjules
Copy link

Closing, as code/behavior changes landed in node v4.0.0 and later with nodejs/node@847459c, and documentation changes for v0.10 and v0.12 are tracked with #25142.

Thank you again @iamthechad!

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

No branches or pull requests

4 participants