-
-
Notifications
You must be signed in to change notification settings - Fork 244
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
Errors after upgrade #99
Comments
The EVP_sha256 error is definitly a typo. Which OpenSSL version are you using ? |
Ok, my fault. I've installed from sources LibreSSL :( but I also have OpenSSL installed v.1.1.1g But if i reset to this eee4f7c (this commit I was using) jwt compiles |
Thats because the missing functions are used in the edDSA support that got merged after this tag. |
@Thalhammer Ok, thaks for help. So I wait for fix. Best regards |
Hello, when we can expect properly fix it? The problem still occurs :( /home/marcin/projects/nms_new/back/lib/jwt/include/jwt-cpp/jwt.h:970:9: error: ‘EVP_DigestSign’ was not declared in this scope; did you mean ‘EVP_DigestSignInit’?
970 | if (EVP_DigestSign(ctx.get(),
| ^~~~~~~~~~~~~~
| EVP_DigestSignInit |
Can you please confirm with library you are using? Are you trying to compile with LibreSSL (at which version) or openssl v1.1.1g? |
$ openssl version
OpenSSL 1.1.1g 21 Apr 2020
$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Thread model: posix
gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04) |
I am not able to reproduce any issue with ubuntu 20.04 gcc-9.3 and openssl/1.1.1f. I see this function has been available for several years, https://github.com/openssl/openssl/blame/85209c07459b1c6007e0fc550f40c05deec78531/include/openssl/evp.h#L698 Since this does not seem be a jwt-cpp issue, you'll need to investigate why your openssl installation is missing parts of the API. |
Ok, I'll check it on other system, but I reset into |
@nicraMarcin Are you actually sure you are linking against that openssl install ? |
@Thalhammer Truly speaking, no :/ so I have to check it at other system. |
Because if you were linking against libressl instead it would explain the error you are seeing. Libressl does not have the function we are using there. |
Ok, this is from OpenSSL. I removed my LibreSSL and installed into custom folder.
|
I tried to install jwt-cpp (not as submodule) and the same result root@marcin-huawei:/tmp/jwt-cpp/build# cmake ..
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found suitable version "1.1.1g", minimum required is "1.0.2")
-- Found GTest: /usr/lib/x86_64-linux-gnu/libgtest.a
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/jwt-cpp/build
root@marcin-huawei:/tmp/jwt-cpp/build# make
Scanning dependencies of target jwt-cpp-test
[ 5%] Building CXX object tests/CMakeFiles/jwt-cpp-test.dir/BaseTest.cpp.o
[ 11%] Building CXX object tests/CMakeFiles/jwt-cpp-test.dir/ClaimTest.cpp.o
[ 16%] Building CXX object tests/CMakeFiles/jwt-cpp-test.dir/Keys.cpp.o
[ 22%] Building CXX object tests/CMakeFiles/jwt-cpp-test.dir/HelperTest.cpp.o
[ 27%] Building CXX object tests/CMakeFiles/jwt-cpp-test.dir/TestMain.cpp.o
[ 33%] Building CXX object tests/CMakeFiles/jwt-cpp-test.dir/TokenFormatTest.cpp.o
[ 38%] Building CXX object tests/CMakeFiles/jwt-cpp-test.dir/TokenTest.cpp.o
[ 44%] Building CXX object tests/CMakeFiles/jwt-cpp-test.dir/NlohmannTest.cpp.o
[ 50%] Building CXX object tests/CMakeFiles/jwt-cpp-test.dir/OpenSSLErrorTest.cpp.o
[ 55%] Linking CXX executable jwt-cpp-test
[ 55%] Built target jwt-cpp-test
Scanning dependencies of target rsa-verify
[ 61%] Building CXX object example/CMakeFiles/rsa-verify.dir/rsa-verify.cpp.o
[ 66%] Linking CXX executable rsa-verify
[ 66%] Built target rsa-verify
Scanning dependencies of target rsa-create
[ 72%] Building CXX object example/CMakeFiles/rsa-create.dir/rsa-create.cpp.o
[ 77%] Linking CXX executable rsa-create
[ 77%] Built target rsa-create
Scanning dependencies of target private-claims
[ 83%] Building CXX object example/CMakeFiles/private-claims.dir/private-claims.cpp.o
[ 88%] Linking CXX executable private-claims
[ 88%] Built target private-claims
Scanning dependencies of target print-claims
[ 94%] Building CXX object example/CMakeFiles/print-claims.dir/print-claims.cpp.o
[100%] Linking CXX executable print-claims
[100%] Built target print-claims
root@marcin-huawei:/tmp/jwt-cpp/build# make install
[ 55%] Built target jwt-cpp-test
[ 66%] Built target rsa-verify
[ 77%] Built target rsa-create
[ 88%] Built target private-claims
[100%] Built target print-claims
Install the project...
-- Install configuration: ""
-- Up-to-date: /usr/local/include/jwt-cpp/jwt.h
-- Up-to-date: /usr/local/include/jwt-cpp/base.h
-- Up-to-date: /usr/local/include/picojson/picojson.h
-- Installing: /usr/local/jwt-cpp/jwt-cpp.cmake
-- Installing: /usr/local/jwt-cpp/jwt-cpp-config.cmake
-- Installing: /usr/local/jwt-cpp/jwt-cpp-config-version.cmake
root@marcin-huawei:/tmp/jwt-cpp/build# And from my project:
And this is where I'm using submodule
As you can see there are different paths, but the same error In both cases I reset head
And works |
Ok, I think this could be my problem caused by earlier install of LibreSSL :( |
The proper fix would be replacing EVP_DigestVerify with the (more verbose) code to support libressl as well, which is tracked here: #100 . Stick with the last commit that works for you, I'll ping you once I have a fix for you to try out. |
Cool thanks |
@nicraMarcin can you check if the changes in 782acc0 fix your problem ? |
Compiles, but with this I have Segmentation Fault :( |
can you do a back trace (at least of everything within jwt-cpp) ? |
I have to finish for today. I'll paste when I'll check |
Ok, works, my segmentation fault was caused by other issue. |
Hello,
today I've upgraded jwt-cpp and I have compiler errors:
What's wrong?
The text was updated successfully, but these errors were encountered: