fix: crash in ECDH.setPrivateKey (#17219)
This commit is contained in:
parent
5afb7dc715
commit
34fb6c2f35
3 changed files with 27 additions and 0 deletions
|
@ -487,6 +487,13 @@ describe('node feature', () => {
|
|||
expect(dh.getPrime()).to.be.an.instanceof(Buffer)
|
||||
expect(dh.getGenerator()).to.be.an.instanceof(Buffer)
|
||||
})
|
||||
|
||||
it('should not crash when creating an ECDH cipher', () => {
|
||||
const crypto = require('crypto')
|
||||
const dh = crypto.createECDH('prime256v1')
|
||||
dh.generateKeys()
|
||||
dh.setPrivateKey(dh.getPrivateKey())
|
||||
})
|
||||
})
|
||||
|
||||
it('includes the electron version in process.versions', () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue