summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libs/binder/RpcServer.cpp2
-rw-r--r--libs/binder/RpcSession.cpp2
-rw-r--r--libs/binder/RpcTransportRaw.cpp2
-rw-r--r--libs/binder/RpcTransportTls.cpp4
-rw-r--r--libs/binder/include/binder/RpcServer.h2
-rw-r--r--libs/binder/include/binder/RpcSession.h2
-rw-r--r--libs/binder/include/binder/RpcTransport.h2
7 files changed, 8 insertions, 8 deletions
diff --git a/libs/binder/RpcServer.cpp b/libs/binder/RpcServer.cpp
index 7fa2f5764f..1d42fc371e 100644
--- a/libs/binder/RpcServer.cpp
+++ b/libs/binder/RpcServer.cpp
@@ -141,7 +141,7 @@ sp<IBinder> RpcServer::getRootObject() {
return ret;
}
-std::string RpcServer::getCertificate(CertificateFormat format) {
+std::vector<uint8_t> RpcServer::getCertificate(CertificateFormat format) {
std::lock_guard<std::mutex> _l(mLock);
return mCtx->getCertificate(format);
}
diff --git a/libs/binder/RpcSession.cpp b/libs/binder/RpcSession.cpp
index c5a8dd1ddf..8449b3c064 100644
--- a/libs/binder/RpcSession.cpp
+++ b/libs/binder/RpcSession.cpp
@@ -703,7 +703,7 @@ bool RpcSession::removeIncomingConnection(const sp<RpcConnection>& connection) {
return false;
}
-std::string RpcSession::getCertificate(CertificateFormat format) {
+std::vector<uint8_t> RpcSession::getCertificate(CertificateFormat format) {
return mCtx->getCertificate(format);
}
diff --git a/libs/binder/RpcTransportRaw.cpp b/libs/binder/RpcTransportRaw.cpp
index 62c953007a..827e518575 100644
--- a/libs/binder/RpcTransportRaw.cpp
+++ b/libs/binder/RpcTransportRaw.cpp
@@ -111,7 +111,7 @@ public:
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 {}; }
+ std::vector<uint8_t> getCertificate(CertificateFormat) const override { return {}; }
};
} // namespace
diff --git a/libs/binder/RpcTransportTls.cpp b/libs/binder/RpcTransportTls.cpp
index 180b76e172..c42ea9a6f4 100644
--- a/libs/binder/RpcTransportTls.cpp
+++ b/libs/binder/RpcTransportTls.cpp
@@ -450,7 +450,7 @@ public:
std::shared_ptr<RpcCertificateVerifier> verifier);
std::unique_ptr<RpcTransport> newTransport(android::base::unique_fd fd,
FdTrigger* fdTrigger) const override;
- std::string getCertificate(CertificateFormat) const override;
+ std::vector<uint8_t> getCertificate(CertificateFormat) const override;
protected:
static ssl_verify_result_t sslCustomVerify(SSL* ssl, uint8_t* outAlert);
@@ -459,7 +459,7 @@ protected:
std::shared_ptr<RpcCertificateVerifier> mCertVerifier;
};
-std::string RpcTransportCtxTls::getCertificate(CertificateFormat) const {
+std::vector<uint8_t> RpcTransportCtxTls::getCertificate(CertificateFormat) const {
// TODO(b/195166979): return certificate here
return {};
}
diff --git a/libs/binder/include/binder/RpcServer.h b/libs/binder/include/binder/RpcServer.h
index 5229cfeb5b..9f92410c8c 100644
--- a/libs/binder/include/binder/RpcServer.h
+++ b/libs/binder/include/binder/RpcServer.h
@@ -135,7 +135,7 @@ public:
/**
* See RpcTransportCtx::getCertificate
*/
- std::string getCertificate(CertificateFormat);
+ std::vector<uint8_t> getCertificate(CertificateFormat);
/**
* Runs join() in a background thread. Immediately returns.
diff --git a/libs/binder/include/binder/RpcSession.h b/libs/binder/include/binder/RpcSession.h
index 91db637f43..76ef9ff006 100644
--- a/libs/binder/include/binder/RpcSession.h
+++ b/libs/binder/include/binder/RpcSession.h
@@ -131,7 +131,7 @@ public:
/**
* See RpcTransportCtx::getCertificate
*/
- std::string getCertificate(CertificateFormat);
+ std::vector<uint8_t> getCertificate(CertificateFormat);
/**
* Shuts down the service.
diff --git a/libs/binder/include/binder/RpcTransport.h b/libs/binder/include/binder/RpcTransport.h
index da132a1abb..4ad7bf47be 100644
--- a/libs/binder/include/binder/RpcTransport.h
+++ b/libs/binder/include/binder/RpcTransport.h
@@ -73,7 +73,7 @@ public:
// Implementation details:
// - For raw sockets, this always returns empty string.
// - For TLS, this returns the certificate. See RpcTransportTls for details.
- [[nodiscard]] virtual std::string getCertificate(CertificateFormat format) const = 0;
+ [[nodiscard]] virtual std::vector<uint8_t> getCertificate(CertificateFormat format) const = 0;
protected:
RpcTransportCtx() = default;