You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are 3 tests that validate privateNodeRSA object when instead they should validate publicNodeRSA.
it('should gracefully handle data outside of encapsulation boundaries for pkcs8 public keys', function () {
let publicFileWithNoise = 'Lorem ipsum' + fs.readFileSync(keysFolder + 'public_pkcs8.pem') + 'dulce et decorum';
let publicNodeRSA = new NodeRSA(publicFileWithNoise);
assert.instanceOf(privateNodeRSA.keyPair, Object); <== It should be publicNodeRSA
assert(publicNodeRSA.isPublic());
assert(publicNodeRSA.isPublic(true));
assert(!publicNodeRSA.isPrivate());
});