Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-10010

Implement an SSL socket for Windows, using OpenSSL directly

    XMLWordPrintableJSON

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.10.0
    • Component/s: libprocess
    • Labels:
    • Epic Link:
    • Sprint:
      Foundations: RI-20 59, Studio 3: RI-21 60
    • Story Points:
      5

      Description

      class WindowsSSLSocketImpl : public SocketImpl
      {
      public:
        // This will be the entry point for Socket::create(SSL).
        static Try<std::shared_ptr<SocketImpl>> create(int_fd s);
      
        WindowsSSLSocketImpl(int_fd _s);
        ~WindowsSSLSocketImpl() override;
      
        // Overrides for the 'SocketImpl' interface below.
      
        // Unreachable.
        Future<Nothing> connect(const Address& address) override;
      
        // This will initialize SSL objects then call windows::connect()
        // and chain that onto the appropriate call to SSL_do_handshake.
        Future<Nothing> connect(
            const Address& address,
            const openssl::TLSClientConfig& config) override;
      
        // These will call SSL_read or SSL_write as appropriate.
        // As long as the SSL context is set up correctly, these will be
        // thin wrappers.  (More details after the code block.)
        Future<size_t> recv(char* data, size_t size) override;
        Future<size_t> send(const char* data, size_t size) override;
        Future<size_t> sendfile(int_fd fd, off_t offset, size_t size) override;
      
        // Nothing SSL here, just a plain old listener.
        Try<Nothing> listen(int backlog) override;
      
        // This will initialize SSL objects then call windows::accept()
        // and then perform handshaking.  Any downgrading will
        // happen here.  Since we control the event loop, we can
        // easily peek at the first few bytes to check SSL-ness.
        Future<std::shared_ptr<SocketImpl>> accept() override;
      
        SocketImpl::Kind kind() const override { return SocketImpl::Kind::SSL; }
      }
      

        Attachments

          Activity

            People

            • Assignee:
              kaysoky Joseph Wu
              Reporter:
              kaysoky Joseph Wu
              Shepherd:
              Till Toenshoff
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: