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

Unified Diff: content/renderer/webcrypto_impl.cc

Issue 24616003: Implement verify() for HMAC using NSS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_build_sh
Patch Set: Rebase. Created 7 years, 3 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 | « content/renderer/webcrypto_impl.h ('k') | content/renderer/webcrypto_impl_nss.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/webcrypto_impl.cc
diff --git a/content/renderer/webcrypto_impl.cc b/content/renderer/webcrypto_impl.cc
index b0fc14f5f8731d40220a3a0ae1b98fd5e95e000e..f6f77badee4ead6dce2fe3aba1506ba15a903338 100644
--- a/content/renderer/webcrypto_impl.cc
+++ b/content/renderer/webcrypto_impl.cc
@@ -71,4 +71,26 @@ void WebCryptoImpl::sign(
}
}
+void WebCryptoImpl::verifySignature(
+ const WebKit::WebCryptoAlgorithm& algorithm,
+ const WebKit::WebCryptoKey& key,
+ const unsigned char* signature,
+ unsigned signature_size,
+ const unsigned char* data,
+ unsigned data_size,
+ WebKit::WebCryptoResult result) {
+ bool signature_match = false;
+ if (!VerifySignatureInternal(algorithm,
+ key,
+ signature,
+ signature_size,
+ data,
+ data_size,
+ &signature_match)) {
+ result.completeWithError();
+ } else {
+ result.completeWithBoolean(signature_match);
+ }
+}
+
} // namespace content
« no previous file with comments | « content/renderer/webcrypto_impl.h ('k') | content/renderer/webcrypto_impl_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698