Implement verify() for HMAC using NSS

BUG=245025

Review URL: https://codereview.chromium.org/24616003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@225589 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/content/renderer/webcrypto_impl.cc b/content/renderer/webcrypto_impl.cc
index b0fc14f5..f6f77ba 100644
--- a/content/renderer/webcrypto_impl.cc
+++ b/content/renderer/webcrypto_impl.cc
@@ -71,4 +71,26 @@
   }
 }
 
+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