Commit 33a47683 authored by Samuel Miller's avatar Samuel Miller Committed by Facebook GitHub Bot

Remove getX509() from AsyncTransportCertificate

Summary:
All invocations of `getX509()` should now be on instances of an
`OpenSSLTransportCertificate`.

Reviewed By: mingtaoy

Differential Revision: D30487612

fbshipit-source-id: 978603beccc1af006bf2f2af0aea03e0387fe124
parent 38dccb1c
......@@ -16,8 +16,7 @@
#pragma once
#include <folly/portability/OpenSSL.h>
#include <folly/ssl/OpenSSLPtrTypes.h>
#include <string>
namespace folly {
......@@ -38,11 +37,5 @@ class AsyncTransportCertificate {
* implementations of AsyncTransport.
*/
virtual std::string getIdentity() const = 0;
/**
* Returns an X509 structure associated with this Certificate. This may be
* null.
*/
virtual folly::ssl::X509UniquePtr getX509() const = 0;
};
} // namespace folly
......@@ -30,9 +30,11 @@ class OpenSSLTransportCertificate : public AsyncTransportCertificate {
public:
virtual ~OpenSSLTransportCertificate() = default;
// TODO: Once all callsites using getX509() perform dynamic casts to this
// OpenSSLTransportCertificate type, we can move that method to be declared
// here instead.
/**
* Returns an X509 structure associated with this Certificate. This may be
* null.
*/
virtual folly::ssl::X509UniquePtr getX509() const = 0;
static ssl::X509UniquePtr tryExtractX509(
const AsyncTransportCertificate* cert) {
......
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