Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
/.vscode/
/.cache/
/.clangd
/build/*
!/build/Jamfile
!/build/wolfssl.jam
/out/
CMakeUserPresets.json
/CMakeUserPresets.json
/tmpclaude-*-cwd
7 changes: 7 additions & 0 deletions .gitleaksignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Allowlist for gitleaks secret scanning
#
# test/unit/tls/test_utils.hpp contains embedded test certificates and
# private keys from Boost.Beast for TLS unit testing. These are intentional
# test credentials documented in-code, not production secrets.

test/unit/tls/test_utils.hpp
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ endif ()
#
#-------------------------------------------------
find_package(OpenSSL)
if (OpenSSL_FOUND)
if (OPENSSL_FOUND)
file(GLOB_RECURSE BOOST_COROSIO_OPENSSL_HEADERS CONFIGURE_DEPENDS
Comment on lines 216 to 218
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# First, let's locate the CMakeLists.txt file and examine the context around lines 216-218
find . -name "CMakeLists.txt" -type f | head -20

Repository: cppalliance/corosio

Length of output: 327


🏁 Script executed:

# Let's read the CMakeLists.txt file around the mentioned lines
cat -n CMakeLists.txt | sed -n '210,230p'

Repository: cppalliance/corosio

Length of output: 1437


🏁 Script executed:

# Let's also search for all OpenSSL-related checks in CMakeLists.txt
grep -n "OPENSSL\|OpenSSL" CMakeLists.txt

Repository: cppalliance/corosio

Length of output: 831


🏁 Script executed:

# Let's check if there are other OpenSSL find_package usages in the codebase
find . -name "CMakeLists.txt" -type f -exec grep -l "find_package(OpenSSL)" {} \;

Repository: cppalliance/corosio

Length of output: 79


🏁 Script executed:

# Let's also check all uses of OPENSSL_FOUND vs OpenSSL_FOUND in the repo
rg "OpenSSL_FOUND|OPENSSL_FOUND" --type cmake

Repository: cppalliance/corosio

Length of output: 140


🌐 Web query:

CMake find_package(OpenSSL) module mode vs config mode OPENSSL_FOUND vs OpenSSL_FOUND

💡 Result:

Short answer

  • Module-mode (FindOpenSSL.cmake) historically set variables named OPENSSL_FOUND and other OPENSSL_* variables. Newer CMake versions add a canonical, mixed-case variable OpenSSL_FOUND and imported targets (OpenSSL::Crypto, OpenSSL::SSL). (cmake.org)
  • Config-mode (OpenSSLConfig.cmake provided by OpenSSL installs / packages) exposes the package’s config and usually defines OpenSSL_FOUND and the imported targets. (cmake.org)
  • OPENSSL_FOUND (all-caps) is the older, module-mode compatibility variable; OpenSSL_FOUND (mixed-case) is the modern canonical name (OpenSSL_FOUND was added in CMake 3.3 and OPENSSL_FOUND was later deprecated in recent CMake docs). Prefer checking the imported targets (target_exists/OpenSSL::SSL) or OpenSSL_FOUND. (cmake.org)

Recommendation (minimal)

  • Use targets when possible:
    target_link_libraries(myTarget PRIVATE OpenSSL::SSL OpenSSL::Crypto)
  • For boolean checks, prefer:
    if(OpenSSL_FOUND)
    ...
    elseif(OPENSSL_FOUND) # for older CMake compatibility
    ...
    endif()
    (cmake.org)

Citations:


Use target checking instead of OPENSSL_FOUND variable.

find_package(OpenSSL) in config mode sets OpenSSL_FOUND (mixed-case), not OPENSSL_FOUND (all-caps). The current guard prevents OpenSSL support when using config-mode packages. Check targets instead, since the code already depends on them and target checks work with both module and config modes.

🛠️ Suggested fix
 find_package(OpenSSL)
-if (OPENSSL_FOUND)
+if (TARGET OpenSSL::SSL AND TARGET OpenSSL::Crypto)
     file(GLOB_RECURSE BOOST_COROSIO_OPENSSL_HEADERS CONFIGURE_DEPENDS
         "${CMAKE_CURRENT_SOURCE_DIR}/include/boost/corosio/openssl/*.hpp")
@@
-endif ()
+endif ()
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
find_package(OpenSSL)
if (OpenSSL_FOUND)
if (OPENSSL_FOUND)
file(GLOB_RECURSE BOOST_COROSIO_OPENSSL_HEADERS CONFIGURE_DEPENDS
find_package(OpenSSL)
if (TARGET OpenSSL::SSL AND TARGET OpenSSL::Crypto)
file(GLOB_RECURSE BOOST_COROSIO_OPENSSL_HEADERS CONFIGURE_DEPENDS
"${CMAKE_CURRENT_SOURCE_DIR}/include/boost/corosio/openssl/*.hpp")
endif ()
🤖 Prompt for AI Agents
In `@CMakeLists.txt` around lines 216 - 218, The CMake guard uses the incorrect
all-caps variable OPENSSL_FOUND after calling find_package(OpenSSL), which
breaks config-mode usage; replace the variable check with a target-based check
(e.g., use if (TARGET OpenSSL::SSL) or if (TARGET OpenSSL::Crypto) or similar)
so the subsequent logic around find_package(OpenSSL) and the file(GLOB_RECURSE
BOOST_COROSIO_OPENSSL_HEADERS ...) block runs when the OpenSSL targets are
available regardless of module vs config mode; update any references that relied
on OPENSSL_FOUND to instead rely on the presence of the
OpenSSL::SSL/OpenSSL::Crypto targets.

"${CMAKE_CURRENT_SOURCE_DIR}/include/boost/corosio/openssl/*.hpp")
file(GLOB_RECURSE BOOST_COROSIO_OPENSSL_SOURCES CONFIGURE_DEPENDS
Expand Down
Empty file removed CMakePresets.json
Empty file.
41 changes: 41 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[width="100%",cols="7%,66%,27%",options="header",]
|===

|Branch
|https://github.com/cppalliance/corosio/tree/master[`master`]
|https://github.com/cppalliance/corosio/tree/develop[`develop`]

|https://develop.corosio.cpp.al/[Docs]
|https://master.corosio.cpp.al/[image:https://img.shields.io/badge/docs-master-brightgreen.svg[Documentation]]
|https://develop.corosio.cpp.al/[image:https://img.shields.io/badge/docs-develop-brightgreen.svg[Documentation]]

|https://github.com/[GitHub Actions]
|https://github.com/cppalliance/corosio/actions/workflows/ci.yml?query=branch%3Amaster[image:https://github.com/cppalliance/corosio/actions/workflows/ci.yml/badge.svg?branch=master[CI]]
|https://github.com/cppalliance/corosio/actions/workflows/ci.yml?query=branch%3Adevelop[image:https://github.com/cppalliance/corosio/actions/workflows/ci.yml/badge.svg?branch=develop[CI]]


|https://drone.io/[Drone]
|https://drone.cpp.al/cppalliance/corosio/branches[image:https://drone.cpp.al/api/badges/cppalliance/corosio/status.svg?ref=refs/heads/master[Build Status]]
|https://drone.cpp.al/cppalliance/corosio/branches[image:https://drone.cpp.al/api/badges/cppalliance/corosio/status.svg?ref=refs/heads/develop[Build Status]]

|https://codecov.io[Codecov]
|https://app.codecov.io/gh/cppalliance/corosio/tree/master[image:https://codecov.io/gh/cppalliance/corosio/branch/master/graph/badge.svg[codecov]]
|https://app.codecov.io/gh/cppalliance/corosio/tree/develop[image:https://codecov.io/gh/cppalliance/corosio/branch/develop/graph/badge.svg[codecov]]

|===

== Boost.Corosio

Boost.Corosio is a coroutine-first I/O library for C++20 that provides
asynchronous networking primitives with automatic executor affinity propagation.

Corosio provides asynchronous I/O operations designed from the ground up for
C++20 coroutines. Every operation returns an awaitable that integrates with
the _affine awaitable protocol_, ensuring your coroutines resume on the correct
executor without manual dispatch.

=== License

Distributed under the Boost Software License, Version 1.0.
(See accompanying file [LICENSE_1_0.txt](LICENSE_1_0.txt) or copy at
https://www.boost.org/LICENSE_1_0.txt)
Comment on lines +40 to +41
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Mixed Markdown and AsciiDoc syntax.

The license file link uses Markdown syntax [LICENSE_1_0.txt](LICENSE_1_0.txt) within an AsciiDoc file. Use AsciiDoc link syntax for consistency.

Suggested fix
-(See accompanying file [LICENSE_1_0.txt](LICENSE_1_0.txt) or copy at
+(See accompanying file link:LICENSE_1_0.txt[LICENSE_1_0.txt] or copy at
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
(See accompanying file [LICENSE_1_0.txt](LICENSE_1_0.txt) or copy at
https://www.boost.org/LICENSE_1_0.txt)
(See accompanying file link:LICENSE_1_0.txt[LICENSE_1_0.txt] or copy at
https://www.boost.org/LICENSE_1_0.txt)
🤖 Prompt for AI Agents
In `@README.adoc` around lines 40 - 41, Replace the Markdown-style link
"[LICENSE_1_0.txt](LICENSE_1_0.txt)" in README.adoc with AsciiDoc link syntax
(for example use link:LICENSE_1_0.txt[LICENSE_1_0.txt] or
xref:LICENSE_1_0.txt[]), updating the line that currently references
LICENSE_1_0.txt so the file uses consistent AsciiDoc link formatting.

Loading
Loading