@@ -108,10 +108,12 @@ const sec1EncExp = (cipher) => getRegExpForPEM('EC PRIVATE KEY', cipher);
108
108
assert . strictEqual ( typeof publicKey , 'object' ) ;
109
109
assert . strictEqual ( publicKey . type , 'public' ) ;
110
110
assert . strictEqual ( publicKey . asymmetricKeyType , 'rsa' ) ;
111
+ assert . strictEqual ( publicKey . asymmetricKeySize , 64 ) ;
111
112
112
113
assert . strictEqual ( typeof privateKey , 'object' ) ;
113
114
assert . strictEqual ( privateKey . type , 'private' ) ;
114
115
assert . strictEqual ( privateKey . asymmetricKeyType , 'rsa' ) ;
116
+ assert . strictEqual ( publicKey . asymmetricKeySize , 64 ) ;
115
117
}
116
118
117
119
{
@@ -453,6 +455,7 @@ const sec1EncExp = (cipher) => getRegExpForPEM('EC PRIVATE KEY', cipher);
453
455
assert . strictEqual ( typeof publicKey , 'object' ) ;
454
456
assert . strictEqual ( publicKey . type , 'public' ) ;
455
457
assert . strictEqual ( publicKey . asymmetricKeyType , 'rsa' ) ;
458
+ assert . strictEqual ( publicKey . asymmetricKeySize , 128 ) ;
456
459
457
460
// The private key should still be a string.
458
461
assert . strictEqual ( typeof privateKey , 'string' ) ;
@@ -477,6 +480,7 @@ const sec1EncExp = (cipher) => getRegExpForPEM('EC PRIVATE KEY', cipher);
477
480
assert . strictEqual ( typeof privateKey , 'object' ) ;
478
481
assert . strictEqual ( privateKey . type , 'private' ) ;
479
482
assert . strictEqual ( privateKey . asymmetricKeyType , 'rsa' ) ;
483
+ assert . strictEqual ( privateKey . asymmetricKeySize , 128 ) ;
480
484
481
485
testEncryptDecrypt ( publicKey , privateKey ) ;
482
486
testSignVerify ( publicKey , privateKey ) ;
0 commit comments