diff options
author | pneubeck <pneubeck@chromium.org> | 2015-03-25 05:02:21 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-03-25 12:03:13 +0000 |
commit | 80709e2614a1530449e0aacb67d85f5b6d8a5db5 (patch) | |
tree | 54ff6ef41432a744cd6e7302b121d39b38e68ffd /chrome/renderer/resources/extensions/platform_keys_custom_bindings.js | |
parent | 3ca6f10de871334d2fe328a174cf296d1cf24ed2 (diff) | |
download | chromium_src-80709e2614a1530449e0aacb67d85f5b6d8a5db5.zip chromium_src-80709e2614a1530449e0aacb67d85f5b6d8a5db5.tar.gz chromium_src-80709e2614a1530449e0aacb67d85f5b6d8a5db5.tar.bz2 |
chrome.platformKeys.getKeyPair: Check requested algorithm against certificate.
This adds a check that the requested algorithm is actually permitted by the certificate as defined in the algorithm field of the Subject Public Key Info.
BUG=466584
Review URL: https://codereview.chromium.org/998293002
Cr-Commit-Position: refs/heads/master@{#322142}
Diffstat (limited to 'chrome/renderer/resources/extensions/platform_keys_custom_bindings.js')
-rw-r--r-- | chrome/renderer/resources/extensions/platform_keys_custom_bindings.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/renderer/resources/extensions/platform_keys_custom_bindings.js b/chrome/renderer/resources/extensions/platform_keys_custom_bindings.js index 9320e02..1f30c1f 100644 --- a/chrome/renderer/resources/extensions/platform_keys_custom_bindings.js +++ b/chrome/renderer/resources/extensions/platform_keys_custom_bindings.js @@ -49,6 +49,10 @@ binding.registerCustomHook(function(api) { apiFunctions.setHandleRequest( 'getKeyPair', function(cert, params, callback) { getPublicKey(cert, params, function(publicKey, algorithm) { + if (chrome.runtime.lastError) { + callback(); + return; + } callback(createPublicKey(publicKey, algorithm), createPrivateKey(publicKey, algorithm)); }); |