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

Unified Diff: content/child/webcrypto/webcrypto_util.h

Issue 787123003: Refactor: Extract some duplicated code for verifying usages during import of asymmetric key. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 years 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 | « content/child/webcrypto/openssl/rsa_key_openssl.cc ('k') | content/child/webcrypto/webcrypto_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/webcrypto/webcrypto_util.h
diff --git a/content/child/webcrypto/webcrypto_util.h b/content/child/webcrypto/webcrypto_util.h
index fdfea99316d02933d3d9f503f25b09f6beb630a6..8b8e2195e2e677796e682a454a51db85231c75ba 100644
--- a/content/child/webcrypto/webcrypto_util.h
+++ b/content/child/webcrypto/webcrypto_util.h
@@ -81,6 +81,13 @@ Status GetRsaKeyGenParameters(
unsigned int* public_exponent,
unsigned int* modulus_length_bits);
+// 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);
+
} // namespace webcrypto
} // namespace content
« no previous file with comments | « content/child/webcrypto/openssl/rsa_key_openssl.cc ('k') | content/child/webcrypto/webcrypto_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698