Build system modernization and warning fixes - #9
Open
dfateyev wants to merge 4 commits into
Open
Conversation
Cast std::string::size() to int for BIO_write, and use std::streamsize for the loop comparing against istream::gcount().
- Fix -Wmaybe-uninitialized occurrences - Make RSA_sign/RSA_verify fail cleanly
- Set the C++ standard via CMAKE_CXX_STANDARD - Drop hardcoded /usr/local paths in favor of pkg-config results - Install the library via INSTALL(TARGETS) instead of hand-written INSTALL(FILES) rules - Link OpenSSL through imported targets - Only set CMAKE_BUILD_TYPE when not provided - Replace deprecated SUBDIRS() with ADD_SUBDIRECTORY()
- Reference RFC6376 (which obsoleted RFC4871) in the description - Declare libssl, libcrypto and libsodium in Requires.private so that static builders get the full dependency chain
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.
This PR cleans up all compiler warnings surfaced except the OpenSSL 3.0 deprecation notices, and modernizes the CMake rules.
-Wconversionand-Wsign-comparewarnings — caststd::string::size()tointforBIO_write(), usestd::streamsizewhen comparing againstistream::gcount().md_nidtoNID_undef— the digest algorithm switch has no default branch; a future unhandled enum value would pass an uninitializedNIDtoRSA_sign/RSA_verify. Also silences-Wmaybe-uninitialized./usr/localpaths in favor of pkg-config results (we no longer need to patch them out), install the library viaINSTALL(TARGETS)instead of hand-writtenINSTALL(FILES)rules, link OpenSSL through imported targets, set the C++ standard viaCMAKE_CXX_STANDARD, only setCMAKE_BUILD_TYPEwhen not provided, replace deprecatedSUBDIRS().Requires.privatefor static consumers.