diff --git a/folly/experimental/io/AsyncIoUringSocket.h b/folly/experimental/io/AsyncIoUringSocket.h index b941bca2cc2..6fe1f9f2575 100644 --- a/folly/experimental/io/AsyncIoUringSocket.h +++ b/folly/experimental/io/AsyncIoUringSocket.h @@ -54,6 +54,7 @@ class IoUringBackend; class AsyncIoUringSocket : public AsyncSocketTransport { public: + using Cert = folly::AsyncTransportCertificate; struct Options { Options() : allocateNoBufferPoolBuffer(defaultAllocateNoBufferPoolBuffer), @@ -212,6 +213,26 @@ class AsyncIoUringSocket : public AsyncSocketTransport { applicationProtocol_ = std::move(s); } + const folly::AsyncTransportCertificate* getPeerCertificate() const override { + return peerCert_.get(); + } + + const folly::AsyncTransportCertificate* getSelfCertificate() const override { + return selfCert_.get(); + } + + void dropPeerCertificate() noexcept override { peerCert_.reset(); } + + void dropSelfCertificate() noexcept override { selfCert_.reset(); } + + void setPeerCertificate(const std::shared_ptr& peerCert) { + peerCert_ = peerCert; + } + + void setSelfCertificate(const std::shared_ptr& selfCert) { + selfCert_ = selfCert; + } + void asyncDetachFd(AsyncDetachFdCallback* callback); bool readSqeInFlight() const { return readSqe_->inFlight(); } bool getTFOSucceded() const override; @@ -470,6 +491,9 @@ class AsyncIoUringSocket : public AsyncSocketTransport { std::string securityProtocol_; std::string applicationProtocol_; + std::shared_ptr selfCert_; + std::shared_ptr peerCert_; + // shutdown: int shutdownFlags_ = 0;