Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(455)

Unified Diff: components/webcrypto/algorithms/asymmetric_key_util.h

Issue 2163053002: [webcrypto] Check for empty key usages *after* key creation rather than before, to match the spec's… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/webcrypto/algorithms/aes.cc ('k') | components/webcrypto/algorithms/asymmetric_key_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/webcrypto/algorithms/asymmetric_key_util.h
diff --git a/components/webcrypto/algorithms/asymmetric_key_util.h b/components/webcrypto/algorithms/asymmetric_key_util.h
index 51ed79a8d13f19d056da48314c3a520ba5f17e97..ee067b0eed73153844b02e2d619c1fc91d78bc4d 100644
--- a/components/webcrypto/algorithms/asymmetric_key_util.h
+++ b/components/webcrypto/algorithms/asymmetric_key_util.h
@@ -32,19 +32,6 @@ Status CreateWebCryptoPrivateKey(crypto::ScopedEVP_PKEY private_key,
blink::WebCryptoKeyUsageMask usages,
blink::WebCryptoKey* key);
-// Checks that a private key can be created using |actual_usages|, where
-// |all_possible_usages| is the full set of allowed private key usages. Note
-// that private keys are not allowed to have empty usages.
-Status CheckPrivateKeyCreationUsages(
- blink::WebCryptoKeyUsageMask all_possible_usages,
- blink::WebCryptoKeyUsageMask actual_usages);
-
-// Checks that a public key can be created using |actual_usages|, where
-// |all_possible_usages| is the full set of allowed public key usages
-Status CheckPublicKeyCreationUsages(
- blink::WebCryptoKeyUsageMask all_possible_usages,
- blink::WebCryptoKeyUsageMask actual_usages);
-
// Imports SPKI bytes to an EVP_PKEY for a public key. The resulting asymmetric
// key may be invalid, and should be verified using something like
// RSA_check_key(). The only validation performed by this function is to ensure
@@ -61,13 +48,6 @@ Status ImportUnverifiedPkeyFromPkcs8(const CryptoData& key_data,
int expected_pkey_id,
crypto::ScopedEVP_PKEY* pkey);
-// Verifies that |usages| is valid when importing a key of the given format.
-Status VerifyUsagesBeforeImportAsymmetricKey(
- blink::WebCryptoKeyFormat format,
- blink::WebCryptoKeyUsageMask all_public_key_usages,
- blink::WebCryptoKeyUsageMask all_private_key_usages,
- blink::WebCryptoKeyUsageMask usages);
-
// Splits the combined usages given to GenerateKey() into the respective usages
// for the public key and private key. Returns an error if the usages are
// invalid.
« no previous file with comments | « components/webcrypto/algorithms/aes.cc ('k') | components/webcrypto/algorithms/asymmetric_key_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698