/*
- * Copyright (C) 1996-2016 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2020 The Squid Software Foundation and contributors
*
* Squid software is distributed under GPLv2+ license and includes
* contributions from numerous individuals and organizations.
#ifndef SQUID_SRC_SECURITY_NEGOTIATIONHISTORY_H
#define SQUID_SRC_SECURITY_NEGOTIATIONHISTORY_H
+#include "anyp/ProtocolVersion.h"
+#include "security/Handshake.h"
#include "security/Session.h"
namespace Security {
{
public:
NegotiationHistory();
- void fillWith(Security::SessionPtr); ///< Extract negotiation information from TLS object
+
+ /// Extract negotiation information from TLS object
+ void retrieveNegotiatedInfo(const Security::SessionPointer &);
+
+ /// Extract information from parser stored in TlsDetails object
+ void retrieveParsedInfo(Security::TlsDetails::Pointer const &details);
+
const char *cipherName() const; ///< The name of negotiated cipher
/// String representation of TLS negotiated version
const char *negotiatedVersion() const {return printTlsVersion(version_);}
const char *supportedVersion() const {return printTlsVersion(supportedVersion_);}
private:
/// String representation of the TLS version 'v'
- const char *printTlsVersion(int v) const;
- int helloVersion_; ///< The TLL version of the hello message
- int supportedVersion_; ///< The maximum supported TLS version
- int version_; ///< The negotiated TLL version
+ const char *printTlsVersion(AnyP::ProtocolVersion const &v) const;
+ AnyP::ProtocolVersion helloVersion_; ///< The TLS version of the hello message
+ AnyP::ProtocolVersion supportedVersion_; ///< The maximum supported TLS version
+ AnyP::ProtocolVersion version_; ///< The negotiated TLS version
#if USE_OPENSSL
const SSL_CIPHER *cipher; ///< The negotiated cipher
#endif