Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'Get DH param info': (test: any) => {
var dh = ''; // fs.readFileSync('./test/fixtures/test.dh').toString();
pem.getDhparamInfo(dh, (error: any, data: any) => {
var size = data && data.size || 0;
var prime = (data && data.prime || '').toString();
test.ifError(error);
test.equal(size, 1024);
test.ok(prime);
// test.ok(fs.readdirSync('./tmp').length === 0);
test.equal(typeof size, 'number');
test.ok(/([0-9a-f][0-9a-f]:)+[0-9a-f][0-9a-f]$/g.test(prime));
test.done();
});
},
'Get DH param info': (test: any) => {
const dh = ''; // fs.readFileSync('./test/fixtures/test.dh').toString();
pem.getDhparamInfo(dh, (error: any, data: any) => {
const size = data && data.size || 0;
const prime = (data && data.prime || '').toString();
test.ifError(error);
test.equal(size, 1024);
test.ok(prime);
// test.ok(fs.readdirSync('./tmp').length === 0);
test.equal(typeof size, 'number');
test.ok(/([0-9a-f][0-9a-f]:)+[0-9a-f][0-9a-f]$/g.test(prime));
test.done();
});
},