Skip to content
Snippets Groups Projects
Commit 1b68da64 authored by Guillaume Roguez's avatar Guillaume Roguez
Browse files

TlsTurnEndpoint: add method to know the peer certificate


This certificate is know after a successful connect().

Change-Id: Ie8a351a1c6b97ec65c7d92b8ef4432d412f357eb
Reviewed-by: default avatarNicolas Jäger <nicolas.jager@savoirfairelinux.com>
parent 1b5dff33
No related branches found
No related tags found
No related merge requests found
...@@ -210,6 +210,12 @@ TlsTurnEndpoint::write(const ValueType* buf, std::size_t len, std::error_code& e ...@@ -210,6 +210,12 @@ TlsTurnEndpoint::write(const ValueType* buf, std::size_t len, std::error_code& e
return pimpl_->tls->write(buf, len, ec); return pimpl_->tls->write(buf, len, ec);
} }
dht::crypto::Certificate&
TlsTurnEndpoint::peerCertificate() const
{
return pimpl_->peerCertificate;
}
//============================================================================== //==============================================================================
TcpSocketEndpoint::TcpSocketEndpoint(const IpAddr& addr) TcpSocketEndpoint::TcpSocketEndpoint(const IpAddr& addr)
......
...@@ -95,6 +95,8 @@ public: ...@@ -95,6 +95,8 @@ public:
void connect(); void connect();
dht::crypto::Certificate& peerCertificate() const;
private: private:
class Impl; class Impl;
std::unique_ptr<Impl> pimpl_; std::unique_ptr<Impl> pimpl_;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment