chore: eslint and fix up old code

master
simon 3 years ago
parent 32df57fc1d
commit 6dcc1b7c9d

@ -9,7 +9,7 @@ import { startTLSServer } from './tls/crypt';
/* test node version */
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.log('min version supported is node js 14. run "sudo npx n 14"');

@ -23,12 +23,10 @@ import { secret } from '../../../../../config';
const log = debug('radius:eap:ttls');
function tlsHasExportKeyingMaterial(
tlsSocket
): tlsSocket is {
function tlsHasExportKeyingMaterial(tlsSocket): tlsSocket is {
exportKeyingMaterial: (length: number, label: string, context?: Buffer) => Buffer;
} {
return typeof (tlsSocket as any).exportKeyingMaterial === 'function';
return typeof tlsSocket.exportKeyingMaterial === 'function';
}
interface IAVPEntry {

Loading…
Cancel
Save