| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent d615757 commit 9d4a226
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4533,6 +4533,8 @@ void ECDH::Initialize(Environment* env, Local<Object> target) { | |||
| 4533 | 4533 | void ECDH::New(const FunctionCallbackInfo<Value>& args) { | |
| 4534 | 4534 | Environment* env = Environment::GetCurrent(args); | |
| 4535 | 4535 | ||
| 4536 | + MarkPopErrorOnReturn mark_pop_error_on_return; | ||
| 4537 | + | ||
| 4536 | 4538 | // TODO(indutny): Support raw curves? | |
| 4537 | 4539 | CHECK(args[0]->IsString()); | |
| 4538 | 4540 | node::Utf8Value curve(env->isolate(), args[0]); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -159,6 +159,11 @@ var secret2 = ecdh2.computeSecret(key1, 'binary', 'buffer'); | |||
| 159 | 159 | ||
| 160 | 160 | assert.equal(secret1, secret2.toString('base64')); | |
| 161 | 161 | ||
| 162 | + // Oakley curves do not clean up ERR stack, it was causing unexpected failure | ||
| 163 | + // when accessing other OpenSSL APIs afterwards. | ||
| 164 | + crypto.createECDH('Oakley-EC2N-3'); | ||
| 165 | + crypto.createHash('sha256'); | ||
| 166 | + | ||
| 162 | 167 | // Point formats | |
| 163 | 168 | assert.equal(ecdh1.getPublicKey('buffer', 'uncompressed')[0], 4); | |
| 164 | 169 | var firstByte = ecdh1.getPublicKey('buffer', 'compressed')[0]; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments