Skip to content

Slighly more robust tofu detection #95

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

Merged
merged 1 commit into from
Jun 27, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/v1/internal/features.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ const FEATURES = {
// This is insane. We are verifying that we have a version of getPeerCertificate
// that supports reading the whole certificate, eg this commit:
// https://github.com/nodejs/node/commit/345c40b6
let desc = require('tls').TLSSocket.prototype.getPeerCertificate.toString();
return desc.startsWith("function getPeerCertificate(detailed)");
let desc = require('tls').TLSSocket.prototype.getPeerCertificate;
return desc.length() >= 1;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's desc.length >= 1, it's a property not a function.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops, thanks

} catch( e ) {
return false;
}
Expand Down