| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 66ae9f4 commit 7d9e994
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -828,12 +828,7 @@ Maybe<void> ExportJWKEcKey( | |||
| 828 | 828 | ||
| 829 | 829 | if (key->GetKeyType() == kKeyTypePrivate) { | |
| 830 | 830 | const BIGNUM* pvt = EC_KEY_get0_private_key(ec); | |
| 831 | - return SetEncodedValue( | ||
| 832 | - env, | ||
| 833 | - target, | ||
| 834 | - env->jwk_d_string(), | ||
| 835 | - pvt, | ||
| 836 | - degree_bytes).IsJust() ? JustVoid() : Nothing<void>(); | ||
| 831 | + return SetEncodedValue(env, target, env->jwk_d_string(), pvt, degree_bytes); | ||
| 837 | 832 | } | |
| 838 | 833 | ||
| 839 | 834 | return JustVoid(); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -604,22 +604,22 @@ MaybeLocal<Value> EncodeBignum( | |||
| 604 | 604 | error); | |
| 605 | 605 | } | |
| 606 | 606 | ||
| 607 | - Maybe<bool> SetEncodedValue( | ||
| 608 | - Environment* env, | ||
| 609 | - Local<Object> target, | ||
| 610 | - Local<String> name, | ||
| 611 | - const BIGNUM* bn, | ||
| 612 | - int size) { | ||
| 607 | + Maybe<void> SetEncodedValue(Environment* env, | ||
| 608 | + Local<Object> target, | ||
| 609 | + Local<String> name, | ||
| 610 | + const BIGNUM* bn, | ||
| 611 | + int size) { | ||
| 613 | 612 | Local<Value> value; | |
| 614 | 613 | Local<Value> error; | |
| 615 | 614 | CHECK_NOT_NULL(bn); | |
| 616 | 615 | if (size == 0) size = BignumPointer::GetByteCount(bn); | |
| 617 | 616 | if (!EncodeBignum(env, bn, size, &error).ToLocal(&value)) { | |
| 618 | 617 | if (!error.IsEmpty()) | |
| 619 | 618 | env->isolate()->ThrowException(error); | |
| 620 | - return Nothing<bool>(); | ||
| 619 | + return Nothing<void>(); | ||
| 621 | 620 | } | |
| 622 | - return target->Set(env->context(), name, value); | ||
| 621 | + return target->Set(env->context(), name, value).IsJust() ? JustVoid() | ||
| 622 | + : Nothing<void>(); | ||
| 623 | 623 | } | |
| 624 | 624 | ||
| 625 | 625 | bool SetRsaOaepLabel(const EVPKeyCtxPointer& ctx, const ByteSource& label) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -713,12 +713,11 @@ v8::MaybeLocal<v8::Value> EncodeBignum( | |||
| 713 | 713 | int size, | |
| 714 | 714 | v8::Local<v8::Value>* error); | |
| 715 | 715 | ||
| 716 | - v8::Maybe<bool> SetEncodedValue( | ||
| 717 | - Environment* env, | ||
| 718 | - v8::Local<v8::Object> target, | ||
| 719 | - v8::Local<v8::String> name, | ||
| 720 | - const BIGNUM* bn, | ||
| 721 | - int size = 0); | ||
| 716 | + v8::Maybe<void> SetEncodedValue(Environment* env, | ||
| 717 | + v8::Local<v8::Object> target, | ||
| 718 | + v8::Local<v8::String> name, | ||
| 719 | + const BIGNUM* bn, | ||
| 720 | + int size = 0); | ||
| 722 | 721 | ||
| 723 | 722 | bool SetRsaOaepLabel(const EVPKeyCtxPointer& rsa, const ByteSource& label); | |
| 724 | 723 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments