summaryrefslogtreecommitdiff
path: root/chromium/net/quic/quic_crypto_server_stream.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/net/quic/quic_crypto_server_stream.h')
-rw-r--r--chromium/net/quic/quic_crypto_server_stream.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/chromium/net/quic/quic_crypto_server_stream.h b/chromium/net/quic/quic_crypto_server_stream.h
index b4967d866ce..43924d54d93 100644
--- a/chromium/net/quic/quic_crypto_server_stream.h
+++ b/chromium/net/quic/quic_crypto_server_stream.h
@@ -8,6 +8,7 @@
#include <string>
#include "net/quic/crypto/crypto_handshake.h"
+#include "net/quic/crypto/quic_crypto_server_config.h"
#include "net/quic/quic_config.h"
#include "net/quic/quic_crypto_stream.h"
@@ -40,14 +41,44 @@ class NET_EXPORT_PRIVATE QuicCryptoServerStream : public QuicCryptoStream {
protected:
virtual QuicErrorCode ProcessClientHello(
const CryptoHandshakeMessage& message,
+ const ValidateClientHelloResultCallback::Result& result,
CryptoHandshakeMessage* reply,
std::string* error_details);
private:
friend class test::CryptoTestUtils;
+ class ValidateCallback : public ValidateClientHelloResultCallback {
+ public:
+ explicit ValidateCallback(QuicCryptoServerStream* parent);
+ // To allow the parent to detach itself from the callback before deletion.
+ void Cancel();
+
+ // From ValidateClientHelloResultCallback
+ virtual void RunImpl(const CryptoHandshakeMessage& client_hello,
+ const Result& result) OVERRIDE;
+
+ private:
+ QuicCryptoServerStream* parent_;
+
+ DISALLOW_COPY_AND_ASSIGN(ValidateCallback);
+ };
+
+ // Invoked by ValidateCallback::RunImpl once initial validation of
+ // the client hello is complete. Finishes processing of the client
+ // hello message and handles handshake success/failure.
+ void FinishProcessingHandshakeMessage(
+ const CryptoHandshakeMessage& message,
+ const ValidateClientHelloResultCallback::Result& result);
+
// crypto_config_ contains crypto parameters for the handshake.
const QuicCryptoServerConfig& crypto_config_;
+
+ // Pointer to the active callback that will receive the result of
+ // the client hello validation request and forward it to
+ // FinishProcessingHandshakeMessage for processing. NULL if no
+ // handshake message is being validated.
+ ValidateCallback* validate_client_hello_cb_;
};
} // namespace net