microsoft / msquic

Cross-platform, C implementation of the IETF QUIC protocol, exposed to C, C++, C# and Rust.
MIT License
4.02k stars 529 forks source link

Support vcpkg #1426

Open nibanks opened 3 years ago

nibanks commented 3 years ago

Describe the feature you'd like supported

It'd be great to integrate MsQuic with vcpkg: https://github.com/Microsoft/vcpkg

jeremyong commented 3 years ago

I actually looked for this package on vcpkg also. Two things I noticed that might be useful changes before that:

luncliff commented 3 years ago

I estimated this is possible with the current vcpkg mainstream, and got some errors related to OSSL_ENCRYPTION_LEVEL. It's actually an OPENSSL_NO_QUIC related issue, so I think https://github.com/quictls/openssl.git needs to be registered to support this project.

I have 2 questions at this point.

  1. Is there any policy or guide for pre-installed OpenSSL in this project?
  2. Is there any other option for QUIC_TLS=openssl instead of quictls/openssl?
nibanks commented 3 years ago
  1. Is there any policy or guide for pre-installed OpenSSL in this project?

It depends on the scenario. On Linux, you can use the pre-installed v1.1.1 libcrypto.so that some distros have and build MsQuic so that libtls.so (from quictls repo) is statically linked. Or you can statically link the entire OpenSSL dependency (libcrypto and libtls) from quictls into MsQuic (this solution is generally also what is used on Windows if OpenSSL is used).

  1. Is there any other option for QUIC_TLS=openssl instead of quictls/openssl?

Nope. quictls is a fork of OpenSSL that also adds QUIC protocol support. The official OpenSSL branch is still a long ways off from supporting the QUIC protocol, so until that happens we must use this fork instead.

[S]o I think https://github.com/quictls/openssl.git needs to be registered to support this project.

That kind of seems reasonable. I suspect however the official OpenSSL is registered with vcpkg should be easily copy/pasted to support quictls as well. The only difference between the two (for the most part) are additional APIs. The other option would be that building MsQuic just internally submodules and builds it's own copy of quictls. I'm not an expert on which solution would be better.

luncliff commented 3 years ago

Got it. I'll try to make PR for quictls registration. But it may take some days to check configurations in multiple platforms. (Considering Windows/Linux first)

luncliff commented 3 years ago

Create a PR for quictls in https://github.com/microsoft/vcpkg/pull/17949

I used the code version 2021-05-03, but I don't think the commit is for release.
Please let me know if the version of quictls/openssl is decided.

nibanks commented 3 years ago

Create a PR for quictls in https://github.com/microsoft/vcpkg/pull/17949

I used the code version 2021-05-03, but I don't think the commit is for release.
Please let me know if the version of quictls/openssl is decided.

Are you asking which release of quictls to add? We're currently using the latest 1.1.1 release, not the 3.0.