Chromium Code Reviews| Index: content/child/webcrypto/webcrypto_util.cc | 
| diff --git a/content/child/webcrypto/webcrypto_util.cc b/content/child/webcrypto/webcrypto_util.cc | 
| index 3058d0abe3bea972436c3770dadbed2f31b6a39d..e2839c49fa3b42c634f0be8465410ce64fd3e611 100644 | 
| --- a/content/child/webcrypto/webcrypto_util.cc | 
| +++ b/content/child/webcrypto/webcrypto_util.cc | 
| @@ -256,20 +256,26 @@ blink::WebCryptoAlgorithm CreateHmacImportAlgorithm( | 
| new blink::WebCryptoHmacImportParams(CreateAlgorithm(hash_id))); | 
| } | 
| -blink::WebCryptoAlgorithm CreateRsaSsaImportAlgorithm( | 
| +blink::WebCryptoAlgorithm CreateRsaHashedImportAlgorithm( | 
| + blink::WebCryptoAlgorithmId id, | 
| blink::WebCryptoAlgorithmId hash_id) { | 
| DCHECK(IsHashAlgorithm(hash_id)); | 
| + DCHECK(id == blink::WebCryptoAlgorithmIdRsaSsaPkcs1v1_5 || | 
| + id == blink::WebCryptoAlgorithmIdRsaOaep); | 
| 
 
Ryan Sleevi
2014/03/14 20:54:11
No PSS?
 
eroman
2014/03/14 21:16:25
Not yet defined in blink, so no ID for such. Will
 
 | 
| return blink::WebCryptoAlgorithm::adoptParamsAndCreate( | 
| - blink::WebCryptoAlgorithmIdRsaSsaPkcs1v1_5, | 
| - new blink::WebCryptoRsaHashedImportParams(CreateAlgorithm(hash_id))); | 
| + id, new blink::WebCryptoRsaHashedImportParams(CreateAlgorithm(hash_id))); | 
| +} | 
| + | 
| +blink::WebCryptoAlgorithm CreateRsaSsaImportAlgorithm( | 
| + blink::WebCryptoAlgorithmId hash_id) { | 
| + return CreateRsaHashedImportAlgorithm( | 
| + blink::WebCryptoAlgorithmIdRsaSsaPkcs1v1_5, hash_id); | 
| } | 
| blink::WebCryptoAlgorithm CreateRsaOaepImportAlgorithm( | 
| blink::WebCryptoAlgorithmId hash_id) { | 
| - DCHECK(IsHashAlgorithm(hash_id)); | 
| - return blink::WebCryptoAlgorithm::adoptParamsAndCreate( | 
| - blink::WebCryptoAlgorithmIdRsaOaep, | 
| - new blink::WebCryptoRsaHashedImportParams(CreateAlgorithm(hash_id))); | 
| + return CreateRsaHashedImportAlgorithm(blink::WebCryptoAlgorithmIdRsaOaep, | 
| + hash_id); | 
| } | 
| unsigned int ShaBlockSizeBytes(blink::WebCryptoAlgorithmId hash_id) { |