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

Unified Diff: net/quic/crypto/aead_base_encrypter.h

Issue 1882433002: Removing NSS files and USE_OPENSSL flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 8 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 | « net/quic/crypto/aead_base_decrypter_nss.cc ('k') | net/quic/crypto/aead_base_encrypter_nss.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/crypto/aead_base_encrypter.h
diff --git a/net/quic/crypto/aead_base_encrypter.h b/net/quic/crypto/aead_base_encrypter.h
index 333018997bc58b9aa2037692bc126d2fc817ba20..05d996f537a455d25f28a9a96db7ef7ed6bb1d75 100644
--- a/net/quic/crypto/aead_base_encrypter.h
+++ b/net/quic/crypto/aead_base_encrypter.h
@@ -10,29 +10,17 @@
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "net/quic/crypto/quic_encrypter.h"
-
-#if defined(USE_OPENSSL)
#include "net/quic/crypto/scoped_evp_aead_ctx.h"
-#else
-#include <pkcs11t.h>
-#endif
namespace net {
// AeadBaseEncrypter is the base class of AEAD QuicEncrypter subclasses.
class NET_EXPORT_PRIVATE AeadBaseEncrypter : public QuicEncrypter {
public:
-#if defined(USE_OPENSSL)
AeadBaseEncrypter(const EVP_AEAD* aead_alg,
size_t key_size,
size_t auth_tag_size,
size_t nonce_prefix_size);
-#else
- AeadBaseEncrypter(CK_MECHANISM_TYPE aead_mechanism,
- size_t key_size,
- size_t auth_tag_size,
- size_t nonce_prefix_size);
-#endif
~AeadBaseEncrypter() override;
// QuicEncrypter implementation
@@ -66,27 +54,8 @@ class NET_EXPORT_PRIVATE AeadBaseEncrypter : public QuicEncrypter {
static const size_t kMaxKeySize = 32;
static const size_t kMaxNoncePrefixSize = 4;
-#if !defined(USE_OPENSSL)
- struct AeadParams {
- unsigned int len;
- union {
- CK_GCM_PARAMS gcm_params;
- CK_NSS_AEAD_PARAMS nss_aead_params;
- } data;
- };
-
- virtual void FillAeadParams(base::StringPiece nonce,
- base::StringPiece associated_data,
- size_t auth_tag_size,
- AeadParams* aead_params) const = 0;
-#endif
-
private:
-#if defined(USE_OPENSSL)
const EVP_AEAD* const aead_alg_;
-#else
- const CK_MECHANISM_TYPE aead_mechanism_;
-#endif
const size_t key_size_;
const size_t auth_tag_size_;
const size_t nonce_prefix_size_;
@@ -96,9 +65,7 @@ class NET_EXPORT_PRIVATE AeadBaseEncrypter : public QuicEncrypter {
// The nonce prefix.
unsigned char nonce_prefix_[kMaxNoncePrefixSize];
-#if defined(USE_OPENSSL)
ScopedEVPAEADCtx ctx_;
-#endif
DISALLOW_COPY_AND_ASSIGN(AeadBaseEncrypter);
};
« no previous file with comments | « net/quic/crypto/aead_base_decrypter_nss.cc ('k') | net/quic/crypto/aead_base_encrypter_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698