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

Side by Side Diff: content/child/webcrypto/openssl/util_openssl.cc

Issue 379383002: Refactor WebCrypto code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase onto master (no longer has BoringSSL) Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/child/webcrypto/openssl/util_openssl.h"
6
7 #include <openssl/evp.h>
8
9 #include "content/child/webcrypto/crypto_data.h"
10 #include "content/child/webcrypto/platform_crypto.h"
11 #include "crypto/openssl_util.h"
12
13 namespace content {
14
15 namespace webcrypto {
16
17 void PlatformInit() {
18 crypto::EnsureOpenSSLInit();
19 }
20
21 const EVP_MD* GetDigest(blink::WebCryptoAlgorithmId id) {
22 switch (id) {
23 case blink::WebCryptoAlgorithmIdSha1:
24 return EVP_sha1();
25 case blink::WebCryptoAlgorithmIdSha256:
26 return EVP_sha256();
27 case blink::WebCryptoAlgorithmIdSha384:
28 return EVP_sha384();
29 case blink::WebCryptoAlgorithmIdSha512:
30 return EVP_sha512();
31 default:
32 return NULL;
33 }
34 }
35
36 AlgorithmImplementation* CreatePlatformRsaOaepImplementation() {
37 // TODO(eroman):
38 return NULL;
39 }
40
41 AlgorithmImplementation* CreatePlatformRsaSsaImplementation() {
42 // TODO(eroman):
43 return NULL;
44 }
45
46 } // namespace webcrypto
47
48 } // namespace content
OLDNEW
« no previous file with comments | « content/child/webcrypto/openssl/util_openssl.h ('k') | content/child/webcrypto/platform_crypto.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698