chore: eslint and fix up old code

This commit is contained in:
simon 2021-05-28 12:43:20 +02:00
parent 32df57fc1d
commit 6dcc1b7c9d
2 changed files with 3 additions and 5 deletions

View File

@ -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"');

View File

@ -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 {