-
-
Notifications
You must be signed in to change notification settings - Fork 23k
Set max SSL fragment size in Express #3082
Copy link
Copy link
Closed
Labels
Description
I'm using express to set up an HTTPS server for some embedded devices. However, due to the lack of computing capabilities, the default SSL fragment size 16384 is too large for these devices. I wonder how I can change this size in express.
I found that in tls modules, TLSSocket class has a method tlsSocket.setMaxSendFragment(size) which may work, but I can't find out how to use it in Express.
This is how my server is established:
var app = require('express')();
var cert_path = '/home/houlu/Programs/Node/http/ssl/';
var privateKey = fs.readFileSync(cert_path+'server.key', 'utf8');
var certificate = fs.readFileSync(cert_path+'server.crt', 'utf8');
var credentials = {key: privateKey, cert: certificate};
httpsServer = https.createServer(credentials, app);
Thanks a lot! :-)
Reactions are currently unavailable