| Index: content/child/webcrypto/algorithm_implementation.h
|
| diff --git a/content/child/webcrypto/algorithm_implementation.h b/content/child/webcrypto/algorithm_implementation.h
|
| index ac32413bcb83c4658eba7366fc61f2a6245b1690..aee363b50fd7ae200814597840fb1b2f7f6d88e6 100644
|
| --- a/content/child/webcrypto/algorithm_implementation.h
|
| +++ b/content/child/webcrypto/algorithm_implementation.h
|
| @@ -71,32 +71,17 @@ class AlgorithmImplementation {
|
| const CryptoData& data,
|
| std::vector<uint8_t>* buffer) const;
|
|
|
| - // VerifyKeyUsagesBeforeGenerateKey() must be called prior to
|
| - // GenerateSecretKey() to validate the requested key usages.
|
| - virtual Status VerifyKeyUsagesBeforeGenerateKey(
|
| - blink::WebCryptoKeyUsageMask usage_mask) const;
|
| -
|
| // This method corresponds to Web Crypto's crypto.subtle.generateKey().
|
| - virtual Status GenerateSecretKey(const blink::WebCryptoAlgorithm& algorithm,
|
| - bool extractable,
|
| - blink::WebCryptoKeyUsageMask usage_mask,
|
| - blink::WebCryptoKey* key) const;
|
| -
|
| - // VerifyKeyUsagesBeforeGenerateKeyPair() must be called prior to
|
| - // GenerateKeyPair() to validate the requested key usages.
|
| - virtual Status VerifyKeyUsagesBeforeGenerateKeyPair(
|
| - blink::WebCryptoKeyUsageMask combined_usage_mask,
|
| - blink::WebCryptoKeyUsageMask* public_usage_mask,
|
| - blink::WebCryptoKeyUsageMask* private_usage_mask) const;
|
| -
|
| - // This method corresponds to Web Crypto's crypto.subtle.generateKey().
|
| - virtual Status GenerateKeyPair(
|
| - const blink::WebCryptoAlgorithm& algorithm,
|
| - bool extractable,
|
| - blink::WebCryptoKeyUsageMask public_usage_mask,
|
| - blink::WebCryptoKeyUsageMask private_usage_mask,
|
| - blink::WebCryptoKey* public_key,
|
| - blink::WebCryptoKey* private_key) const;
|
| + // In the case of a symmetric algorithm, the secret key should be written to
|
| + // |*private_key|.
|
| + //
|
| + // Implementations MUST verify |usage_mask| and return an error if it is not
|
| + // appropriate.
|
| + virtual Status GenerateKey(const blink::WebCryptoAlgorithm& algorithm,
|
| + bool extractable,
|
| + blink::WebCryptoKeyUsageMask usage_mask,
|
| + blink::WebCryptoKey* public_key,
|
| + blink::WebCryptoKey* private_key) const;
|
|
|
| // -----------------------------------------------
|
| // Key import
|
|
|