Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added TLS/SSL support to server #199

Closed
wants to merge 16 commits into from
Closed

Conversation

cactorium
Copy link
Contributor

I think this should work, but I'm still trying to figure out how to test it. Sorry, I'm new at this contributing-to-open-source-projects thing!

/// An acceptor for HTTP protocol over TCP.
HttpA(TcpAcceptor),
/// An acceptor for HTTP protocol over TCP protected by TLS/SSL.
HttpsA(TcpAcceptor, Arc<SslContext>)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SslContext doesn't derive Clone, and using a reference causes a lot of lifetimes to be required, so this is the best solution I can come up for this. Any thoughts?

@cactorium cactorium mentioned this pull request Dec 17, 2014
Closed
@seanmonstar
Copy link
Member

Thanks, fantastic!

I'm not ignoring this, I've been thinking about the design here. I might say that we merge this and refine the design if a better one is thought of...

@cactorium
Copy link
Contributor Author

Thanks!

I was thinking using some structs like SslListener<L>, SslAcceptor<A>, and SslServerStream<S> to wrap around an arbitrary listener/acceptor/stream would be a more elegant design, would it be alright to write another pull request using these instead of the current approach, and see which one looks better?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants