| Index: content/renderer/webcrypto/webcrypto_impl.h
|
| diff --git a/content/renderer/webcrypto/webcrypto_impl.h b/content/renderer/webcrypto/webcrypto_impl.h
|
| index ab1fd7e10ae5526e79dc47e85ba06df35a310810..56c81c730e883870d6d705a8995c7d3a247d6d7a 100644
|
| --- a/content/renderer/webcrypto/webcrypto_impl.h
|
| +++ b/content/renderer/webcrypto/webcrypto_impl.h
|
| @@ -7,16 +7,18 @@
|
|
|
| #include "base/basictypes.h"
|
| #include "base/compiler_specific.h"
|
| -#include "content/common/content_export.h"
|
| #include "third_party/WebKit/public/platform/WebCrypto.h"
|
|
|
| namespace content {
|
| -namespace webcrypto { class Status; }
|
|
|
| -class CONTENT_EXPORT WebCryptoImpl
|
| - : NON_EXPORTED_BASE(public blink::WebCrypto) {
|
| +// Wrapper around the blink WebCrypto asynchronous interface, which forwards to
|
| +// the synchronous platfrom (NSS or OpenSSL) implementation.
|
| +//
|
| +// TODO(eroman): Post the synchronous work to a background thread.
|
| +class WebCryptoImpl : public blink::WebCrypto {
|
| public:
|
| WebCryptoImpl();
|
| + virtual ~WebCryptoImpl();
|
|
|
| virtual void encrypt(
|
| const blink::WebCryptoAlgorithm& algorithm,
|
| @@ -67,84 +69,6 @@ class CONTENT_EXPORT WebCryptoImpl
|
| unsigned int data_size,
|
| blink::WebCryptoResult result);
|
|
|
| -
|
| - protected:
|
| - friend class WebCryptoImplTest;
|
| -
|
| - void Init();
|
| -
|
| - webcrypto::Status EncryptInternal(
|
| - const blink::WebCryptoAlgorithm& algorithm,
|
| - const blink::WebCryptoKey& key,
|
| - const unsigned char* data,
|
| - unsigned int data_size,
|
| - blink::WebArrayBuffer* buffer);
|
| - webcrypto::Status DecryptInternal(
|
| - const blink::WebCryptoAlgorithm& algorithm,
|
| - const blink::WebCryptoKey& key,
|
| - const unsigned char* data,
|
| - unsigned int data_size,
|
| - blink::WebArrayBuffer* buffer);
|
| - webcrypto::Status DigestInternal(
|
| - const blink::WebCryptoAlgorithm& algorithm,
|
| - const unsigned char* data,
|
| - unsigned int data_size,
|
| - blink::WebArrayBuffer* buffer);
|
| - webcrypto::Status GenerateSecretKeyInternal(
|
| - const blink::WebCryptoAlgorithm& algorithm,
|
| - bool extractable,
|
| - blink::WebCryptoKeyUsageMask usage_mask,
|
| - blink::WebCryptoKey* key);
|
| - webcrypto::Status GenerateKeyPairInternal(
|
| - const blink::WebCryptoAlgorithm& algorithm,
|
| - bool extractable,
|
| - blink::WebCryptoKeyUsageMask usage_mask,
|
| - blink::WebCryptoKey* public_key,
|
| - blink::WebCryptoKey* private_key);
|
| - webcrypto::Status ImportKeyInternal(
|
| - blink::WebCryptoKeyFormat format,
|
| - const unsigned char* key_data,
|
| - unsigned int key_data_size,
|
| - const blink::WebCryptoAlgorithm& algorithm_or_null,
|
| - bool extractable,
|
| - blink::WebCryptoKeyUsageMask usage_mask,
|
| - blink::WebCryptoKey* key);
|
| - webcrypto::Status ExportKeyInternal(
|
| - blink::WebCryptoKeyFormat format,
|
| - const blink::WebCryptoKey& key,
|
| - blink::WebArrayBuffer* buffer);
|
| - webcrypto::Status SignInternal(
|
| - const blink::WebCryptoAlgorithm& algorithm,
|
| - const blink::WebCryptoKey& key,
|
| - const unsigned char* data,
|
| - unsigned int data_size,
|
| - blink::WebArrayBuffer* buffer);
|
| - webcrypto::Status VerifySignatureInternal(
|
| - const blink::WebCryptoAlgorithm& algorithm,
|
| - const blink::WebCryptoKey& key,
|
| - const unsigned char* signature,
|
| - unsigned int signature_size,
|
| - const unsigned char* data,
|
| - unsigned int data_size,
|
| - bool* signature_match);
|
| -
|
| - webcrypto::Status ImportKeyJwk(
|
| - const unsigned char* key_data,
|
| - unsigned int key_data_size,
|
| - const blink::WebCryptoAlgorithm& algorithm_or_null,
|
| - bool extractable,
|
| - blink::WebCryptoKeyUsageMask usage_mask,
|
| - blink::WebCryptoKey* key);
|
| - webcrypto::Status ImportRsaPublicKeyInternal(
|
| - const unsigned char* modulus_data,
|
| - unsigned int modulus_size,
|
| - const unsigned char* exponent_data,
|
| - unsigned int exponent_size,
|
| - const blink::WebCryptoAlgorithm& algorithm,
|
| - bool extractable,
|
| - blink::WebCryptoKeyUsageMask usage_mask,
|
| - blink::WebCryptoKey* key);
|
| -
|
| private:
|
| DISALLOW_COPY_AND_ASSIGN(WebCryptoImpl);
|
| };
|
|
|