Index: chrome/renderer/resources/extensions/platform_keys/get_public_key.js |
diff --git a/chrome/renderer/resources/extensions/platform_keys/get_public_key.js b/chrome/renderer/resources/extensions/platform_keys/get_public_key.js |
index 4803f2d201ed6851cb86a9370014b06717d34043..8aadf0f57b021db23a8f4e10288eca4100db771b 100644 |
--- a/chrome/renderer/resources/extensions/platform_keys/get_public_key.js |
+++ b/chrome/renderer/resources/extensions/platform_keys/get_public_key.js |
@@ -47,14 +47,15 @@ function combineAlgorithms(algorithm, importParams) { |
function getPublicKey(cert, importParams, callback) { |
importParams = normalizeImportParams(importParams); |
- // TODO(pneubeck): pass importParams.name to the internal getPublicKey and |
- // verify on the C++ side that the requested algorithm is compatible with the |
- // given SubjectPublicKeyInfo of the certificate. |
- // https://crbug.com/466584 |
- internalAPI.getPublicKey(cert, function(publicKey, algorithm) { |
- var combinedAlgorithm = combineAlgorithms(algorithm, importParams); |
- callback(publicKey, combinedAlgorithm); |
- }); |
+ internalAPI.getPublicKey( |
+ cert, importParams.name, function(publicKey, algorithm) { |
+ if (chrome.runtime.lastError) { |
+ callback(); |
+ return; |
+ } |
+ var combinedAlgorithm = combineAlgorithms(algorithm, importParams); |
+ callback(publicKey, combinedAlgorithm); |
+ }); |
} |
exports.getPublicKey = getPublicKey; |