Subsystem
Web Cryptography API
What steps will reproduce the bug?
constkp=awaitcrypto.subtle.generateKey('Ed25519',true,['sign','verify']);kp.privateKey.usages.pop()constsig=awaitcrypto.subtle.sign('Ed25519',kp.privateKey,newUint8Array())// DOMException [InvalidAccessError]: Unable to use this key to sign// at signVerify (node:internal/crypto/webcrypto:765:11)// at SubtleCrypto.sign (node:internal/crypto/webcrypto:811:10)What is the expected behavior? Why is that the expected behavior?
per the spec, cached copies of the internal slots are returned from these getters and only internal slots are used in the SubtleCrypto operations
What do you see instead?
the actual internal slots are returned, modifying them results in observable changes in behaviour when using the modified CryptoKey
Subsystem
Web Cryptography API
What steps will reproduce the bug?
What is the expected behavior? Why is that the expected behavior?
per the spec, cached copies of the internal slots are returned from these getters and only internal slots are used in the SubtleCrypto operations
What do you see instead?
the actual internal slots are returned, modifying them results in observable changes in behaviour when using the modified CryptoKey