-
Notifications
You must be signed in to change notification settings - Fork 9
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
Use of test APIs #235
Comments
I am actually leaning towards including the definitions and dependencies, because it makes it much easier to right tools on top of this (since tools don't really care about a real certificate). |
I don't mind about the actual choice. But please put public API in the main lib. |
To get this functionality, it must depend on msquic_platform. |
With updated vcpkg ports for msquic and msh3, my test port build now arrives at:
despite |
|
I rename the |
The issue I see is at the binary level (similar to C++ ODR), not at the CMake level.
CMake. This is unrelated to the problem.
CMake. This is unrelated to the problem. BTW the |
I add msquic_ prefix because when I export the platform, it also create a lib and I didn't want to create a lib with generic name like platform. I think we can rename it back to platform when the target msquic_platform / platform will be private again. |
FTR this is that patch. Not adding source code, just pulling symbols into the msquic lib. |
I tried to apply it on upstream, but it create other problems that I couldn't solve 🙏🏻 |
I hope @nibanks can help us with this problem. |
This code churn affects other people's PRs and undermines trust in the project's maturity.
That's the point of this issue. |
The CMake part of the story is this: For using the exported/imported CMake target representing the |
This is by design. The platform abstraction layer is never meant to be a shared library. It's generally meant to be a lot of mostly inline helpers. Eventually the platform layer will be moved completely to https://github.com/microsoft/cxplat, which will always be a static lib. But that's a longer term effort. |
The problem which I see now in vcpkg is that
where OpenSSL evaluates to linking libssl.a, libcrypto.a (x64-linux). Installing these libs in vcpkg is not an option, with pristine openssl already available. |
While reviewing changes to vcpkg ports, I noticed that @talregev showed a dependency of msh3 on msquic_platform:
microsoft/vcpkg#41200
microsoft/vcpkg#42547 (comment)
I would assume that this is unexpected, with CMake target
msquic
carrying the complete public interface of msquic, and withmsquic_platform
being a private implementation detail.Following the symols:
I find that
CxPlatGetSelfSignedCert
is behind a runtime condition onMSH3_CREDENTIAL_TYPE_SELF_SIGNED_CERTIFICATE
:msh3/lib/msh3.cpp
Lines 401 to 402 in ecdacc9
MSH3_CREDENTIAL_TYPE_SELF_SIGNED_CERTIFICATE
is behind a build-time condition onMSH3_TEST_MODE
:msh3/msh3.h
Lines 85 to 87 in ecdacc9
CxPlatGetSelfSignedCert
is behind a build-time condition onQUIC_TEST_APIS
:https://github.com/microsoft/msquic/blob/21e5b41e4e9f88d809de4c78e461b57641bfca8e/src/inc/quic_platform.h#L560-L604
Are the build-time test API macros meant to be defined at all for production builds (read: for the vcpkg ports?)
If no, I would assume that msh3's calls to those functions must be moved behind build-time guards.
And then, msh3 would no longer need to explicitly link to msquic_platform.
The text was updated successfully, but these errors were encountered: