Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 13fb05e

Browse filesBrowse files
panvaRafaelGSS
authored andcommitted
crypto: handle unsupported AES ciphers in webcrypto
Refs: electron/electron#36256 PR-URL: #45321 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Shelley Vohr <shelley.vohr@gmail.com>
1 parent 8e7f9de commit 13fb05e
Copy full SHA for 13fb05e

File tree

Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed
Open diff view settings
Collapse file

‎src/crypto/crypto_aes.cc‎

Copy file name to clipboardExpand all lines: src/crypto/crypto_aes.cc
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,10 @@ Maybe<bool> AESCipherTraits::AdditionalConfig(
556556
}
557557

558558
params->cipher = EVP_get_cipherbynid(cipher_nid);
559-
CHECK_NOT_NULL(params->cipher);
559+
if (params->cipher == nullptr) {
560+
THROW_ERR_CRYPTO_UNKNOWN_CIPHER(env);
561+
return Nothing<bool>();
562+
}
560563

561564
if (params->iv.size() <
562565
static_cast<size_t>(EVP_CIPHER_iv_length(params->cipher))) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.