mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: crash in ECDH.setPrivateKey (#17219)
This commit is contained in:
@@ -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', () => {
|
||||
|
||||
Reference in New Issue
Block a user