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 d88fc608c92bbff69213b93260b079d5866c4ec1..af4a858ad3146b066d705d20118636c2408456d1 100644 |
--- a/chrome/renderer/resources/extensions/platform_keys/get_public_key.js |
+++ b/chrome/renderer/resources/extensions/platform_keys/get_public_key.js |
@@ -53,14 +53,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; |