-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use openSSL to implement TLS communication (#185)
Summary: Pull Request resolved: #185 NOTE:This is a relatively complex diff, but it is necessary because we need all functionality to be implemented to be able to test end to end (client setup, server setup, read, write, and destroy). Otherwise, each individual diff would be untestable. This diff sets up end to end TLS communication between the partner and publisher. - Use SSL_CTX_use_certificate_file and SSL_CTX_use_Privatekey_file to load credentials. - Use SSL_accept to listen for handshake requests from a client - On the client side, use SSL_connect to initiate a handshake - Both parties use SSL_read and SSL_write to communicate There are a few other nuances (blocking vs nonblocking reads, passphrases) that are all explained with inline comments. There are a few NON-goals of this diff 1) We are not testing whether this works on PC infra. That will happen in the future. 2) We are not analyzing performance regressions. Reviewed By: RuiyuZhu Differential Revision: D35555496 fbshipit-source-id: d64dc5758eed9cd8e9b27794836fea67b893256a
- Loading branch information
1 parent
879f86f
commit f3d2e03
Showing
3 changed files
with
224 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters