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
15 changes: 14 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@ cmake_minimum_required(VERSION 3.18)
project(libgencmp)
set(LIBGENCMP_NAME gencmp)

include(ExternalProject)
ExternalProject_Add(
atg
GIT_REPOSITORY git@code.siemens.com:ct-rda-cst-ses-de/remote-attestation/base-functionality/attestation-token-generator
GIT_TAG ak/tcg-key-attestation-plugin
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
TEST_COMMAND ""
SOURCE_DIR atg
)

if(NOT DEFINED GENCMPCLIENT_VERSION)
set(GENCMPCLIENT_VERSION_MAJOR 2)
set(GENCMPCLIENT_VERSION_MINOR 2)
Expand Down Expand Up @@ -215,7 +227,7 @@ if(DEFINED USE_LIBCMP)
endif()

include_directories(
${INC_DIR}
${INC_DIR} ${PROJECT_SOURCE_DIR}/atg
)
if(DEFINED USE_LIBCMP)
include_directories(SYSTEM ${CMPOSSL_INC_DIR}/cmp)
Expand Down Expand Up @@ -288,6 +300,7 @@ target_link_libraries(cmpClient
# important: libcmp before libcrypto such that its contents are preferred
OpenSSL::Crypto
$<$<NOT:$<BOOL:${GENCMP_NO_TLS}>>:OpenSSL::SSL>
${PROJECT_SOURCE_DIR}/atg/atglib-key-attestation-demo/libatg.so
)
if(DEFINED ENV{SECUTILS_USE_UTA})
target_link_libraries(cmpClient uta)
Expand Down
15 changes: 15 additions & 0 deletions doCrWithRat.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
cd ./test/recipes/80-test_cmp_http_data/Mock
# gdb --args \
../../../../cmpClient \
-config ../test.cnf \
-section "Mock" -cmd cr \
-rats \
-tpmkd_tokenname "tcg-key-req" \
-tpmkd_tokencfgpath "../../../../atg/atglib-key-attestation-demo/token-cfg.json" \
-tpmkd_plugincfgpath "../../../../atg/atglib-key-attestation-demo/plugins.json" \
-tpmkd_nonce test_nonce_1234 \
-atcha_tokenname "tcg-key-chal" \
-atcha_tokencfgpath "../../../../atg/atglib-key-attestation-demo/token-cfg.json" \
-atcha_plugincfgpath "../../../../atg/atglib-key-attestation-demo/plugins.json" \
-atcha_nonce test_nonce_5678

4 changes: 4 additions & 0 deletions env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export OPENSSL_DIR=~/git/openssl
export OPENSSL_LIB=~/git/openssl
export LD_LIBRARY_PATH=~/git/openssl/:~/git/gencmpclient
export PATH=~/git/openssl/apps:$PATH
3 changes: 3 additions & 0 deletions runMock.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
cd ~/git/gencmpclient/test/recipes/80-test_cmp_http_data/Mock
openssl cmp -config server.cnf

Loading
Loading