diff --git a/src/app.ts b/src/app.ts index 615ba5a..2ee2672 100644 --- a/src/app.ts +++ b/src/app.ts @@ -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"'); diff --git a/src/radius/handler/eap/eapMethods/EAP-TTLS.ts b/src/radius/handler/eap/eapMethods/EAP-TTLS.ts index 92430c5..31aed43 100644 --- a/src/radius/handler/eap/eapMethods/EAP-TTLS.ts +++ b/src/radius/handler/eap/eapMethods/EAP-TTLS.ts @@ -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 {