Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
General improvements to HTTPS API #1255
Conversation
|
With this PR I also wanted to add the documentation described in #1191 |
|
2 out of the 3 current HTTPS test are broken, the first 2 make plain HTTP requests. You should have used |
Could you fix that please? |
Yeah, I'm working on it |
|
I was working on a test for const tls = require('tls');
tls.connect({
host: '127.0.0.1',
port: 49637,
checkServerIdentity: (hostname, certificate) => {
// This is never called for localhost addresses
}
})Of course there's no documentation by Node.JS, there's only a comment in an example: // Necessary only if the server's cert isn't for "localhost".
checkServerIdentity: () => { return null; },I've to keep in mind this when writing the documentation, also the test need to be performed using an external service, we can use https://badssl.com/ |
|
Maybe there's a |
|
Or maybe try setting |
I've tried all of them, same result |
|
I made a mistake, it seems that |
Added some HTTPS tests Changed `PeerCertificate` to `DetailedPeerCertificate`
|
While For example My idea would be to add an HTTPS section to the documentation. |
|
I agree. |
|
This is a first draft of the HTTPS documentation, there're some other parameter. The params that I've included there are the most used. Since |
Co-authored-by: Szymon Marczak <36894700+szmarczak@users.noreply.github.com>
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
|
@sindresorhus If you want to have different names (from the tls module) for the properties related to HTTPS I think that |
Co-authored-by: Szymon Marczak <36894700+szmarczak@users.noreply.github.com>
|
"Deprecation Warning" tests must be serial or else they'll steal each other |
Co-authored-by: Szymon Marczak <36894700+szmarczak@users.noreply.github.com>
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
|
There are a few more unresolved inline comments. |
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
Sorry, I missed them, I was watching only the "Conversation" tab on Github. |
|
This looks great now. Thanks for your hard work on this |
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com> Co-authored-by: Szymon Marczak <36894700+szmarczak@users.noreply.github.com>

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

Checklist
Fixes #1254
checkServerIdentitysignature:According to DefinitelyTyped
certificateisPeerCertificate, but after testing I discovered that certificate has the propertyissuerCertificatethat's mean it'sDetailedPeerCertificateI can't find any documentation about using this property with
https.Requeston Node.JS, I think this is a side effect of the implementation ofhttps.Request. But, on the Node.JS documentation there's an example using it "Example pinning on certificate fingerprint, or the public key (similar to pin-sha256)"Node.JS even have a test about it:
https://github.com/nodejs/node/blob/8b4af64f50c5e41ce0155716f294c24ccdecad03/test/parallel/test-https-client-checkServerIdentity.js