Commit 31260110 authored by Kyle Nekritz's avatar Kyle Nekritz Committed by facebook-github-bot-0

Add getPeerCert() to AsyncTransport.

Reviewed By: elindsey

Differential Revision: D2850760

fb-gh-sync-id: 60dbc3117e658d2fd083a87884892924bf313019
parent 85e8a2d4
......@@ -740,7 +740,7 @@ class AsyncSSLSocket : public virtual AsyncSocket {
/**
* Returns the peer certificate, or nullptr if no peer certificate received.
*/
virtual X509_UniquePtr getPeerCert() const {
virtual X509_UniquePtr getPeerCert() const override {
if (!ssl_) {
return nullptr;
}
......
......@@ -22,6 +22,7 @@
#include <folly/io/async/DelayedDestruction.h>
#include <folly/io/async/EventBase.h>
#include <folly/io/async/AsyncSocketBase.h>
#include <folly/io/async/OpenSSLPtrTypes.h>
#include <openssl/ssl.h>
......@@ -320,6 +321,11 @@ class AsyncTransport : public DelayedDestruction, public AsyncSocketBase {
*/
virtual void getPeerAddress(SocketAddress* address) const = 0;
/**
* Get the certificate used to authenticate the peer.
*/
virtual X509_UniquePtr getPeerCert() const { return nullptr; }
/**
* @return True iff end of record tracking is enabled
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment