| Index: content/renderer/webcrypto_impl.cc
|
| diff --git a/content/renderer/webcrypto_impl.cc b/content/renderer/webcrypto_impl.cc
|
| index 80c551240eeb141a4c5b305f9485e5df2c241b6e..f326f8d33299c946ef921540e254c522592168b5 100644
|
| --- a/content/renderer/webcrypto_impl.cc
|
| +++ b/content/renderer/webcrypto_impl.cc
|
| @@ -4,11 +4,18 @@
|
|
|
| #include "content/renderer/webcrypto_impl.h"
|
|
|
| +// TODO(bryaneyler): Also include these in OpenSSL build.
|
| +#if defined(USE_NSS)
|
| +#include "content/renderer/webcrypto_sha_digest.h"
|
| +#endif
|
| +
|
| #include "third_party/WebKit/public/platform/WebCryptoAlgorithm.h"
|
|
|
| namespace content {
|
|
|
| WebKit::WebCryptoOperation* WebCryptoImpl::digest(
|
| +// TODO(bryaneyler): Also include these in OpenSSL build.
|
| +#if defined(USE_NSS)
|
| const WebKit::WebCryptoAlgorithm& algorithm) {
|
| switch (algorithm.id()) {
|
| case WebKit::WebCryptoAlgorithmIdSha1:
|
| @@ -16,12 +23,15 @@ WebKit::WebCryptoOperation* WebCryptoImpl::digest(
|
| case WebKit::WebCryptoAlgorithmIdSha256:
|
| case WebKit::WebCryptoAlgorithmIdSha384:
|
| case WebKit::WebCryptoAlgorithmIdSha512:
|
| - // TODO(eroman): Implement.
|
| - return NULL;
|
| + return new WebCryptoSHADigest(algorithm.id());
|
| default:
|
| // Not a digest algorithm.
|
| return NULL;
|
| }
|
| +#else
|
| + // No way to process.
|
| + return NULL;
|
| +#endif
|
| }
|
|
|
| } // namespace content
|
|
|