| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef NET_QUIC_CRYPTO_AEAD_BASE_DECRYPTER_H_ | 5 #ifndef NET_QUIC_CRYPTO_AEAD_BASE_DECRYPTER_H_ |
| 6 #define NET_QUIC_CRYPTO_AEAD_BASE_DECRYPTER_H_ | 6 #define NET_QUIC_CRYPTO_AEAD_BASE_DECRYPTER_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "net/quic/crypto/quic_decrypter.h" | 9 #include "net/quic/crypto/quic_decrypter.h" |
| 10 | 10 |
| 11 #if defined(USE_OPENSSL) | 11 #if defined(USE_OPENSSL) |
| 12 #include "net/quic/crypto/scoped_evp_aead_ctx.h" | 12 #include "net/quic/crypto/scoped_evp_aead_ctx.h" |
| 13 #else | 13 #else |
| 14 #include <pkcs11t.h> | 14 #include <pkcs11t.h> |
| 15 #include <seccomon.h> | 15 #include <seccomon.h> |
| 16 typedef struct PK11SymKeyStr PK11SymKey; | 16 typedef struct PK11SymKeyStr PK11SymKey; |
| 17 typedef SECStatus (*PK11_DecryptFunction)( | 17 typedef SECStatus (*PK11_DecryptFunction)(PK11SymKey* symKey, |
| 18 PK11SymKey* symKey, CK_MECHANISM_TYPE mechanism, SECItem* param, | 18 CK_MECHANISM_TYPE mechanism, |
| 19 unsigned char* out, unsigned int* outLen, unsigned int maxLen, | 19 SECItem* param, |
| 20 const unsigned char* enc, unsigned encLen); | 20 unsigned char* out, |
| 21 unsigned int* outLen, |
| 22 unsigned int maxLen, |
| 23 const unsigned char* enc, |
| 24 unsigned encLen); |
| 21 #endif | 25 #endif |
| 22 | 26 |
| 23 namespace net { | 27 namespace net { |
| 24 | 28 |
| 25 // AeadBaseDecrypter is the base class of AEAD QuicDecrypter subclasses. | 29 // AeadBaseDecrypter is the base class of AEAD QuicDecrypter subclasses. |
| 26 class NET_EXPORT_PRIVATE AeadBaseDecrypter : public QuicDecrypter { | 30 class NET_EXPORT_PRIVATE AeadBaseDecrypter : public QuicDecrypter { |
| 27 public: | 31 public: |
| 28 #if defined(USE_OPENSSL) | 32 #if defined(USE_OPENSSL) |
| 29 AeadBaseDecrypter(const EVP_AEAD* aead_alg, | 33 AeadBaseDecrypter(const EVP_AEAD* aead_alg, |
| 30 size_t key_size, | 34 size_t key_size, |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 #if defined(USE_OPENSSL) | 102 #if defined(USE_OPENSSL) |
| 99 ScopedEVPAEADCtx ctx_; | 103 ScopedEVPAEADCtx ctx_; |
| 100 #endif | 104 #endif |
| 101 | 105 |
| 102 DISALLOW_COPY_AND_ASSIGN(AeadBaseDecrypter); | 106 DISALLOW_COPY_AND_ASSIGN(AeadBaseDecrypter); |
| 103 }; | 107 }; |
| 104 | 108 |
| 105 } // namespace net | 109 } // namespace net |
| 106 | 110 |
| 107 #endif // NET_QUIC_CRYPTO_AEAD_BASE_DECRYPTER_H_ | 111 #endif // NET_QUIC_CRYPTO_AEAD_BASE_DECRYPTER_H_ |
| OLD | NEW |