We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents fa06ca1 + fbeed19 commit 1f43734Copy full SHA for 1f43734
src/v1/internal/features.js
@@ -26,8 +26,8 @@ const FEATURES = {
26
// This is insane. We are verifying that we have a version of getPeerCertificate
27
// that supports reading the whole certificate, eg this commit:
28
// https://github.com/nodejs/node/commit/345c40b6
29
- let desc = require('tls').TLSSocket.prototype.getPeerCertificate.toString();
30
- return desc.startsWith("function getPeerCertificate(detailed)");
+ let desc = require('tls').TLSSocket.prototype.getPeerCertificate;
+ return desc.length() >= 1;
31
} catch( e ) {
32
return false;
33
}
0 commit comments