-
Notifications
You must be signed in to change notification settings - Fork 836
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
ARIA cipher cmake #6600
ARIA cipher cmake #6600
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's strange to me that you need to modify .C and .H files to get CMake to build with ARIA. Feels like something is not being set right.
CMakeLists.txt
Outdated
if(BUILD_SHARED_LIBS) | ||
# message(STATUS "ARIA Check: SHARED! ${LIB_SOURCES}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably should remove debug code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
CMakeLists.txt
Outdated
list(APPEND WOLFSSL_DEFINITIONS | ||
"-DHAVE_PTHREAD" | ||
# "-DHAVE_PTHREAD" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR should possibly be based on the PTHREAD issue being resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this is resolved. I will pull the threading correction to a different PR.
CMakeLists.txt
Outdated
cmake_minimum_required(VERSION 3.16) | ||
# set(CMAKE_BINARY_DIR "${CMAKE_BINARY_DIR}/build") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove dead code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
CMakeLists.txt
Outdated
"no" "yes;no") | ||
|
||
if(0) | ||
get_cmake_property(_variableNames VARIABLES) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove debug code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
CMakeLists.txt
Outdated
@@ -1882,6 +1918,9 @@ if (WOLFSSL_CAAM) | |||
list(APPEND WOLFSSL_DEFINITIONS "-DWOLFSSL_CAAM") | |||
endif() | |||
|
|||
if (WOLFSSL_ARIA) | |||
list(APPEND WOLFSSL_DEFINITIONS "-DWOLFSSL_ARIA") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gut feeling is that this should be HAVE_ARIA
instead of WOLFSSL_ARIA
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ooph, good catch!
I've removed the stray debug info files, added a couple of CMake README files, and put the CMake threading logic change in a separate PR (see #6606). I've confirmed this now works with Windows CMake (Visual Studio 2022 command prompt). For example the
A separate issue that may need to be addressed: the Cmake-compiled examples for Windows do not immediately work fresh out of the box. Trying to run the executable, there's no error message, but nothing happens. This occurs when the wolfSSL dll's are not installed in the system. The current debug environment does not find them in the build directory. If I manually copy them, for example the 4 files created in the
... to each of the respective example output directories: |
As noted in #6606 (comment) there may be a known problem in master unrelated to this PR. I've reverted the The result is that all of the examples do not compile successfully with CMake in Windows for the ARIA ciphers. The test client and server do compile successfully with CMake, in Windows and Linux, with and without the ARIA ciphers. |
Please check the additional includes in other example files. For example client.c. |
ok, I've removed all references of the ARIA Please let me know if you see anything else that can be improved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works as described. Just a few minor documentation fixes needed.
@@ -110,6 +110,55 @@ | |||
|
|||
To build with debugging use: `cmake .. -DCMAKE_BUILD_TYPE=Debug`. | |||
|
|||
In the simplest form: | |||
|
|||
# create a root directory for wolfssl repo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps not include the ./autogen.sh and ./configure example step for CMake?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah yes, good. I removed those lines from the docs.
cmake/README.md
Outdated
|
||
This directory contains some supplementary functions for the [CMakeLists.txt](../CMakeLists.txt) in the root. | ||
|
||
See also the [README_cmake.md](../README_cmake.md) file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix. No longer README_cmake.md.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated that to instead reference the root INSTALL
document.
All checks pass. @dgarske let me know if you'd prefer I squash the 14 commits in this PR. |
I squashed on merge. Thanks |
Description
This is an initial
cmake
PR for the MagicCrypto ARIA cipher suite as a supplement to #6400.Currently the ARIA build automatically includes the MagicCrypto ciphers when the
ARIA_DIR
environmentvariable is defined with a valid path to the directory structure extracted with
tar -xvf MagicCrypto.tar.gz
.Reminder: Copy the contents of the
MagicCrypto
directory into the root of the wolfssl directory. Otherwise this error is observed during./configure
To use
cmake
, theMagicCrypto
directory can be either in the wolfSSL tree, or specified with an environment variable:ARIA_DIR
.Note this PR has since been updated to NOT enable ARIA just because an environment variable
ARIA_DIR
is defined.Enable ARIA with
-DWOLFSSL_ARIA=yes
cmake parameter.Build wolfSSL
For reference only, here is how to build using
make
Run CMake build
Fixes zd# n/a
Testing
There's a new ARIA CMake test script that checks:
Windows Server Testing:
Unzip your
MagicCrypto.tar.gz
, shown here forC:\workspace\MagicCrypto
Linux Server Testing:
Server:
Client:
Checklist