/**
* 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;
}
#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>
*/
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
*/