binder: Add getCertificate / addTrustedPeerCerticate.
getCertificate returns the self-signed certificate
on this context.
addTrustedPeerCertificate adds a peer certificate
as trusted by this context.
Test: binderRpcTest
Bug: 195166979
Change-Id: I0e4fadd8e3391dc39f551e4b80e9411b16b696ab
diff --git a/libs/binder/RpcTransportRaw.cpp b/libs/binder/RpcTransportRaw.cpp
index d77fc52..930df12 100644
--- a/libs/binder/RpcTransportRaw.cpp
+++ b/libs/binder/RpcTransportRaw.cpp
@@ -111,7 +111,10 @@
std::unique_ptr<RpcTransport> newTransport(android::base::unique_fd fd, FdTrigger*) const {
return std::make_unique<RpcTransportRaw>(std::move(fd));
}
+ std::string getCertificate(CertificateFormat) const override { return {}; }
+ status_t addTrustedPeerCertificate(CertificateFormat, std::string_view) override { return OK; }
};
+
} // namespace
std::unique_ptr<RpcTransportCtx> RpcTransportCtxFactoryRaw::newServerCtx() const {