@@ -309,7 +309,7 @@ describe('NodeRSA', function () {
309
309
310
310
it ( 'should load public key from (not trimmed) PKCS8-PEM string' , function ( ) {
311
311
publicNodeRSA = new NodeRSA ( publicKeyPEMNotTrimmed ) ;
312
- assert . instanceOf ( privateNodeRSA . keyPair , Object ) ;
312
+ assert . instanceOf ( publicNodeRSA . keyPair , Object ) ;
313
313
assert ( publicNodeRSA . isPublic ( ) ) ;
314
314
assert ( publicNodeRSA . isPublic ( true ) ) ;
315
315
assert ( ! publicNodeRSA . isPrivate ( ) ) ;
@@ -345,7 +345,7 @@ describe('NodeRSA', function () {
345
345
it ( 'should gracefully handle data outside of encapsulation boundaries for pkcs1 public keys' , function ( ) {
346
346
let publicFileWithNoise = 'Lorem ipsum' + fs . readFileSync ( keysFolder + 'public_pkcs1.pem' ) + 'dulce et decorum' ;
347
347
let publicNodeRSA = new NodeRSA ( publicFileWithNoise ) ;
348
- assert . instanceOf ( privateNodeRSA . keyPair , Object ) ;
348
+ assert . instanceOf ( publicNodeRSA . keyPair , Object ) ;
349
349
assert ( publicNodeRSA . isPublic ( ) ) ;
350
350
assert ( publicNodeRSA . isPublic ( true ) ) ;
351
351
assert ( ! publicNodeRSA . isPrivate ( ) ) ;
@@ -360,7 +360,7 @@ describe('NodeRSA', function () {
360
360
it ( 'should gracefully handle data outside of encapsulation boundaries for pkcs8 public keys' , function ( ) {
361
361
let publicFileWithNoise = 'Lorem ipsum' + fs . readFileSync ( keysFolder + 'public_pkcs8.pem' ) + 'dulce et decorum' ;
362
362
let publicNodeRSA = new NodeRSA ( publicFileWithNoise ) ;
363
- assert . instanceOf ( privateNodeRSA . keyPair , Object ) ;
363
+ assert . instanceOf ( publicNodeRSA . keyPair , Object ) ;
364
364
assert ( publicNodeRSA . isPublic ( ) ) ;
365
365
assert ( publicNodeRSA . isPublic ( true ) ) ;
366
366
assert ( ! publicNodeRSA . isPrivate ( ) ) ;
0 commit comments