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

Updates for rust-openssl 0.6.0 #435

Merged
merged 1 commit into from
Apr 6, 2015
Merged

Conversation

markuskobler
Copy link
Contributor

No description provided.

@GitCop
Copy link

GitCop commented Apr 6, 2015

Thanks for contributing! Unfortunately, I'm here to tell you there were the following style issues with your Pull Request:

  • Commit: 80176c6
    • Commits must be in the following format: %{type}(%{scope}): %{description}
  • Commit: 20178be
    • Commits must be in the following format: %{type}(%{scope}): %{description}

Guidelines are available at https://github.com/hyperium/hyper/blob/master/CONTRIBUTING.md


This message was auto-generated by https://gitcop.com

@paulosuzart
Copy link

@markuskobler will you try again? Just hit the same error.

@markuskobler
Copy link
Contributor Author

@paulosuzart Are you hitting the error below, because apparently its working by design.

native library openssl is being linked to by more than one package, and can only be linked to by one package

Their might be a better way but I got round it by using a submodule to checkout rust-openssl and then had a .cargo/config like this.

paths = [
      "vendor/hyper",
      "vendor/openssl"
]

ssl_context.set_verify(SslVerifyNone, None);
try!(ssl_context.set_cipher_list("DEFAULT").map_err(lift_ssl_error));
try!(ssl_context.set_certificate_file(cert, X509FileType::PEM).map_err(lift_ssl_error));
try!(ssl_context.set_private_key_file(key, X509FileType::PEM).map_err(lift_ssl_error));
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we want to change the signature of this function to return HttpResult so that we can use From instead of map_err(lift_ssl_error).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Happy to change that as well but that would be the first use of HttpResult net.rs

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should, so that we can keep the entire error around rather than losing information like we do now.

Copy link
Member

Choose a reason for hiding this comment

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

If that's what we want, it can be in a separate PR. Although, with the io::Error changes to holding a Box<Error>, the original SSL error is no longer really lost. It's boxed into a trait object.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So had you envisaged adding adding a new HttpSslError(SslError) to the HttpError enum?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think you also need to change the NetworkConnector::connect and NetworkListener::accept signatures?

@paulosuzart
Copy link

@markuskobler your fix are pertinent and useful. I tried to fix myself and ended up fixing exactly the way you did. Before submit my PR I found yours. So if you just fix your commit messages they might be accepted.

@markuskobler
Copy link
Contributor Author

@paulosuzart Sorry now I understand. So I thought my rebase markuskobler@660a362 fixed the gitcop warning.

I think it just needs someone to kick off the travis build again now that it looks like cookie-rs has been upgraded to the latest rust openssl.

@seanmonstar
Copy link
Member

Just restarted travis.

seanmonstar added a commit that referenced this pull request Apr 6, 2015
Updates for rust-openssl 0.6.0
@seanmonstar seanmonstar merged commit 2098809 into hyperium:master Apr 6, 2015
@seanmonstar
Copy link
Member

Thanks for this!

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.

5 participants