Commit 6dcc1b7c authored by simon's avatar simon

chore: eslint and fix up old code

parent 32df57fc
...@@ -9,7 +9,7 @@ import { startTLSServer } from './tls/crypt'; ...@@ -9,7 +9,7 @@ import { startTLSServer } from './tls/crypt';
/* test node version */ /* test node version */
const testSocket = startTLSServer(); const testSocket = startTLSServer();
if (typeof (testSocket.tls as any).exportKeyingMaterial !== 'function') { if (typeof testSocket.tls.exportKeyingMaterial !== 'function') {
console.error(`UNSUPPORTED NODE VERSION (${process.version}) FOUND!!`); console.error(`UNSUPPORTED NODE VERSION (${process.version}) FOUND!!`);
console.log('min version supported is node js 14. run "sudo npx n 14"'); console.log('min version supported is node js 14. run "sudo npx n 14"');
......
...@@ -23,12 +23,10 @@ import { secret } from '../../../../../config'; ...@@ -23,12 +23,10 @@ import { secret } from '../../../../../config';
const log = debug('radius:eap:ttls'); const log = debug('radius:eap:ttls');
function tlsHasExportKeyingMaterial( function tlsHasExportKeyingMaterial(tlsSocket): tlsSocket is {
tlsSocket
): tlsSocket is {
exportKeyingMaterial: (length: number, label: string, context?: Buffer) => Buffer; exportKeyingMaterial: (length: number, label: string, context?: Buffer) => Buffer;
} { } {
return typeof (tlsSocket as any).exportKeyingMaterial === 'function'; return typeof tlsSocket.exportKeyingMaterial === 'function';
} }
interface IAVPEntry { interface IAVPEntry {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment