Closed NAVEENJOYALEX closed 2 years ago
Hello, thanks for your report. The instructions on the wiki page unfortunately are outdated. I suggest to use instead the genCMPClient, which also supports building and using a standalone CMP library.
Hi @DDvO ,
Thank you for your response. I cloned the genCMPClient but the make target for "make get_submodules" is failing for openssl 1.1.1d
fatal: reference is not a tree: c78e5acd89dffd1dfd8068d0a5b310a44e5e371e Unable to checkout 'c78e5acd89dffd1dfd8068d0a5b310a44e5e371e' in submodule path 'cmpossl' Makefile:189: recipe for target 'cmpossl/include' failed
Is this because of unpushed commits in the cmpossl submodule?
BR.
Hmm, strange, something seems inconsistent with the submodules. This must be unrelated to the OpenSSL version (1.1.1d or whichever) to be used. I just tried myself the following, and it worked all fine:
cd /tmp && git clone https://github.com/siemens/gencmpclient.git
Cloning into 'gencmpclient'...
remote: Enumerating objects: 206, done.
remote: Counting objects: 100% (206/206), done.
remote: Compressing objects: 100% (150/150), done.
remote: Total 206 (delta 58), reused 186 (delta 40), pack-reused 0
Receiving objects: 100% (206/206), 7.90 MiB | 669.00 KiB/s, done.
Resolving deltas: 100% (58/58), done.
cd gencmpclient && make
detected OpenSSL version 1.1.x
enabling compilation with standalone CMP library
git submodule update --progress --init --depth 1 libsecutils
Submodule 'libsecutils' (http://github.com/siemens/libsecutils.git) registered for path 'libsecutils'
Cloning into '/tmp/gencmpclient/libsecutils'...
remote: Enumerating objects: 97, done.
remote: Counting objects: 100% (97/97), done.
remote: Compressing objects: 100% (88/88), done.
remote: Total 97 (delta 1), reused 70 (delta 0), pack-reused 0
Submodule path 'libsecutils': checked out '415b900b16fb7ff29db3c464d86a844b288646fc'
git submodule update --progress --init --depth 1 cmpossl
Submodule 'cmpossl' (http://github.com/mpeylo/cmpossl.git) registered for path 'cmpossl'
Cloning into '/tmp/gencmpclient/cmpossl'...
remote: Enumerating objects: 24198, done.
remote: Counting objects: 100% (24198/24198), done.
remote: Compressing objects: 100% (19273/19273), done.
remote: Total 24198 (delta 1768), reused 20734 (delta 1473), pack-reused 0
Receiving objects: 100% (24198/24198), 20.71 MiB | 593.00 KiB/s, done.
Resolving deltas: 100% (1768/1768), done.
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
remote: Enumerating objects: 4891, done.
remote: Counting objects: 100% (4891/4891), done.
remote: Compressing objects: 100% (2531/2531), done.
remote: Total 2738 (delta 2018), reused 483 (delta 186), pack-reused 0
Receiving objects: 100% (2738/2738), 2.89 MiB | 684.00 KiB/s, done.
Resolving deltas: 100% (2018/2018), completed with 1773 local objects.
From http://github.com/mpeylo/cmpossl
* branch c78e5acd89dffd1dfd8068d0a5b310a44e5e371e -> FETCH_HEAD
Submodule path 'cmpossl': checked out 'c78e5acd89dffd1dfd8068d0a5b310a44e5e371e'
make -C cmpossl -f Makefile_cmp build DEBUG_FLAGS="-g -O0 -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all " CFLAGS="-DOPENSSL_FUNC=__func__ " OUT_DIR="../." OPENSSL_DIR="/usr"
make[1]: Entering directory '/tmp/gencmpclient/cmpossl'
detected OpenSSL version 1.1.x
...
Thank you for checking it. The make targets work if the underlying version is 3.0.0 as only header files are populated in the cmpossl submodule.
For 1.1.1, it fails to checkout cmpossl.
detected OpenSSL version 1.1.x
enabling compilation with standalone CMP library
git submodule update --init --depth 1 libsecutils
Submodule 'libsecutils' (https://github.com/siemens/libsecutils.git) registered for path 'libsecutils'
Cloning into 'libsecutils'...
remote: Enumerating objects: 97, done.
remote: Counting objects: 100% (97/97), done.
remote: Compressing objects: 100% (88/88), done.
remote: Total 97 (delta 1), reused 70 (delta 0), pack-reused 0
Unpacking objects: 100% (97/97), done.
Checking connectivity... done.
Submodule path 'libsecutils': checked out '415b900b16fb7ff29db3c464d86a844b288646fc'
git submodule update --init --depth 1 cmpossl
Submodule 'cmpossl' (https://github.com/mpeylo/cmpossl.git) registered for path 'cmpossl'
Cloning into 'cmpossl'...
remote: Enumerating objects: 24198, done.
remote: Counting objects: 100% (24198/24198), done.
remote: Compressing objects: 100% (19273/19273), done.
remote: Total 24198 (delta 1768), reused 20734 (delta 1473), pack-reused 0
Receiving objects: 100% (24198/24198), 20.71 MiB | 4.04 MiB/s, done.
Resolving deltas: 100% (1768/1768), done.
Checking connectivity... done.
fatal: reference is not a tree: c78e5acd89dffd1dfd8068d0a5b310a44e5e371e
Unable to checkout 'c78e5acd89dffd1dfd8068d0a5b310a44e5e371e' in submodule path 'cmpossl'
Makefile:189: recipe for target 'cmpossl/include' failed
make: *** [cmpossl/include] Error 1
The cmpossl submodule head is at a commit different from the c78e5acd89dffd1dfd8068d0a5b310a44e5e371e tree.
genCMPClient/cmpossl$ git log
commit fb886a3d593f9382d7a175b130fa868066b66269
Author: Dr. David von Oheimb <David.von.Oheimb@siemens.com>
Date: Mon Mar 8 14:23:57 2021 +0100
add auto-generated doc/man1
Thank you.
Sorry to hear that you still have problems getting to the right commit.
It looks like for some reason you are on the wrong cmpossl
branch, namely cmp
:
commit fb886a3d593f9382d7a175b130fa868066b66269 (origin/cmp, origin/HEAD)
Author: Dr. David von Oheimb <David.von.Oheimb@siemens.com>
Date: Mon Mar 8 14:23:57 2021 +0100
add auto-generated doc/man1/openssl-cmp.pod for supporting direct viewing in web browsers
while the correct current branch for the standalone CMP library is cmp-lib4
.
What happens if you try manually correcting this as follows?
cd cmpossl && git checkout cmp-lib4
or
cd cmpossl && git checkout c78e5ac
And what is the output of cd cmpossl && git remote -v
?
Thanks DDvO, How can I add cmp-lib4 into the git pathspec? I am unable to check out them.
genCMPClient/cmpossl$ git remote -v
origin https://github.com/mpeylo/cmpossl.git (fetch)
origin https://github.com/mpeylo/cmpossl.git (push)
genCMPClient/cmpossl$ git checkout cmp-lib4
error: pathspec 'cmp-lib4' did not match any file(s) known to git.
genCMPClient/cmpossl$ git checkout c78e5ac
error: pathspec 'c78e5ac' did not match any file(s) known to git.
The remote is fine, so the issue must be elsewhere.
As a workaround, please do in the cmpossl
dir:
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
git fetch
git checkout cmp-lib4
This works, I can build the cmpClient app now. Thank you!
Hello Team,
I tried to dynamically load the libcmp following the wiki intructions. I am unable to include cmp.h and crmf.h in my application because of these errors: I have placed the -Wno-discarded-qualifiers -Wno-incompatible-pointer-types -Wno-unused-parameter pragmas.
Thank you.