Skip to content
This repository has been archived by the owner on Jan 17, 2020. It is now read-only.

ALPN support #131

Merged
merged 3 commits into from Jul 12, 2019
Merged

ALPN support #131

merged 3 commits into from Jul 12, 2019

Conversation

eldesh
Copy link
Contributor

@eldesh eldesh commented Jan 22, 2019

Added ALPN TLS extension support.

  • Extend ConnectionMethod with alpn field.

notice

Protocol candidates are represented as Vec<String>, but latest rustls (1.15.0) uses Vec<Vec<u8>>.

@tekjar
Copy link

tekjar commented Jan 22, 2019

Hi. Thank you for adding this feature. Since this is a breaking change and people already seem to be using this library, I'll release the current version and then merge this

@tekjar tekjar mentioned this pull request Apr 1, 2019
@eldesh
Copy link
Contributor Author

eldesh commented Jul 12, 2019

rebase to master

@tekjar
Copy link

tekjar commented Jul 12, 2019

Thank you for the patience :). I might have to make ConnetionMethod private and add tls and alpn methods to MqttOptions directly. We'll proceed with the merge for now.

@tekjar tekjar merged commit 7fe87cc into AtherEnergy:master Jul 12, 2019
@tekjar
Copy link

tekjar commented Jul 18, 2019

@eldesh The CI succeeded but I'm facing ring incompatibility in my local build

   --> src/client/network.rs:131:34
    |
131 |             config.set_protocols(&self.alpn_protocols);
    |                                  ^^^^^^^^^^^^^^^^^^^^ expected slice, found struct `std::vec::Vec`
    |
    = note: expected type `&[std::string::String]`
               found type `&std::vec::Vec<std::vec::Vec<u8>>`

Any clue?

@eldesh
Copy link
Contributor Author

eldesh commented Jul 19, 2019

@tekjar
How about checking your rustls version which is specified in Cargo.lock.
That crate may have changed interface type from String to Vec<u8>.

@tekjar
Copy link

tekjar commented Jul 19, 2019

Ahh I was somehow assuming lockfile is committed and wondering why CI passes. Thanks

@tekjar
Copy link

tekjar commented Jul 19, 2019

@eldesh I've removed ConnectionMethod in favor of MqttOptions for connection type here

Can you give this a try and let me know if this works for you?

@eldesh
Copy link
Contributor Author

eldesh commented Jul 20, 2019

@tekjar I have confirmed that f1d9885 works correctly for my use case. Thanks.

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

Successfully merging this pull request may close these issues.

None yet

2 participants