feat: add compat.openssl 3.5.1 + asio SSL/TLS support - #124
Merged
Conversation
Without the ssl feature active, ssl.cpp compiles to a trivially-passing
no-op (int main() { return 0; }). This keeps the workspace green while
compat.openssl is unpublished (xlings#374 prevents two local-path index
repos for cross-namespace resolution).
…line constexpr rfc2818_verification does not exist in standalone asio 1.38.1. verify_none/verify_peer/verify_fail_if_no_peer_cert are const int with internal linkage — cannot be exported via 'using'. Replace with inline constexpr declarations backed by the OpenSSL SSL_VERIFY_* macros.
verify_* are const int with internal linkage — cannot be exported via using or inline constexpr (re-declaration conflicts with global module fragment). Keep only types (context, context_base, stream, verify_mode) and host_name_verification function.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更内容
新增
compat.openssl@3.5.1libcrypto.a+libssl.a+include/openssl/*.hchriskohlhoff.asio新增sslfeaturefeatures = ["ssl"]compat.openssl@3.5.1MCPP_FEATURE_SSL守卫,导出asio::ssl命名空间asio_ssl.cpp源码编译新增 SSL 测试
tests/examples/asio-module/tests/ssl.cpp#ifdef MCPP_FEATURE_SSLno-op 回退(feature 未激活时)已验证
边界限制
chriskohlhoff和compat两个 namespace。待 compat.openssl 发布到全局索引后可正常工作verify_none/verify_peer/verify_fail_if_no_peer_cert为内部链接 const int,C++20 module 语法限制无法 export。消费者需使用裸 int 值或通过 context_base 枚举mbedTLS 评估结论
mbedTLS 无法替代 OpenSSL 作为 asio 的 TLS 依赖。asio::ssl 硬编码 ~95 个 OpenSSL C API(SSL_CTX/SSL/BIO/X509/EVP/ERR/PEM 等),mbedTLS API 完全不同且无 OpenSSL 兼容层。