roster-server 3.1.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/index.js +1 -1
- package/package.json +1 -1
- package/test/roster-server.test.js +2 -2
package/README.md
CHANGED
|
@@ -272,7 +272,7 @@ const dnsChallenge = {
|
|
|
272
272
|
|
|
273
273
|
Pass this as the constructor's `dnsChallenge` option. To use another provider, install its Greenlock DNS plugin in the consuming application and supply its module name and provider options. Configure DNS timing on that object with `propagationDelay`, `dryRunDelay`, `dnsPollIntervalMs`, and `dnsPollTimeoutMs`; the wrapper's polling interval defaults to `15000` ms.
|
|
274
274
|
|
|
275
|
-
`
|
|
275
|
+
New certificates use an `EC-P256` key by default, which makes each full TLS handshake much cheaper for the server than an RSA key. Clients that cannot negotiate ECDSA, such as Windows XP or Android 2.x, need `serverKeyType: 'RSA-2048'`. The key type applies to certificates issued after it is set: renewal reuses a certificate's existing key, so certificates issued before 3.2.0 keep their RSA key. To move an existing name to the configured key type, remove its directory under `greenlockStorePath/live/` and restart; Roster issues a new certificate on the first connection for that name.
|
|
276
276
|
|
|
277
277
|
Roster's file-based SNI resolvers cache TLS contexts and detect changed certificate files through metadata, including updates from another process. Concurrent requests for the same certificate name share loads and checks. Standalone startup reuses the initialized certificate runtime and Roster's cancellable renewal loop. Loading an existing certificate does not itself force renewal.
|
|
278
278
|
|
|
@@ -299,7 +299,7 @@ Pass operational settings through the constructor, using the consuming applicati
|
|
|
299
299
|
| `isolation` | `true` (`false` with `cluster`) | One process per site directory under `start()`; `false` or `{ restartDelayMs, backlog, helloTimeoutMs }` (defaults `1000`, `511`, `10000`). See [site isolation](#site-isolation). |
|
|
300
300
|
| `tlsMinVersion`, `tlsMaxVersion` | `TLSv1.2`, `TLSv1.3` | Protocol limits for created HTTPS servers. |
|
|
301
301
|
| `keepAliveTimeoutMs` | Node.js default (`5000`) | Idle time before a site server closes a keep-alive connection, in isolated and main-process sites. Set it above the interval at which clients repeat requests so they reuse the connection instead of paying a new TLS handshake. |
|
|
302
|
-
| `serverKeyType` | `
|
|
302
|
+
| `serverKeyType` | `EC-P256` | Key for newly issued certificates: `EC-P256`, `EC-P384`, `RSA-2048`, `RSA-3072`, or `RSA-4096`. See [certificates](#certificates-and-dns). |
|
|
303
303
|
| `skipLocalCheck` | `true` | Skips Greenlock dry-run/local challenge checks. |
|
|
304
304
|
| `dnsChallenge` | CLI wrapper | DNS-01 options or `false`; see [certificates](#certificates-and-dns). |
|
|
305
305
|
| `disableWildcard`, `combineWildcardCerts` | `false`, `false` | Wildcard registration and certificate behavior. |
|
package/index.js
CHANGED
|
@@ -360,7 +360,7 @@ class Roster {
|
|
|
360
360
|
if (this.keepAliveTimeoutMs !== undefined && (!Number.isFinite(this.keepAliveTimeoutMs) || this.keepAliveTimeoutMs <= 0)) {
|
|
361
361
|
throw new TypeError('keepAliveTimeoutMs must be a positive finite number');
|
|
362
362
|
}
|
|
363
|
-
this.serverKeyType = options.serverKeyType ?? '
|
|
363
|
+
this.serverKeyType = options.serverKeyType ?? 'EC-P256';
|
|
364
364
|
if (!SERVER_KEY_TYPES.includes(this.serverKeyType)) {
|
|
365
365
|
throw new TypeError(`serverKeyType must be one of ${SERVER_KEY_TYPES.join(', ')}`);
|
|
366
366
|
}
|
package/package.json
CHANGED
|
@@ -822,8 +822,8 @@ describe('Roster generateConfigJson', () => {
|
|
|
822
822
|
roster.generateConfigJson();
|
|
823
823
|
return JSON.parse(fs.readFileSync(path.join(tmpDir, 'config.json'), 'utf8')).defaults.serverKeyType;
|
|
824
824
|
};
|
|
825
|
-
assert.strictEqual(keyTypeFor({}), '
|
|
826
|
-
assert.strictEqual(keyTypeFor({ serverKeyType: '
|
|
825
|
+
assert.strictEqual(keyTypeFor({}), 'EC-P256');
|
|
826
|
+
assert.strictEqual(keyTypeFor({ serverKeyType: 'RSA-2048' }), 'RSA-2048');
|
|
827
827
|
} finally {
|
|
828
828
|
fs.rmSync(tmpDir, { recursive: true, force: true });
|
|
829
829
|
}
|