diff options
author | Yuri Wiitala <miu@chromium.org> | 2019-11-26 16:10:29 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-11-27 00:20:32 +0000 |
commit | fddca10f23f5d483e2768dea6e3e920abb28898c (patch) | |
tree | f1783cfc7bc65df183156ecd52487048767dc26d /cast/sender/channel/sender_socket_factory.h | |
parent | f9d1fe4a538ab7003addcdf8592c77519a55b91a (diff) | |
download | openscreen-fddca10f23f5d483e2768dea6e3e920abb28898c.tar.gz |
Remove dependencies on openssl from platform/api.
Moves all certificate utilities out of TlsCredentials (in platform/base)
to a new util/crypto/certificate_utilities.* library.
Then, all remaning boringssl dependencies are removed from platform/api
by modifying the TlsConnectionFactory API to provide DER-encoded X509
certificates (i.e., a serialized form) instead of the boringssl X509
struct.
Bug: openscreen:89
Change-Id: Iaaeec687d81770bb8e7e2bab4837880c77a37aa9
Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/1932181
Reviewed-by: Yuri Wiitala <miu@chromium.org>
Reviewed-by: Jordan Bayles <jophba@chromium.org>
Commit-Queue: Yuri Wiitala <miu@chromium.org>
Diffstat (limited to 'cast/sender/channel/sender_socket_factory.h')
-rw-r--r-- | cast/sender/channel/sender_socket_factory.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cast/sender/channel/sender_socket_factory.h b/cast/sender/channel/sender_socket_factory.h index 62fa6d97..63998674 100644 --- a/cast/sender/channel/sender_socket_factory.h +++ b/cast/sender/channel/sender_socket_factory.h @@ -5,6 +5,8 @@ #ifndef CAST_SENDER_CHANNEL_SENDER_SOCKET_FACTORY_H_ #define CAST_SENDER_CHANNEL_SENDER_SOCKET_FACTORY_H_ +#include <openssl/x509.h> + #include <set> #include <utility> #include <vector> @@ -57,10 +59,10 @@ class SenderSocketFactory final : public TlsConnectionFactory::Client, // TlsConnectionFactory::Client overrides. void OnAccepted(TlsConnectionFactory* factory, - X509* peer_cert, + std::vector<uint8_t> der_x509_peer_cert, std::unique_ptr<TlsConnection> connection) override; void OnConnected(TlsConnectionFactory* factory, - X509* peer_cert, + std::vector<uint8_t> der_x509_peer_cert, std::unique_ptr<TlsConnection> connection) override; void OnConnectionFailed(TlsConnectionFactory* factory, const IPEndpoint& remote_address) override; @@ -79,7 +81,7 @@ class SenderSocketFactory final : public TlsConnectionFactory::Client, std::unique_ptr<CastSocket> socket; CastSocket::Client* client; AuthContext auth_context; - X509* peer_cert; + bssl::UniquePtr<X509> peer_cert; }; friend bool operator<(const std::unique_ptr<PendingAuth>& a, uint32_t b); |