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

Unified Diff: Source/core/frame/SubresourceIntegrity.cpp

Issue 798043002: SRI: Accept dashed hash algorithms. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Feedback. 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 | « no previous file | Source/core/frame/SubresourceIntegrityTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/SubresourceIntegrity.cpp
diff --git a/Source/core/frame/SubresourceIntegrity.cpp b/Source/core/frame/SubresourceIntegrity.cpp
index 0e041528d1f6cfa6a5db2bee128e5e2e9caf9afa..cf196a45b74698f9ebc4ea230502e0aacac3938b 100644
--- a/Source/core/frame/SubresourceIntegrity.cpp
+++ b/Source/core/frame/SubresourceIntegrity.cpp
@@ -167,8 +167,11 @@ bool SubresourceIntegrity::parseAlgorithm(const UChar*& position, const UChar* e
HashAlgorithm algorithm;
} kSupportedPrefixes[] = {
{ "sha256", HashAlgorithmSha256 },
+ { "sha-256", HashAlgorithmSha256 },
{ "sha384", HashAlgorithmSha384 },
- { "sha512", HashAlgorithmSha512 }
+ { "sha-384", HashAlgorithmSha384 },
+ { "sha512", HashAlgorithmSha512 },
+ { "sha-512", HashAlgorithmSha512 }
};
for (auto& prefix : kSupportedPrefixes) {
« no previous file with comments | « no previous file | Source/core/frame/SubresourceIntegrityTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698