Repository: nodejs/node
Pull request: tls: make server.prototype.setOptions end-of-life

This have been runtime deprecated since v12, and has a good recommendation. I think we should EOL.

Since it is semver-major, this PR requires at least 2 @nodejs/tsc approvals to land.

Changed files:
filename: doc/api/deprecations.md
patch: @@ -2563,12 +2563,15 @@ generally useful and is being removed. See discussion here:
 
 <!-- YAML
 changes:
+  - version: REPLACEME
+    pr-url: https://github.com/nodejs/node/pull/57339
+    description: End-of-Life.
   - version: v12.0.0
     pr-url: https://github.com/nodejs/node/pull/23820
     description: Runtime deprecation.
 -->
 
-Type: Runtime
+Type: End-of-Life
 
 Please use `Server.prototype.setSecureContext()` instead.
 

filename: lib/_tls_wrap.js
patch: @@ -33,7 +33,6 @@ const {
 
 const {
   assertCrypto,
-  deprecate,
   kEmptyObject,
 } = require('internal/util');
 
@@ -1537,53 +1536,6 @@ Server.prototype.setTicketKeys = function setTicketKeys(keys) {
   this._sharedCreds.context.setTicketKeys(keys);
 };
 
-
-Server.prototype.setOptions = deprecate(function(options) {
-  this.requestCert = options.requestCert === true;
-  this.rejectUnauthorized = options.rejectUnauthorized !== false;
-
-  if (options.pfx) this.pfx = options.pfx;
-  if (options.key) this.key = options.key;
-  if (options.passphrase) this.passphrase = options.passphrase;
-  if (options.cert) this.cert = options.cert;
-  if (options.clientCertEngine)
-    this.clientCertEngine = options.clientCertEngine;
-  if (options.ca) this.ca = options.ca;
-  if (options.minVersion) this.minVersion = options.minVersion;
-  if (options.maxVersion) this.maxVersion = options.maxVersion;
-  if (options.secureProtocol) this.secureProtocol = options.secureProtocol;
-  if (options.crl) this.crl = options.crl;
-  if (options.ciphers) this.ciphers = options.ciphers;
-  if (options.ecdhCurve !== undefined)
-    this.ecdhCurve = options.ecdhCurve;
-  if (options.dhparam) this.dhparam = options.dhparam;
-  if (options.sessionTimeout) this.sessionTimeout = options.sessionTimeout;
-  if (options.ticketKeys) this.ticketKeys = options.ticketKeys;
-  const secureOptions = options.secureOptions || 0;
-  if (options.honorCipherOrder !== undefined)
-    this.honorCipherOrder = !!options.honorCipherOrder;
-  else
-    this.honorCipherOrder = true;
-  if (secureOptions) this.secureOptions = secureOptions;
-  if (options.ALPNProtocols)
-    tls.convertALPNProtocols(options.ALPNProtocols, this);
-  if (options.sessionIdContext) {
-    this.sessionIdContext = options.sessionIdContext;
-  } else {
-    this.sessionIdContext = crypto.createHash('sha1')
-      .update(process.argv.join(' '))
-      .digest('hex')
-      .slice(0, 32);
-  }
-  if (options.pskCallback) this[kPskCallback] = options.pskCallback;
-  if (options.pskIdentityHint) this[kPskIdentityHint] = options.pskIdentityHint;
-  if (options.sigalgs) this.sigalgs = options.sigalgs;
-  if (options.privateKeyIdentifier !== undefined)
-    this.privateKeyIdentifier = options.privateKeyIdentifier;
-  if (options.privateKeyEngine !== undefined)
-    this.privateKeyEngine = options.privateKeyEngine;
-}, 'Server.prototype.setOptions() is deprecated', 'DEP0122');
-
 // SNI Contexts High-Level API
 Server.prototype.addContext = function(servername, context) {
   if (!servername) {

filename: test/parallel/test-tls-server-setoptions-clientcertengine.js
patch: @@ -1,18 +0,0 @@
-'use strict';
-const common = require('../common');
-
-if (!common.hasCrypto)
-  common.skip('missing crypto');
-
-const assert = require('assert');
-const tls = require('tls');
-
-{
-  const server = tls.createServer();
-  assert.strictEqual(server.clientCertEngine, undefined);
-  common.expectWarning('DeprecationWarning',
-                       'Server.prototype.setOptions() is deprecated',
-                       'DEP0122');
-  server.setOptions({ clientCertEngine: 'Cannonmouth' });
-  assert.strictEqual(server.clientCertEngine, 'Cannonmouth');
-}