diff options
| author | Jannis R <mail@jannisr.de> | 2020-05-02 15:41:32 +0200 |
|---|---|---|
| committer | Jannis R <mail@jannisr.de> | 2020-05-02 16:36:09 +0200 |
| commit | 58d2e4c5e17b3306e35e7a8e28cce5cc4eb74f26 (patch) | |
| tree | 44fd76efa940862b38442fa8926d6a0092268487 /server.js | |
| parent | 1b5af6f4bdfca939e780ae70bd6e1819425824f7 (diff) | |
basic client
Diffstat (limited to 'server.js')
| -rw-r--r-- | server.js | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -4,7 +4,10 @@ const {createServer: createTlsServer} = require('tls') const {EventEmitter} = require('events') const createParser = require('./lib/request-parser') const createResponse = require('./lib/response') -const {ALPN_ID} = require('./lib/util') +const { + ALPN_ID, + MIN_TLS_VERSION, +} = require('./lib/util') const createGeminiServer = (opt = {}, onRequest) => { if (typeof opt === 'function') { @@ -59,10 +62,7 @@ const createGeminiServer = (opt = {}, onRequest) => { const server = createTlsServer({ ALPNProtocols: [ALPN_ID], - // https://gemini.circumlunar.space/docs/spec-spec.txt, 1.4.1 - // > Servers MUST use TLS version 1.2 or higher and SHOULD use TLS version - // > 1.3 or higher. - minVersion: 'TLSv1.2', + minVersion: MIN_TLS_VERSION, requestCert: !!alwaysRequireClientCert, // > Gemini requests typically will be made without a client // > certificate being sent to the server. If a requested resource |
