tls.js 1.5 KB

12345678910111213141516171819202122
  1. var tls = require("tls");
  2. var promisify = require("./_promisify.js");
  3. var bind = function(c, f) { return f && f.bind(c); };
  4. Object.defineProperties(module.exports, {
  5. CLIENT_RENEG_LIMIT: { enumerable: true, value: tls.CLIENT_RENEG_LIMIT },
  6. CLIENT_RENEG_WINDOW: { enumerable: true, value: tls.CLIENT_RENEG_WINDOW },
  7. DEFAULT_CIPHERS: { enumerable: true, value: tls.DEFAULT_CIPHERS },
  8. DEFAULT_ECDH_CURVE: { enumerable: true, value: tls.DEFAULT_ECDH_CURVE },
  9. SLAB_BUFFER_SIZE: { enumerable: true, value: tls.SLAB_BUFFER_SIZE },
  10. SecureContext: { enumerable: true, value: tls.SecureContext },
  11. Server: { enumerable: true, value: tls.Server },
  12. TLSSocket: { enumerable: true, value: tls.TLSSocket },
  13. checkServerIdentity: { enumerable: true, value: bind(tls, tls.checkServerIdentity) },
  14. connect: { enumerable: true, value: promisify(tls, tls.connect, 1, {"returnsObject":true}) },
  15. convertALPNProtocols: { enumerable: true, value: bind(tls, tls.convertALPNProtocols) },
  16. convertNPNProtocols: { enumerable: true, value: bind(tls, tls.convertNPNProtocols) },
  17. createSecureContext: { enumerable: true, value: bind(tls, tls.createSecureContext) },
  18. createSecurePair: { enumerable: true, value: bind(tls, tls.createSecurePair) },
  19. createServer: { enumerable: true, value: promisify(tls, tls.createServer, 1, {"returnsObject":true}) },
  20. getCiphers: { enumerable: true, value: bind(tls, tls.getCiphers) },
  21. parseCertString: { enumerable: true, value: bind(tls, tls.parseCertString) },
  22. });