Skip to content

Commit 34f2531

Browse files
committed
fixup! throw
1 parent 00b4cf8 commit 34f2531

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/crypto/crypto_rsa.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,10 @@ KeyObjectData ImportJWKRsaKey(Environment* env,
385385
KeyType type = d_value->IsString() ? kKeyTypePrivate : kKeyTypePublic;
386386

387387
RSAPointer rsa(RSA_new());
388-
if (!rsa) return {};
388+
if (!rsa) {
389+
THROW_ERR_CRYPTO_OPERATION_FAILED(env, "Unable to create RSA pointer");
390+
return {};
391+
}
389392

390393
ncrypto::Rsa rsa_view(rsa.get());
391394

0 commit comments

Comments
 (0)