@@ -311,14 +311,20 @@ if (hasOpenSSL(3, 5)) {
311311 assert . deepStrictEqual ( privateKey . usages , privateUsages ) ;
312312 assert . strictEqual ( publicKey . algorithm . name , name ) ;
313313 assert . strictEqual ( publicKey . algorithm . modulusLength , modulusLength ) ;
314- assert . deepStrictEqual ( publicKey . algorithm . publicExponent , publicExponent ) ;
314+ assert ( publicKey . algorithm . publicExponent instanceof Uint8Array ) ;
315+ assert . notStrictEqual ( publicKey . algorithm . publicExponent , publicExponent ) ;
316+ assert ( ! Buffer . isBuffer ( publicKey . algorithm . publicExponent ) ) ;
317+ assert . deepStrictEqual ( publicKey . algorithm . publicExponent , new Uint8Array ( publicExponent ) ) ;
315318 assert . strictEqual (
316319 KeyObject . from ( publicKey ) . asymmetricKeyDetails . publicExponent ,
317320 bigIntArrayToUnsignedBigInt ( publicExponent ) ) ;
318321 assert . strictEqual ( publicKey . algorithm . hash . name , hash ) ;
319322 assert . strictEqual ( privateKey . algorithm . name , name ) ;
320323 assert . strictEqual ( privateKey . algorithm . modulusLength , modulusLength ) ;
321- assert . deepStrictEqual ( privateKey . algorithm . publicExponent , publicExponent ) ;
324+ assert ( privateKey . algorithm . publicExponent instanceof Uint8Array ) ;
325+ assert . notStrictEqual ( privateKey . algorithm . publicExponent , publicExponent ) ;
326+ assert ( ! Buffer . isBuffer ( privateKey . algorithm . publicExponent ) ) ;
327+ assert . deepStrictEqual ( privateKey . algorithm . publicExponent , new Uint8Array ( publicExponent ) ) ;
322328 assert . strictEqual (
323329 KeyObject . from ( privateKey ) . asymmetricKeyDetails . publicExponent ,
324330 bigIntArrayToUnsignedBigInt ( publicExponent ) ) ;
0 commit comments