Merge branch 'development' into development-restricted
* development: (46 commits) Update ChangeLog header. Bump version to Mbed TLS 2.23.0 Assemble changelog cmake: Add comment about mbedtls_test target programs: psa: Link against mbedcrypto not mbedtls Use mbedtls_test_unhexify in programs Rework mbedtls_test_unhexify() tests: Get rid of mbedtls_test_unhexify() in unit test code tests: ccm: Prepare to char* to data_t* type change tests: aes.ofb: Prepare to char* to data_t* type change tests: nist_kw: Prepare to char* to data_t* type change tests: chacha20: Prepare to char* to data_t* type change tests: hkdf: Prepare to char* to data_t* type change tests: aria: Prepare to char* to data_t* type change programs: Link to tests common code build: Add top-level mbedtls_test target programs: cmake: Use list of executables programs: cmake: Fix relative path warnings programs: ssl: cmake: Add missing executables programs: ssl: cmake: Reorder declaration of executables ...
This commit is contained in:
commit
bfbdca8bb4
136 changed files with 1206 additions and 1377 deletions
8
3rdparty/CMakeLists.txt
vendored
8
3rdparty/CMakeLists.txt
vendored
|
@ -1,11 +1,17 @@
|
|||
list (APPEND thirdparty_src)
|
||||
list (APPEND thirdparty_lib)
|
||||
list (APPEND thirdparty_inc_public)
|
||||
list (APPEND thirdparty_inc)
|
||||
list (APPEND thirdparty_def)
|
||||
|
||||
add_subdirectory(everest)
|
||||
execute_process(COMMAND ${MBEDTLS_PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/config.py -f ${CMAKE_CURRENT_SOURCE_DIR}/../include/mbedtls/config.h get MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED RESULT_VARIABLE result)
|
||||
|
||||
if(${result} EQUAL 0)
|
||||
add_subdirectory(everest)
|
||||
endif()
|
||||
|
||||
set(thirdparty_src ${thirdparty_src} PARENT_SCOPE)
|
||||
set(thirdparty_lib ${thirdparty_lib} PARENT_SCOPE)
|
||||
set(thirdparty_inc_public ${thirdparty_inc_public} PARENT_SCOPE)
|
||||
set(thirdparty_inc ${thirdparty_inc} PARENT_SCOPE)
|
||||
set(thirdparty_def ${thirdparty_def} PARENT_SCOPE)
|
||||
|
|
25
3rdparty/everest/CMakeLists.txt
vendored
25
3rdparty/everest/CMakeLists.txt
vendored
|
@ -1,4 +1,5 @@
|
|||
list (APPEND everest_src)
|
||||
list (APPEND everest_inc_public)
|
||||
list (APPEND everest_inc)
|
||||
list (APPEND everest_def)
|
||||
|
||||
|
@ -8,24 +9,20 @@ set(everest_src
|
|||
${CMAKE_CURRENT_SOURCE_DIR}/library/Hacl_Curve25519_joined.c
|
||||
)
|
||||
|
||||
list(APPEND everest_inc ${CMAKE_CURRENT_SOURCE_DIR}/include ${CMAKE_CURRENT_SOURCE_DIR}/include/everest ${CMAKE_CURRENT_SOURCE_DIR}/include/everest/kremlib)
|
||||
list(APPEND everest_inc_public ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
list(APPEND everest_inc ${CMAKE_CURRENT_SOURCE_DIR}/include/everest ${CMAKE_CURRENT_SOURCE_DIR}/include/everest/kremlib)
|
||||
|
||||
execute_process(COMMAND ${MBEDTLS_PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/../../scripts/config.py -f ${CMAKE_CURRENT_SOURCE_DIR}/../../include/mbedtls/config.h get MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED RESULT_VARIABLE result)
|
||||
if(INSTALL_MBEDTLS_HEADERS)
|
||||
|
||||
if(${result} EQUAL 0)
|
||||
install(DIRECTORY include/everest
|
||||
DESTINATION include
|
||||
FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
|
||||
DIRECTORY_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
|
||||
FILES_MATCHING PATTERN "*.h")
|
||||
|
||||
if(INSTALL_MBEDTLS_HEADERS)
|
||||
|
||||
install(DIRECTORY include/everest
|
||||
DESTINATION include
|
||||
FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
|
||||
DIRECTORY_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
|
||||
FILES_MATCHING PATTERN "*.h")
|
||||
|
||||
endif(INSTALL_MBEDTLS_HEADERS)
|
||||
|
||||
endif()
|
||||
endif(INSTALL_MBEDTLS_HEADERS)
|
||||
|
||||
set(thirdparty_src ${thirdparty_src} ${everest_src} PARENT_SCOPE)
|
||||
set(thirdparty_inc_public ${thirdparty_inc_public} ${everest_inc_public} PARENT_SCOPE)
|
||||
set(thirdparty_inc ${thirdparty_inc} ${everest_inc} PARENT_SCOPE)
|
||||
set(thirdparty_def ${thirdparty_def} ${everest_def} PARENT_SCOPE)
|
||||
|
|
|
@ -1,3 +1,21 @@
|
|||
#
|
||||
# CMake build system design considerations:
|
||||
#
|
||||
# - Include directories:
|
||||
# + Do not define include directories globally using the include_directories
|
||||
# command but rather at the target level using the
|
||||
# target_include_directories command. That way, it is easier to guarantee
|
||||
# that targets are built using the proper list of include directories.
|
||||
# + Use the PUBLIC and PRIVATE keywords to specifiy the scope of include
|
||||
# directories. That way, a target linking to a library (using the
|
||||
# target_link_librairies command) inherits from the library PUBLIC include
|
||||
# directories and not from the PRIVATE ones.
|
||||
# + Note: there is currently one remaining include_directories command in the
|
||||
# CMake files. It is related to ZLIB support which is planned to be removed.
|
||||
# When the support is removed, the associated include_directories command
|
||||
# will be removed as well as this note.
|
||||
#
|
||||
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
if(TEST_CPP)
|
||||
project("mbed TLS" C CXX)
|
||||
|
@ -205,9 +223,6 @@ else()
|
|||
set(LIB_INSTALL_DIR lib)
|
||||
endif()
|
||||
|
||||
include_directories(include/)
|
||||
include_directories(library/)
|
||||
|
||||
if(ENABLE_ZLIB_SUPPORT)
|
||||
find_package(ZLIB)
|
||||
|
||||
|
@ -219,12 +234,33 @@ endif(ENABLE_ZLIB_SUPPORT)
|
|||
add_subdirectory(include)
|
||||
|
||||
add_subdirectory(3rdparty)
|
||||
include_directories(${thirdparty_inc})
|
||||
list(APPEND libs ${thirdparty_lib})
|
||||
add_definitions(${thirdparty_def})
|
||||
|
||||
add_subdirectory(library)
|
||||
|
||||
#
|
||||
# The C files in tests/src directory contain test code shared among test suites
|
||||
# and programs. This shared test code is compiled and linked to test suites and
|
||||
# programs objects as a set of compiled objects. The compiled objects are NOT
|
||||
# built into a library that the test suite and program objects would link
|
||||
# against as they link against the mbedcrypto, mbedx509 and mbedtls libraries.
|
||||
# The reason is that such library is expected to have mutual dependencies with
|
||||
# the aforementioned libraries and that there is as of today no portable way of
|
||||
# handling such dependencies (only toolchain specific solutions).
|
||||
#
|
||||
# Thus the below definition of the `mbedtls_test` CMake library of objects
|
||||
# target. This library of objects is used by tests and programs CMake files
|
||||
# to define the test executables.
|
||||
#
|
||||
if(ENABLE_TESTING OR ENABLE_PROGRAMS)
|
||||
file(GLOB MBEDTLS_TEST_FILES ${CMAKE_CURRENT_SOURCE_DIR}/tests/src/*.c)
|
||||
add_library(mbedtls_test OBJECT ${MBEDTLS_TEST_FILES})
|
||||
target_include_directories(mbedtls_test
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/tests/include
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/library)
|
||||
endif()
|
||||
|
||||
if(ENABLE_PROGRAMS)
|
||||
add_subdirectory(programs)
|
||||
endif()
|
||||
|
|
123
ChangeLog
123
ChangeLog
|
@ -1,5 +1,128 @@
|
|||
mbed TLS ChangeLog (Sorted per branch, date)
|
||||
|
||||
= mbed TLS 2.23.0 branch released 2020-07-01
|
||||
|
||||
Default behavior changes
|
||||
* In the experimental PSA secure element interface, change the encoding of
|
||||
key lifetimes to encode a persistence level and the location. Although C
|
||||
prototypes do not effectively change, code calling
|
||||
psa_register_se_driver() must be modified to pass the driver's location
|
||||
instead of the keys' lifetime. If the library is upgraded on an existing
|
||||
device, keys created with the old lifetime value will not be readable or
|
||||
removable through Mbed TLS after the upgrade.
|
||||
|
||||
Features
|
||||
* New functions in the error module return constant strings for
|
||||
high- and low-level error codes, complementing mbedtls_strerror()
|
||||
which constructs a string for any error code, including compound
|
||||
ones, but requires a writable buffer. Contributed by Gaurav Aggarwal
|
||||
in #3176.
|
||||
* The new utility programs/ssl/ssl_context_info prints a human-readable
|
||||
dump of an SSL context saved with mbedtls_ssl_context_save().
|
||||
* Add support for midipix, a POSIX layer for Microsoft Windows.
|
||||
* Add new mbedtls_x509_crt_parse_der_with_ext_cb() routine which allows
|
||||
parsing unsupported certificate extensions via user provided callback.
|
||||
Contributed by Nicola Di Lieto <nicola.dilieto@gmail.com> in #3243 as
|
||||
a solution to #3241.
|
||||
* Pass the "certificate policies" extension to the callback supplied to
|
||||
mbedtls_x509_crt_parse_der_with_ext_cb() if it contains unsupported
|
||||
policies (#3419).
|
||||
* Added support to entropy_poll for the kern.arandom syscall supported on
|
||||
some BSD systems. Contributed by Nia Alarie in #3423.
|
||||
* Add support for Windows 2000 in net_sockets. Contributed by opatomic. #3239
|
||||
|
||||
Security
|
||||
* Fix a side channel vulnerability in modular exponentiation that could
|
||||
reveal an RSA private key used in a secure enclave. Noticed by Sangho Lee,
|
||||
Ming-Wei Shih, Prasun Gera, Taesoo Kim and Hyesoon Kim (Georgia Institute
|
||||
of Technology); and Marcus Peinado (Microsoft Research). Reported by Raoul
|
||||
Strackx (Fortanix) in #3394.
|
||||
* Fix side channel in mbedtls_ecp_check_pub_priv() and
|
||||
mbedtls_pk_parse_key() / mbedtls_pk_parse_keyfile() (when loading a
|
||||
private key that didn't include the uncompressed public key), as well as
|
||||
mbedtls_ecp_mul() / mbedtls_ecp_mul_restartable() when called with a NULL
|
||||
f_rng argument. An attacker with access to precise enough timing and
|
||||
memory access information (typically an untrusted operating system
|
||||
attacking a secure enclave) could fully recover the ECC private key.
|
||||
Found and reported by Alejandro Cabrera Aldaya and Billy Brumley.
|
||||
* Fix issue in Lucky 13 counter-measure that could make it ineffective when
|
||||
hardware accelerators were used (using one of the MBEDTLS_SHAxxx_ALT
|
||||
macros). This would cause the original Lucky 13 attack to be possible in
|
||||
those configurations, allowing an active network attacker to recover
|
||||
plaintext after repeated timing measurements under some conditions.
|
||||
Reported and fix suggested by Luc Perneel in #3246.
|
||||
|
||||
Bugfix
|
||||
* Fix the Visual Studio Release x64 build configuration for mbedtls itself.
|
||||
Completes a previous fix in Mbed TLS 2.19 that only fixed the build for
|
||||
the example programs. Reported in #1430 and fix contributed by irwir.
|
||||
* Fix undefined behavior in X.509 certificate parsing if the
|
||||
pathLenConstraint basic constraint value is equal to INT_MAX.
|
||||
The actual effect with almost every compiler is the intended
|
||||
behavior, so this is unlikely to be exploitable anywhere. #3192
|
||||
* Fix issue with a detected HW accelerated record error not being exposed
|
||||
due to shadowed variable. Contributed by Sander Visser in #3310.
|
||||
* Avoid NULL pointer dereferencing if mbedtls_ssl_free() is called with a
|
||||
NULL pointer argument. Contributed by Sander Visser in #3312.
|
||||
* Fix potential linker errors on dual world platforms by inlining
|
||||
mbedtls_gcc_group_to_psa(). This allows the pk.c module to link separately
|
||||
from psa_crypto.c. Fixes #3300.
|
||||
* Remove dead code in X.509 certificate parsing. Contributed by irwir in
|
||||
#2855.
|
||||
* Include asn1.h in error.c. Fixes #3328 reported by David Hu.
|
||||
* Fix potential memory leaks in ecp_randomize_jac() and ecp_randomize_mxz()
|
||||
when PRNG function fails. Contributed by Jonas Lejeune in #3318.
|
||||
* Remove unused macros from MSVC projects. Reported in #3297 and fix
|
||||
submitted in #3333 by irwir.
|
||||
* Add additional bounds checks in ssl_write_client_hello() preventing
|
||||
output buffer overflow if the configuration declared a buffer that was
|
||||
too small.
|
||||
* Set _POSIX_C_SOURCE to at least 200112L in C99 code. Reported in #3420 and
|
||||
fix submitted in #3421 by Nia Alarie.
|
||||
* Fix building library/net_sockets.c and the ssl_mail_client program on
|
||||
NetBSD. Contributed by Nia Alarie in #3422.
|
||||
* Fix false positive uninitialised variable reported by cpp-check.
|
||||
Contributed by Sander Visser in #3311.
|
||||
* Update iv and len context pointers manually when reallocating buffers
|
||||
using the MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH feature. This caused issues
|
||||
when receiving a connection with CID, when these fields were shifted
|
||||
in ssl_parse_record_header().
|
||||
|
||||
Changes
|
||||
* Fix warnings about signedness issues in format strings. The build is now
|
||||
clean of -Wformat-signedness warnings. Contributed by Kenneth Soerensen
|
||||
in #3153.
|
||||
* Fix minor performance issue in operations on Curve25519 caused by using a
|
||||
suboptimal modular reduction in one place. Found and fix contributed by
|
||||
Aurelien Jarno in #3209.
|
||||
* Combine identical cases in switch statements in md.c. Contributed
|
||||
by irwir in #3208.
|
||||
* Simplify a bounds check in ssl_write_certificate_request(). Contributed
|
||||
by irwir in #3150.
|
||||
* Unify the example programs termination to call mbedtls_exit() instead of
|
||||
using a return command. This has been done to enable customization of the
|
||||
behavior in bare metal environments.
|
||||
* Fix mbedtls_x509_dn_gets to escape non-ASCII characters as "?".
|
||||
Contributed by Koh M. Nakagawa in #3326.
|
||||
* Use FindPython3 when cmake version >= 3.15.0
|
||||
* Abort the ClientHello writing function as soon as some extension doesn't
|
||||
fit into the record buffer. Previously, such extensions were silently
|
||||
dropped. As a consequence, the TLS handshake now fails when the output
|
||||
buffer is not large enough to hold the ClientHello.
|
||||
* The unit tests now rely on header files in tests/include/test and source
|
||||
files in tests/src. When building with make or cmake, the files in
|
||||
tests/src are compiled and the resulting object linked into each test
|
||||
executable.
|
||||
* The ECP module, enabled by `MBEDTLS_ECP_C`, now depends on
|
||||
`MBEDTLS_CTR_DRBG_C` or `MBEDTLS_HMAC_DRBG_C` for some side-channel
|
||||
coutermeasures. If side channels are not a concern, this dependency can
|
||||
be avoided by enabling the new option `MBEDTLS_ECP_NO_INTERNAL_RNG`.
|
||||
* Align MSVC error flag with GCC and Clang. Contributed by Carlos Gomes
|
||||
Martinho. #3147
|
||||
* Remove superfluous assignment in mbedtls_ssl_parse_certificate(). Reported
|
||||
in #3182 and fix submitted by irwir. #3217
|
||||
* Fix typo in XTS tests. Reported and fix submitted by Kxuan. #3319
|
||||
|
||||
= mbed TLS 2.22.0 branch released 2020-04-14
|
||||
|
||||
New deprecations
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
Bugfix
|
||||
* Fix the Visual Studio Release x64 build configuration for mbedtls itself.
|
||||
Completes a previous fix in Mbed TLS 2.19 that only fixed the build for
|
||||
the example programs. Reported in #1430 and fix contributed by irwir.
|
|
@ -1,2 +0,0 @@
|
|||
Bugfix
|
||||
* Remove dead code in X.509 certificate parsing. Contributed by irwir in #2855.
|
|
@ -1,2 +0,0 @@
|
|||
Bugfix
|
||||
* Remove unused macros from MSVC projects. Reported in #3297 and fix submitted in #3333 by irwir.
|
|
@ -1,5 +0,0 @@
|
|||
Bugfix
|
||||
* Update iv and len context pointers manually when reallocating buffers
|
||||
using the MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH feature. This caused issues
|
||||
when receiving a connection with CID, when these fields were shifted
|
||||
in ssl_parse_record_header().
|
|
@ -1,2 +0,0 @@
|
|||
Bugfix
|
||||
* Set _POSIX_C_SOURCE to at least 200112L in C99 code. Reported in #3420 and fix submitted in #3421 by Nia Alarie.
|
|
@ -1,2 +0,0 @@
|
|||
Bugfix
|
||||
* Fix building library/net_sockets.c and the ssl_mail_client program on NetBSD. Contributed by Nia Alarie in #3422.
|
4
ChangeLog.d/do_not_persist_volatile_external_keys.txt
Normal file
4
ChangeLog.d/do_not_persist_volatile_external_keys.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
Default behavior changes
|
||||
* Stop storing persistent information about externally stored keys created
|
||||
through PSA Crypto with a volatile lifetime. Reported in #3288 and
|
||||
contributed by Steven Cooreman in #3382.
|
|
@ -1,15 +0,0 @@
|
|||
Changes
|
||||
* The ECP module, enabled by `MBEDTLS_ECP_C`, now depends on
|
||||
`MBEDTLS_CTR_DRBG_C` or `MBEDTLS_HMAC_DRBG_C` for some side-channel
|
||||
coutermeasures. If side channels are not a concern, this dependency can
|
||||
be avoided by enabling the new option `MBEDTLS_ECP_NO_INTERNAL_RNG`.
|
||||
|
||||
Security
|
||||
* Fix side channel in mbedtls_ecp_check_pub_priv() and
|
||||
mbedtls_pk_parse_key() / mbedtls_pk_parse_keyfile() (when loading a
|
||||
private key that didn't include the uncompressed public key), as well as
|
||||
mbedtls_ecp_mul() / mbedtls_ecp_mul_restartable() when called with a NULL
|
||||
f_rng argument. An attacker with access to precise enough timing and
|
||||
memory access information (typically an untrusted operating system
|
||||
attacking a secure enclave) could fully recover the ECC private key.
|
||||
Found and reported by Alejandro Cabrera Aldaya and Billy Brumley.
|
|
@ -1,2 +0,0 @@
|
|||
Bugfix
|
||||
* Include asn1.h in error.c. Fixes #3328 reported by David Hu.
|
|
@ -1,6 +0,0 @@
|
|||
Features
|
||||
* New functions in the error module return constant strings for
|
||||
high- and low-level error codes, complementing mbedtls_strerror()
|
||||
which constructs a string for any error code, including compound
|
||||
ones, but requires a writable buffer. Contributed by Gaurav Aggarwal
|
||||
in #3176.
|
|
@ -1,3 +0,0 @@
|
|||
Bugfix
|
||||
* Fix potential memory leaks in ecp_randomize_jac() and ecp_randomize_mxz()
|
||||
when PRNG function fails. Contributed by Jonas Lejeune in #3318.
|
|
@ -1,4 +0,0 @@
|
|||
Changes
|
||||
* Fix minor performance issue in operations on Curve25519 caused by using a
|
||||
suboptimal modular reduction in one place. Found and fix contributed by
|
||||
Aurelien Jarno in #3209.
|
|
@ -1,4 +0,0 @@
|
|||
Changes
|
||||
* Fix warnings about signedness issues in format strings. The build is now
|
||||
clean of -Wformat-signedness warnings. Contributed by Kenneth Soerensen
|
||||
in #3153.
|
|
@ -1,3 +0,0 @@
|
|||
Bugfix
|
||||
* Fix issue with a detected HW accelerated record error not being exposed
|
||||
due to shadowed variable. Contributed by Sander Visser in #3310.
|
|
@ -1,3 +0,0 @@
|
|||
Bugfix
|
||||
* Avoid NULL pointer dereferencing if mbedtls_ssl_free() is called with a
|
||||
NULL pointer argument. Contributed by Sander Visser in #3312.
|
|
@ -1,3 +0,0 @@
|
|||
Changes
|
||||
* Fix mbedtls_x509_dn_gets to escape non-ASCII characters as "?".
|
||||
Contributed by Koh M. Nakagawa in #3326.
|
|
@ -1,4 +0,0 @@
|
|||
Bugfix
|
||||
* Fix potential linker errors on dual world platforms by inlining
|
||||
mbedtls_gcc_group_to_psa(). This allows the pk.c module to link separately
|
||||
from psa_crypto.c. Fixes #3300.
|
|
@ -1,7 +0,0 @@
|
|||
Security
|
||||
* Fix issue in Lucky 13 counter-measure that could make it ineffective when
|
||||
hardware accelerators were used (using one of the MBEDTLS_SHAxxx_ALT
|
||||
macros). This would cause the original Lucky 13 attack to be possible in
|
||||
those configurations, allowing an active network attacker to recover
|
||||
plaintext after repeated timing measurements under some conditions.
|
||||
Reported and fix suggested by Luc Perneel in #3246.
|
|
@ -1,5 +0,0 @@
|
|||
Bugfix
|
||||
* Fix undefined behavior in X.509 certificate parsing if the
|
||||
pathLenConstraint basic constraint value is equal to INT_MAX.
|
||||
The actual effect with almost every compiler is the intended
|
||||
behavior, so this is unlikely to be exploitable anywhere. #3192
|
|
@ -1,3 +0,0 @@
|
|||
Changes
|
||||
* Combine identical cases in switch statements in md.c. Contributed
|
||||
by irwir in #3208.
|
|
@ -1,2 +0,0 @@
|
|||
Features
|
||||
* Add support for midipix, a POSIX layer for Microsoft Windows.
|
|
@ -1,6 +0,0 @@
|
|||
Security
|
||||
* Fix a side channel vulnerability in modular exponentiation that could
|
||||
reveal an RSA private key used in a secure enclave. Noticed by Sangho Lee,
|
||||
Ming-Wei Shih, Prasun Gera, Taesoo Kim and Hyesoon Kim (Georgia Institute
|
||||
of Technology); and Marcus Peinado (Microsoft Research). Reported by Raoul
|
||||
Strackx (Fortanix) in #3394.
|
|
@ -1,5 +0,0 @@
|
|||
Features
|
||||
* Add new mbedtls_x509_crt_parse_der_with_ext_cb() routine which allows
|
||||
parsing unsupported certificate extensions via user provided callback.
|
||||
Contributed by Nicola Di Lieto <nicola.dilieto@gmail.com> in #3243 as
|
||||
a solution to #3241.
|
|
@ -1,4 +0,0 @@
|
|||
Features
|
||||
* Pass the "certificate policies" extension to the callback supplied to
|
||||
mbedtls_x509_crt_parse_der_with_ext_cb() if it contains unsupported
|
||||
policies (#3419).
|
|
@ -1,8 +0,0 @@
|
|||
Default behavior changes
|
||||
* In the experimental PSA secure element interface, change the encoding of
|
||||
key lifetimes to encode a persistence level and the location. Although C
|
||||
prototypes do not effectively change, code calling
|
||||
psa_register_se_driver() must be modified to pass the driver's location
|
||||
instead of the keys' lifetime. If the library is upgraded on an existing
|
||||
device, keys created with the old lifetime value will not be readable or
|
||||
removable through Mbed TLS after the upgrade.
|
|
@ -1,3 +0,0 @@
|
|||
Features
|
||||
* The new utility programs/ssl/ssl_context_info prints a human-readable
|
||||
dump of an SSL context saved with mbedtls_ssl_context_save().
|
|
@ -1,3 +0,0 @@
|
|||
Changes
|
||||
* Simplify a bounds check in ssl_write_certificate_request(). Contributed
|
||||
by irwir in #3150.
|
|
@ -1,2 +0,0 @@
|
|||
Features
|
||||
* Added support to entropy_poll for the kern.arandom syscall supported on some BSD systems. Contributed by Nia Alarie in #3423.
|
|
@ -1,5 +0,0 @@
|
|||
Changes
|
||||
* The unit tests now rely on header files in tests/include/test and source
|
||||
files in tests/src. When building with make or cmake, the files in
|
||||
tests/src are compiled and the resulting object linked into each test
|
||||
executable.
|
|
@ -1,4 +0,0 @@
|
|||
Changes
|
||||
* Unify the example programs termination to call mbedtls_exit() instead of
|
||||
using a return command. This has been done to enable customization of the
|
||||
behavior in bare metal environments.
|
|
@ -1,9 +0,0 @@
|
|||
Bugfix
|
||||
* Add additional bounds checks in ssl_write_client_hello() preventing
|
||||
output buffer overflow if the configuration declared a buffer that was
|
||||
too small.
|
||||
Changes
|
||||
* Abort the ClientHello writing function as soon as some extension doesn't
|
||||
fit into the record buffer. Previously, such extensions were silently
|
||||
dropped. As a consequence, the TLS handshake now fails when the output
|
||||
buffer is not large enough to hold the ClientHello.
|
|
@ -1,2 +0,0 @@
|
|||
Changes
|
||||
* Use FindPython3 when cmake version >= 3.15.0
|
7
Makefile
7
Makefile
|
@ -10,15 +10,18 @@ all: programs tests
|
|||
|
||||
no_test: programs
|
||||
|
||||
programs: lib
|
||||
programs: lib mbedtls_test
|
||||
$(MAKE) -C programs
|
||||
|
||||
lib:
|
||||
$(MAKE) -C library
|
||||
|
||||
tests: lib
|
||||
tests: lib mbedtls_test
|
||||
$(MAKE) -C tests
|
||||
|
||||
mbedtls_test:
|
||||
$(MAKE) -C tests mbedtls_test
|
||||
|
||||
ifndef WINDOWS
|
||||
install: no_test
|
||||
mkdir -p $(DESTDIR)/include/mbedtls
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* @mainpage mbed TLS v2.22.0 source code documentation
|
||||
* @mainpage mbed TLS v2.23.0 source code documentation
|
||||
*
|
||||
* This documentation describes the internal structure of mbed TLS. It was
|
||||
* automatically generated from specially formatted comment blocks in
|
||||
|
|
|
@ -28,7 +28,7 @@ DOXYFILE_ENCODING = UTF-8
|
|||
# identify the project. Note that if you do not use Doxywizard you need
|
||||
# to put quotes around the project name if it contains spaces.
|
||||
|
||||
PROJECT_NAME = "mbed TLS v2.22.0"
|
||||
PROJECT_NAME = "mbed TLS v2.23.0"
|
||||
|
||||
# The PROJECT_NUMBER tag can be used to enter a project or revision number.
|
||||
# This could be handy for archiving the generated documentation or
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
* Major, Minor, Patchlevel
|
||||
*/
|
||||
#define MBEDTLS_VERSION_MAJOR 2
|
||||
#define MBEDTLS_VERSION_MINOR 22
|
||||
#define MBEDTLS_VERSION_MINOR 23
|
||||
#define MBEDTLS_VERSION_PATCH 0
|
||||
|
||||
/**
|
||||
|
@ -47,9 +47,9 @@
|
|||
* MMNNPP00
|
||||
* Major version | Minor version | Patch version
|
||||
*/
|
||||
#define MBEDTLS_VERSION_NUMBER 0x02160000
|
||||
#define MBEDTLS_VERSION_STRING "2.22.0"
|
||||
#define MBEDTLS_VERSION_STRING_FULL "mbed TLS 2.22.0"
|
||||
#define MBEDTLS_VERSION_NUMBER 0x02170000
|
||||
#define MBEDTLS_VERSION_STRING "2.23.0"
|
||||
#define MBEDTLS_VERSION_STRING_FULL "mbed TLS 2.23.0"
|
||||
|
||||
#if defined(MBEDTLS_VERSION_C)
|
||||
|
||||
|
|
|
@ -1611,7 +1611,7 @@
|
|||
*/
|
||||
#define PSA_KEY_LIFETIME_IS_VOLATILE(lifetime) \
|
||||
(PSA_KEY_LIFETIME_GET_PERSISTENCE(lifetime) == \
|
||||
PSA_KEY_LIFETIME_PERSISTENCE_VOLATILE)
|
||||
PSA_KEY_PERSISTENCE_VOLATILE)
|
||||
|
||||
/** Construct a lifetime from a persistence level and a location.
|
||||
*
|
||||
|
|
|
@ -163,15 +163,23 @@ if(USE_STATIC_MBEDTLS_LIBRARY)
|
|||
set_target_properties(${mbedcrypto_static_target} PROPERTIES OUTPUT_NAME mbedcrypto)
|
||||
target_link_libraries(${mbedcrypto_static_target} ${libs})
|
||||
target_include_directories(${mbedcrypto_static_target}
|
||||
PUBLIC ${MBEDTLS_DIR}/include/)
|
||||
PUBLIC ${MBEDTLS_DIR}/include/
|
||||
PUBLIC ${thirdparty_inc_public}
|
||||
PRIVATE ${thirdparty_inc})
|
||||
target_compile_definitions(${mbedcrypto_static_target}
|
||||
PRIVATE ${thirdparty_def})
|
||||
|
||||
add_library(${mbedx509_static_target} STATIC ${src_x509})
|
||||
set_target_properties(${mbedx509_static_target} PROPERTIES OUTPUT_NAME mbedx509)
|
||||
target_link_libraries(${mbedx509_static_target} ${libs} ${mbedcrypto_static_target})
|
||||
target_include_directories(${mbedx509_static_target}
|
||||
PUBLIC ${MBEDTLS_DIR}/include/)
|
||||
|
||||
add_library(${mbedtls_static_target} STATIC ${src_tls})
|
||||
set_target_properties(${mbedtls_static_target} PROPERTIES OUTPUT_NAME mbedtls)
|
||||
target_link_libraries(${mbedtls_static_target} ${libs} ${mbedx509_static_target})
|
||||
target_include_directories(${mbedtls_static_target}
|
||||
PUBLIC ${MBEDTLS_DIR}/include/)
|
||||
|
||||
install(TARGETS ${mbedtls_static_target} ${mbedx509_static_target} ${mbedcrypto_static_target}
|
||||
DESTINATION ${LIB_INSTALL_DIR}
|
||||
|
@ -181,19 +189,23 @@ endif(USE_STATIC_MBEDTLS_LIBRARY)
|
|||
if(USE_SHARED_MBEDTLS_LIBRARY)
|
||||
|
||||
add_library(mbedcrypto SHARED ${src_crypto})
|
||||
set_target_properties(mbedcrypto PROPERTIES VERSION 2.22.0 SOVERSION 4)
|
||||
set_target_properties(mbedcrypto PROPERTIES VERSION 2.23.0 SOVERSION 5)
|
||||
target_link_libraries(mbedcrypto ${libs})
|
||||
target_include_directories(mbedcrypto
|
||||
PUBLIC ${MBEDTLS_DIR}/include/)
|
||||
PUBLIC ${MBEDTLS_DIR}/include/
|
||||
PUBLIC ${thirdparty_inc_public}
|
||||
PRIVATE ${thirdparty_inc})
|
||||
target_compile_definitions(mbedcrypto
|
||||
PRIVATE ${thirdparty_def})
|
||||
|
||||
add_library(mbedx509 SHARED ${src_x509})
|
||||
set_target_properties(mbedx509 PROPERTIES VERSION 2.22.0 SOVERSION 1)
|
||||
set_target_properties(mbedx509 PROPERTIES VERSION 2.23.0 SOVERSION 1)
|
||||
target_link_libraries(mbedx509 ${libs} mbedcrypto)
|
||||
target_include_directories(mbedx509
|
||||
PUBLIC ${MBEDTLS_DIR}/include/)
|
||||
|
||||
add_library(mbedtls SHARED ${src_tls})
|
||||
set_target_properties(mbedtls PROPERTIES VERSION 2.22.0 SOVERSION 13)
|
||||
set_target_properties(mbedtls PROPERTIES VERSION 2.23.0 SOVERSION 13)
|
||||
target_link_libraries(mbedtls ${libs} mbedx509)
|
||||
target_include_directories(mbedtls
|
||||
PUBLIC ${MBEDTLS_DIR}/include/)
|
||||
|
|
|
@ -37,7 +37,7 @@ endif
|
|||
|
||||
SOEXT_TLS=so.13
|
||||
SOEXT_X509=so.1
|
||||
SOEXT_CRYPTO=so.4
|
||||
SOEXT_CRYPTO=so.5
|
||||
|
||||
# Set AR_DASH= (empty string) to use an ar implementation that does not accept
|
||||
# the - prefix for command line options (e.g. llvm-ar)
|
||||
|
|
|
@ -1499,16 +1499,17 @@ static psa_status_t psa_validate_key_attributes(
|
|||
const psa_key_attributes_t *attributes,
|
||||
psa_se_drv_table_entry_t **p_drv )
|
||||
{
|
||||
psa_status_t status;
|
||||
psa_status_t status = PSA_ERROR_INVALID_ARGUMENT;
|
||||
|
||||
if( attributes->core.lifetime != PSA_KEY_LIFETIME_VOLATILE )
|
||||
{
|
||||
status = psa_validate_persistent_key_parameters(
|
||||
attributes->core.lifetime, attributes->core.id,
|
||||
p_drv, 1 );
|
||||
if( status != PSA_SUCCESS )
|
||||
return( status );
|
||||
}
|
||||
status = psa_validate_key_location( psa_get_key_lifetime( attributes ),
|
||||
p_drv );
|
||||
if( status != PSA_SUCCESS )
|
||||
return( status );
|
||||
|
||||
status = psa_validate_key_persistence( psa_get_key_lifetime( attributes ),
|
||||
psa_get_key_id( attributes ) );
|
||||
if( status != PSA_SUCCESS )
|
||||
return( status );
|
||||
|
||||
status = psa_validate_key_policy( &attributes->core.policy );
|
||||
if( status != PSA_SUCCESS )
|
||||
|
@ -1594,11 +1595,14 @@ static psa_status_t psa_start_key_creation(
|
|||
|
||||
#if defined(MBEDTLS_PSA_CRYPTO_SE_C)
|
||||
/* For a key in a secure element, we need to do three things
|
||||
* when creating or registering a key:
|
||||
* when creating or registering a persistent key:
|
||||
* create the key file in internal storage, create the
|
||||
* key inside the secure element, and update the driver's
|
||||
* persistent data. Start a transaction that will encompass these
|
||||
* three actions. */
|
||||
* persistent data. This is done by starting a transaction that will
|
||||
* encompass these three actions.
|
||||
* For registering a volatile key, we just need to find an appropriate
|
||||
* slot number inside the SE. Since the key is designated volatile, creating
|
||||
* a transaction is not required. */
|
||||
/* The first thing to do is to find a slot number for the new key.
|
||||
* We save the slot number in persistent storage as part of the
|
||||
* transaction data. It will be needed to recover if the power
|
||||
|
@ -1613,15 +1617,19 @@ static psa_status_t psa_start_key_creation(
|
|||
&slot->data.se.slot_number );
|
||||
if( status != PSA_SUCCESS )
|
||||
return( status );
|
||||
psa_crypto_prepare_transaction( PSA_CRYPTO_TRANSACTION_CREATE_KEY );
|
||||
psa_crypto_transaction.key.lifetime = slot->attr.lifetime;
|
||||
psa_crypto_transaction.key.slot = slot->data.se.slot_number;
|
||||
psa_crypto_transaction.key.id = slot->attr.id;
|
||||
status = psa_crypto_save_transaction( );
|
||||
if( status != PSA_SUCCESS )
|
||||
|
||||
if( ! PSA_KEY_LIFETIME_IS_VOLATILE( attributes->core.lifetime ) )
|
||||
{
|
||||
(void) psa_crypto_stop_transaction( );
|
||||
return( status );
|
||||
psa_crypto_prepare_transaction( PSA_CRYPTO_TRANSACTION_CREATE_KEY );
|
||||
psa_crypto_transaction.key.lifetime = slot->attr.lifetime;
|
||||
psa_crypto_transaction.key.slot = slot->data.se.slot_number;
|
||||
psa_crypto_transaction.key.id = slot->attr.id;
|
||||
status = psa_crypto_save_transaction( );
|
||||
if( status != PSA_SUCCESS )
|
||||
{
|
||||
(void) psa_crypto_stop_transaction( );
|
||||
return( status );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1661,7 +1669,7 @@ static psa_status_t psa_finish_key_creation(
|
|||
(void) driver;
|
||||
|
||||
#if defined(MBEDTLS_PSA_CRYPTO_STORAGE_C)
|
||||
if( slot->attr.lifetime != PSA_KEY_LIFETIME_VOLATILE )
|
||||
if( ! PSA_KEY_LIFETIME_IS_VOLATILE( slot->attr.lifetime ) )
|
||||
{
|
||||
#if defined(MBEDTLS_PSA_CRYPTO_SE_C)
|
||||
if( driver != NULL )
|
||||
|
@ -1709,8 +1717,8 @@ static psa_status_t psa_finish_key_creation(
|
|||
/* Finish the transaction for a key creation. This does not
|
||||
* happen when registering an existing key. Detect this case
|
||||
* by checking whether a transaction is in progress (actual
|
||||
* creation of a key in a secure element requires a transaction,
|
||||
* but registration doesn't use one). */
|
||||
* creation of a persistent key in a secure element requires a transaction,
|
||||
* but registration or volatile key creation doesn't use one). */
|
||||
if( driver != NULL &&
|
||||
psa_crypto_transaction.unknown.type == PSA_CRYPTO_TRANSACTION_CREATE_KEY )
|
||||
{
|
||||
|
|
|
@ -184,36 +184,53 @@ static int psa_is_key_id_valid( psa_key_file_id_t file_id,
|
|||
}
|
||||
#endif /* defined(MBEDTLS_PSA_CRYPTO_STORAGE_C) */
|
||||
|
||||
psa_status_t psa_validate_persistent_key_parameters(
|
||||
psa_key_lifetime_t lifetime,
|
||||
psa_key_file_id_t id,
|
||||
psa_se_drv_table_entry_t **p_drv,
|
||||
int creating )
|
||||
psa_status_t psa_validate_key_location( psa_key_lifetime_t lifetime,
|
||||
psa_se_drv_table_entry_t **p_drv )
|
||||
{
|
||||
if( p_drv != NULL )
|
||||
*p_drv = NULL;
|
||||
#if defined(MBEDTLS_PSA_CRYPTO_SE_C)
|
||||
if( psa_key_lifetime_is_external( lifetime ) )
|
||||
if ( psa_key_lifetime_is_external( lifetime ) )
|
||||
{
|
||||
*p_drv = psa_get_se_driver_entry( lifetime );
|
||||
if( *p_drv == NULL )
|
||||
#if defined(MBEDTLS_PSA_CRYPTO_SE_C)
|
||||
psa_se_drv_table_entry_t *driver = psa_get_se_driver_entry( lifetime );
|
||||
if( driver == NULL )
|
||||
return( PSA_ERROR_INVALID_ARGUMENT );
|
||||
else
|
||||
{
|
||||
if (p_drv != NULL)
|
||||
*p_drv = driver;
|
||||
return( PSA_SUCCESS );
|
||||
}
|
||||
#else
|
||||
(void) p_drv;
|
||||
return( PSA_ERROR_INVALID_ARGUMENT );
|
||||
#endif /* MBEDTLS_PSA_CRYPTO_SE_C */
|
||||
}
|
||||
else
|
||||
#endif /* MBEDTLS_PSA_CRYPTO_SE_C */
|
||||
if( lifetime != PSA_KEY_LIFETIME_PERSISTENT )
|
||||
return( PSA_ERROR_INVALID_ARGUMENT );
|
||||
/* Local/internal keys are always valid */
|
||||
return( PSA_SUCCESS );
|
||||
}
|
||||
|
||||
psa_status_t psa_validate_key_persistence( psa_key_lifetime_t lifetime,
|
||||
psa_key_id_t key_id )
|
||||
{
|
||||
if ( PSA_KEY_LIFETIME_IS_VOLATILE( lifetime ) )
|
||||
{
|
||||
/* Volatile keys are always supported */
|
||||
return( PSA_SUCCESS );
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Persistent keys require storage support */
|
||||
#if defined(MBEDTLS_PSA_CRYPTO_STORAGE_C)
|
||||
if( ! psa_is_key_id_valid( id, ! creating ) )
|
||||
return( PSA_ERROR_INVALID_ARGUMENT );
|
||||
return( PSA_SUCCESS );
|
||||
|
||||
if( psa_is_key_id_valid( key_id,
|
||||
psa_key_lifetime_is_external( lifetime ) ) )
|
||||
return( PSA_SUCCESS );
|
||||
else
|
||||
return( PSA_ERROR_INVALID_ARGUMENT );
|
||||
#else /* MBEDTLS_PSA_CRYPTO_STORAGE_C */
|
||||
(void) id;
|
||||
(void) creating;
|
||||
return( PSA_ERROR_NOT_SUPPORTED );
|
||||
(void) key_id;
|
||||
return( PSA_ERROR_NOT_SUPPORTED );
|
||||
#endif /* !MBEDTLS_PSA_CRYPTO_STORAGE_C */
|
||||
}
|
||||
}
|
||||
|
||||
psa_status_t psa_open_key( psa_key_file_id_t id, psa_key_handle_t *handle )
|
||||
|
@ -224,10 +241,8 @@ psa_status_t psa_open_key( psa_key_file_id_t id, psa_key_handle_t *handle )
|
|||
|
||||
*handle = 0;
|
||||
|
||||
status = psa_validate_persistent_key_parameters(
|
||||
PSA_KEY_LIFETIME_PERSISTENT, id, NULL, 0 );
|
||||
if( status != PSA_SUCCESS )
|
||||
return( status );
|
||||
if( ! psa_is_key_id_valid( id, 1 ) )
|
||||
return( PSA_ERROR_INVALID_ARGUMENT );
|
||||
|
||||
status = psa_get_empty_key_slot( handle, &slot );
|
||||
if( status != PSA_SUCCESS )
|
||||
|
|
|
@ -89,42 +89,40 @@ psa_status_t psa_get_empty_key_slot( psa_key_handle_t *handle,
|
|||
*/
|
||||
static inline int psa_key_lifetime_is_external( psa_key_lifetime_t lifetime )
|
||||
{
|
||||
return( lifetime != PSA_KEY_LIFETIME_VOLATILE &&
|
||||
lifetime != PSA_KEY_LIFETIME_PERSISTENT );
|
||||
return( PSA_KEY_LIFETIME_GET_LOCATION( lifetime )
|
||||
!= PSA_KEY_LOCATION_LOCAL_STORAGE );
|
||||
}
|
||||
|
||||
/** Test whether the given parameters are acceptable for a persistent key.
|
||||
/** Validate a key's location.
|
||||
*
|
||||
* This function does not access the storage in any way. It only tests
|
||||
* whether the parameters are meaningful and permitted by general policy.
|
||||
* It does not test whether the a file by the given id exists or could be
|
||||
* created.
|
||||
* This function checks whether the key's attributes point to a location that
|
||||
* is known to the PSA Core, and returns the driver function table if the key
|
||||
* is to be found in an external location.
|
||||
*
|
||||
* If the key is in external storage, this function returns the corresponding
|
||||
* driver.
|
||||
* \param[in] lifetime The key lifetime attribute.
|
||||
* \param[out] p_drv On success, when a key is located in external
|
||||
* storage, returns a pointer to the driver table
|
||||
* associated with the key's storage location.
|
||||
*
|
||||
* \param lifetime The lifetime to test.
|
||||
* \param id The key id to test.
|
||||
* \param[out] p_drv On output, if \p lifetime designates a key
|
||||
* in an external processor, \c *p_drv is a pointer
|
||||
* to the driver table entry fot this lifetime.
|
||||
* If \p lifetime designates a transparent key,
|
||||
* \c *p_drv is \c NULL.
|
||||
* \param creating 0 if attempting to open an existing key.
|
||||
* Nonzero if attempting to create a key.
|
||||
*
|
||||
* \retval PSA_SUCCESS
|
||||
* The given parameters are valid.
|
||||
* \retval PSA_ERROR_INVALID_ARGUMENT
|
||||
* \p lifetime is volatile or is invalid.
|
||||
* \retval PSA_ERROR_INVALID_ARGUMENT
|
||||
* \p id is invalid.
|
||||
* \retval #PSA_SUCCESS
|
||||
* \retval #PSA_ERROR_INVALID_ARGUMENT
|
||||
*/
|
||||
psa_status_t psa_validate_persistent_key_parameters(
|
||||
psa_key_lifetime_t lifetime,
|
||||
psa_key_file_id_t id,
|
||||
psa_se_drv_table_entry_t **p_drv,
|
||||
int creating );
|
||||
psa_status_t psa_validate_key_location( psa_key_lifetime_t lifetime,
|
||||
psa_se_drv_table_entry_t **p_drv );
|
||||
|
||||
/** Validate that a key's persistence attributes are valid.
|
||||
*
|
||||
* This function checks whether a key's declared persistence level and key ID
|
||||
* attributes are valid and known to the PSA Core in its actual configuration.
|
||||
*
|
||||
* \param[in] lifetime The key lifetime attribute.
|
||||
* \param[in] key_id The key ID attribute
|
||||
*
|
||||
* \retval #PSA_SUCCESS
|
||||
* \retval #PSA_ERROR_INVALID_ARGUMENT
|
||||
*/
|
||||
psa_status_t psa_validate_key_persistence( psa_key_lifetime_t lifetime,
|
||||
psa_key_id_t key_id );
|
||||
|
||||
|
||||
#endif /* PSA_CRYPTO_SLOT_MANAGEMENT_H */
|
||||
|
|
|
@ -7,9 +7,13 @@ WARNING_CFLAGS ?= -Wall -Wextra
|
|||
WARNING_CXXFLAGS ?= -Wall -Wextra
|
||||
LDFLAGS ?=
|
||||
|
||||
LOCAL_CFLAGS = $(WARNING_CFLAGS) -I../include -D_FILE_OFFSET_BITS=64
|
||||
MBEDTLS_TEST_PATH:=../tests/src
|
||||
MBEDTLS_TEST_OBJS:=$(patsubst %.c,%.o,$(wildcard ${MBEDTLS_TEST_PATH}/*.c))
|
||||
|
||||
LOCAL_CFLAGS = $(WARNING_CFLAGS) -I../tests/include -I../include -D_FILE_OFFSET_BITS=64
|
||||
LOCAL_CXXFLAGS = $(WARNING_CXXFLAGS) -I../include -D_FILE_OFFSET_BITS=64
|
||||
LOCAL_LDFLAGS = -L../library \
|
||||
LOCAL_LDFLAGS = ${MBEDTLS_TEST_OBJS} \
|
||||
-L../library \
|
||||
-lmbedtls$(SHARED_SUFFIX) \
|
||||
-lmbedx509$(SHARED_SUFFIX) \
|
||||
-lmbedcrypto$(SHARED_SUFFIX)
|
||||
|
@ -18,10 +22,11 @@ include ../3rdparty/Makefile.inc
|
|||
LOCAL_CFLAGS+=$(THIRDPARTY_INCLUDES)
|
||||
|
||||
ifndef SHARED
|
||||
DEP=../library/libmbedcrypto.a ../library/libmbedx509.a ../library/libmbedtls.a
|
||||
MBEDLIBS=../library/libmbedcrypto.a ../library/libmbedx509.a ../library/libmbedtls.a
|
||||
else
|
||||
DEP=../library/libmbedcrypto.$(DLEXT) ../library/libmbedx509.$(DLEXT) ../library/libmbedtls.$(DLEXT)
|
||||
MBEDLIBS=../library/libmbedcrypto.$(DLEXT) ../library/libmbedx509.$(DLEXT) ../library/libmbedtls.$(DLEXT)
|
||||
endif
|
||||
DEP=${MBEDLIBS} ${MBEDTLS_TEST_OBJS}
|
||||
|
||||
ifdef DEBUG
|
||||
LOCAL_CFLAGS += -g3
|
||||
|
@ -127,12 +132,15 @@ ifndef WINDOWS
|
|||
all: fuzz
|
||||
endif
|
||||
|
||||
fuzz:
|
||||
fuzz: ${MBEDTLS_TEST_OBJS}
|
||||
$(MAKE) -C fuzz THIRDPARTY_INCLUDES=$(THIRDPARTY_INCLUDES)
|
||||
|
||||
$(DEP):
|
||||
$(MBEDLIBS):
|
||||
$(MAKE) -C ../library
|
||||
|
||||
${MBEDTLS_TEST_OBJS}:
|
||||
$(MAKE) -C ../tests mbedtls_test
|
||||
|
||||
ifdef WINDOWS
|
||||
EXTRA_GENERATED += psa\psa_constant_names_generated.c
|
||||
else
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
add_executable(aescrypt2 aescrypt2.c)
|
||||
target_link_libraries(aescrypt2 mbedcrypto)
|
||||
set(executables
|
||||
aescrypt2
|
||||
crypt_and_hash
|
||||
)
|
||||
|
||||
add_executable(crypt_and_hash crypt_and_hash.c)
|
||||
target_link_libraries(crypt_and_hash mbedcrypto)
|
||||
foreach(exe IN LISTS executables)
|
||||
add_executable(${exe} ${exe}.c $<TARGET_OBJECTS:mbedtls_test>)
|
||||
target_link_libraries(${exe} mbedcrypto)
|
||||
endforeach()
|
||||
|
||||
install(TARGETS aescrypt2 crypt_and_hash
|
||||
install(TARGETS ${executables}
|
||||
DESTINATION "bin"
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
|
|
|
@ -11,70 +11,41 @@ if(ENABLE_ZLIB_SUPPORT)
|
|||
endif(ENABLE_ZLIB_SUPPORT)
|
||||
|
||||
find_library(FUZZINGENGINE_LIB FuzzingEngine)
|
||||
|
||||
if(NOT FUZZINGENGINE_LIB)
|
||||
add_executable(fuzz_x509csr fuzz_x509csr.c onefile.c)
|
||||
target_link_libraries(fuzz_x509csr ${libs})
|
||||
|
||||
add_executable(fuzz_x509crl fuzz_x509crl.c onefile.c)
|
||||
target_link_libraries(fuzz_x509crl ${libs})
|
||||
|
||||
add_executable(fuzz_x509crt fuzz_x509crt.c onefile.c)
|
||||
target_link_libraries(fuzz_x509crt ${libs})
|
||||
|
||||
add_executable(fuzz_privkey fuzz_privkey.c onefile.c)
|
||||
target_link_libraries(fuzz_privkey ${libs})
|
||||
|
||||
add_executable(fuzz_pubkey fuzz_pubkey.c onefile.c)
|
||||
target_link_libraries(fuzz_pubkey ${libs})
|
||||
|
||||
add_executable(fuzz_client fuzz_client.c common.c onefile.c)
|
||||
target_link_libraries(fuzz_client ${libs})
|
||||
|
||||
add_executable(fuzz_server fuzz_server.c common.c onefile.c)
|
||||
target_link_libraries(fuzz_server ${libs})
|
||||
|
||||
add_executable(fuzz_dtlsclient fuzz_dtlsclient.c common.c onefile.c)
|
||||
target_link_libraries(fuzz_dtlsclient ${libs})
|
||||
|
||||
add_executable(fuzz_dtlsserver fuzz_dtlsserver.c common.c onefile.c)
|
||||
target_link_libraries(fuzz_dtlsserver ${libs})
|
||||
else()
|
||||
if(FUZZINGENGINE_LIB)
|
||||
project(fuzz CXX)
|
||||
|
||||
add_executable(fuzz_x509csr fuzz_x509csr.c)
|
||||
target_link_libraries(fuzz_x509csr ${libs} FuzzingEngine)
|
||||
SET_TARGET_PROPERTIES(fuzz_x509csr PROPERTIES LINKER_LANGUAGE CXX)
|
||||
|
||||
add_executable(fuzz_x509crl fuzz_x509crl.c)
|
||||
target_link_libraries(fuzz_x509crl ${libs} FuzzingEngine)
|
||||
SET_TARGET_PROPERTIES(fuzz_x509crl PROPERTIES LINKER_LANGUAGE CXX)
|
||||
|
||||
add_executable(fuzz_x509crt fuzz_x509crt.c)
|
||||
target_link_libraries(fuzz_x509crt ${libs} FuzzingEngine)
|
||||
SET_TARGET_PROPERTIES(fuzz_x509crt PROPERTIES LINKER_LANGUAGE CXX)
|
||||
|
||||
add_executable(fuzz_privkey fuzz_privkey.c)
|
||||
target_link_libraries(fuzz_privkey ${libs} FuzzingEngine)
|
||||
SET_TARGET_PROPERTIES(fuzz_privkey PROPERTIES LINKER_LANGUAGE CXX)
|
||||
|
||||
add_executable(fuzz_pubkey fuzz_pubkey.c)
|
||||
target_link_libraries(fuzz_pubkey ${libs} FuzzingEngine)
|
||||
SET_TARGET_PROPERTIES(fuzz_pubkey PROPERTIES LINKER_LANGUAGE CXX)
|
||||
|
||||
add_executable(fuzz_client fuzz_client.c common.c)
|
||||
target_link_libraries(fuzz_client ${libs} FuzzingEngine)
|
||||
SET_TARGET_PROPERTIES(fuzz_client PROPERTIES LINKER_LANGUAGE CXX)
|
||||
|
||||
add_executable(fuzz_server fuzz_server.c common.c)
|
||||
target_link_libraries(fuzz_server ${libs} FuzzingEngine)
|
||||
SET_TARGET_PROPERTIES(fuzz_server PROPERTIES LINKER_LANGUAGE CXX)
|
||||
|
||||
add_executable(fuzz_dtlsclient fuzz_dtlsclient.c common.c)
|
||||
target_link_libraries(fuzz_dtlsclient ${libs} FuzzingEngine)
|
||||
SET_TARGET_PROPERTIES(fuzz_dtlsclient PROPERTIES LINKER_LANGUAGE CXX)
|
||||
|
||||
add_executable(fuzz_dtlsserver fuzz_dtlsserver.c common.c)
|
||||
target_link_libraries(fuzz_dtlsserver ${libs} FuzzingEngine)
|
||||
SET_TARGET_PROPERTIES(fuzz_dtlsserver PROPERTIES LINKER_LANGUAGE CXX)
|
||||
endif()
|
||||
|
||||
set(executables_no_common_c
|
||||
fuzz_privkey
|
||||
fuzz_pubkey
|
||||
fuzz_x509crl
|
||||
fuzz_x509crt
|
||||
fuzz_x509csr
|
||||
)
|
||||
|
||||
set(executables_with_common_c
|
||||
fuzz_client
|
||||
fuzz_dtlsclient
|
||||
fuzz_dtlsserver
|
||||
fuzz_server
|
||||
)
|
||||
|
||||
foreach(exe IN LISTS executables_no_common_c executables_with_common_c)
|
||||
|
||||
add_executable(${exe} ${exe}.c $<TARGET_OBJECTS:mbedtls_test>)
|
||||
|
||||
if (NOT FUZZINGENGINE_LIB)
|
||||
target_link_libraries(${exe} ${libs})
|
||||
target_sources(${exe} PRIVATE onefile.c)
|
||||
else()
|
||||
target_link_libraries(${exe} ${libs} FuzzingEngine)
|
||||
SET_TARGET_PROPERTIES(${exe} PROPERTIES LINKER_LANGUAGE CXX)
|
||||
endif()
|
||||
|
||||
# This emulates "if ( ... IN_LIST ... )" which becomes available in CMake 3.3
|
||||
list(FIND executables_with_common_c ${exe} exe_index)
|
||||
if (${exe_index} GREATER -1)
|
||||
target_sources(${exe} PRIVATE common.c)
|
||||
endif()
|
||||
|
||||
endforeach()
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
MBEDTLS_TEST_PATH:=../../tests/src
|
||||
MBEDTLS_TEST_OBJS:=$(patsubst %.c,%.o,$(wildcard ${MBEDTLS_TEST_PATH}/*.c))
|
||||
|
||||
LOCAL_CFLAGS = -I../../include -D_FILE_OFFSET_BITS=64
|
||||
LOCAL_LDFLAGS = -L../../library \
|
||||
LOCAL_CFLAGS = -I../../tests/include -I../../include -D_FILE_OFFSET_BITS=64
|
||||
LOCAL_LDFLAGS = ${MBEDTLS_TEST_OBJS} \
|
||||
-L../../library \
|
||||
-lmbedtls$(SHARED_SUFFIX) \
|
||||
-lmbedx509$(SHARED_SUFFIX) \
|
||||
-lmbedcrypto$(SHARED_SUFFIX)
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
add_executable(hello hello.c)
|
||||
target_link_libraries(hello mbedcrypto)
|
||||
set(executables
|
||||
generic_sum
|
||||
hello
|
||||
)
|
||||
|
||||
add_executable(generic_sum generic_sum.c)
|
||||
target_link_libraries(generic_sum mbedcrypto)
|
||||
foreach(exe IN LISTS executables)
|
||||
add_executable(${exe} ${exe}.c $<TARGET_OBJECTS:mbedtls_test>)
|
||||
target_link_libraries(${exe} mbedcrypto)
|
||||
endforeach()
|
||||
|
||||
install(TARGETS hello generic_sum
|
||||
install(TARGETS ${executables}
|
||||
DESTINATION "bin"
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
|
|
|
@ -1,63 +1,39 @@
|
|||
add_executable(dh_client dh_client.c)
|
||||
target_link_libraries(dh_client mbedtls)
|
||||
set(executables_mbedtls
|
||||
dh_client
|
||||
dh_server
|
||||
)
|
||||
|
||||
add_executable(dh_genprime dh_genprime.c)
|
||||
target_link_libraries(dh_genprime mbedcrypto)
|
||||
foreach(exe IN LISTS executables_mbedtls)
|
||||
add_executable(${exe} ${exe}.c $<TARGET_OBJECTS:mbedtls_test>)
|
||||
target_link_libraries(${exe} mbedtls)
|
||||
endforeach()
|
||||
|
||||
add_executable(dh_server dh_server.c)
|
||||
target_link_libraries(dh_server mbedtls)
|
||||
set(executables_mbedcrypto
|
||||
dh_genprime
|
||||
ecdh_curve25519
|
||||
ecdsa
|
||||
gen_key
|
||||
key_app
|
||||
key_app_writer
|
||||
mpi_demo
|
||||
pk_encrypt
|
||||
pk_decrypt
|
||||
pk_sign
|
||||
pk_verify
|
||||
rsa_decrypt
|
||||
rsa_encrypt
|
||||
rsa_genkey
|
||||
rsa_sign
|
||||
rsa_sign_pss
|
||||
rsa_verify
|
||||
rsa_verify_pss
|
||||
)
|
||||
|
||||
add_executable(ecdh_curve25519 ecdh_curve25519.c)
|
||||
target_link_libraries(ecdh_curve25519 mbedcrypto)
|
||||
foreach(exe IN LISTS executables_mbedcrypto)
|
||||
add_executable(${exe} ${exe}.c $<TARGET_OBJECTS:mbedtls_test>)
|
||||
target_link_libraries(${exe} mbedcrypto)
|
||||
endforeach()
|
||||
|
||||
add_executable(ecdsa ecdsa.c)
|
||||
target_link_libraries(ecdsa mbedcrypto)
|
||||
|
||||
add_executable(gen_key gen_key.c)
|
||||
target_link_libraries(gen_key mbedcrypto)
|
||||
|
||||
add_executable(key_app key_app.c)
|
||||
target_link_libraries(key_app mbedcrypto)
|
||||
|
||||
add_executable(key_app_writer key_app_writer.c)
|
||||
target_link_libraries(key_app_writer mbedcrypto)
|
||||
|
||||
add_executable(mpi_demo mpi_demo.c)
|
||||
target_link_libraries(mpi_demo mbedcrypto)
|
||||
|
||||
add_executable(rsa_genkey rsa_genkey.c)
|
||||
target_link_libraries(rsa_genkey mbedcrypto)
|
||||
|
||||
add_executable(rsa_sign rsa_sign.c)
|
||||
target_link_libraries(rsa_sign mbedcrypto)
|
||||
|
||||
add_executable(rsa_verify rsa_verify.c)
|
||||
target_link_libraries(rsa_verify mbedcrypto)
|
||||
|
||||
add_executable(rsa_sign_pss rsa_sign_pss.c)
|
||||
target_link_libraries(rsa_sign_pss mbedcrypto)
|
||||
|
||||
add_executable(rsa_verify_pss rsa_verify_pss.c)
|
||||
target_link_libraries(rsa_verify_pss mbedcrypto)
|
||||
|
||||
add_executable(rsa_encrypt rsa_encrypt.c)
|
||||
target_link_libraries(rsa_encrypt mbedcrypto)
|
||||
|
||||
add_executable(rsa_decrypt rsa_decrypt.c)
|
||||
target_link_libraries(rsa_decrypt mbedcrypto)
|
||||
|
||||
add_executable(pk_sign pk_sign.c)
|
||||
target_link_libraries(pk_sign mbedcrypto)
|
||||
|
||||
add_executable(pk_verify pk_verify.c)
|
||||
target_link_libraries(pk_verify mbedcrypto)
|
||||
|
||||
add_executable(pk_encrypt pk_encrypt.c)
|
||||
target_link_libraries(pk_encrypt mbedcrypto)
|
||||
|
||||
add_executable(pk_decrypt pk_decrypt.c)
|
||||
target_link_libraries(pk_decrypt mbedcrypto)
|
||||
|
||||
install(TARGETS dh_client dh_genprime dh_server key_app mpi_demo rsa_genkey rsa_sign rsa_verify rsa_encrypt rsa_decrypt pk_encrypt pk_decrypt pk_sign pk_verify gen_key
|
||||
install(TARGETS ${executables_mbedtls} ${executables_mbedcrypto}
|
||||
DESTINATION "bin"
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
|
|
|
@ -1,12 +1,16 @@
|
|||
add_executable(crypto_examples crypto_examples.c)
|
||||
target_link_libraries(crypto_examples mbedtls)
|
||||
set(executables
|
||||
crypto_examples
|
||||
key_ladder_demo
|
||||
psa_constant_names
|
||||
)
|
||||
|
||||
add_executable(key_ladder_demo key_ladder_demo.c)
|
||||
target_link_libraries(key_ladder_demo mbedtls)
|
||||
foreach(exe IN LISTS executables)
|
||||
add_executable(${exe} ${exe}.c $<TARGET_OBJECTS:mbedtls_test>)
|
||||
target_link_libraries(${exe} mbedcrypto)
|
||||
target_include_directories(${exe} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../tests/include)
|
||||
endforeach()
|
||||
|
||||
add_executable(psa_constant_names psa_constant_names.c)
|
||||
target_include_directories(psa_constant_names PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
|
||||
target_link_libraries(psa_constant_names mbedtls)
|
||||
|
||||
add_custom_target(
|
||||
psa_constant_names_generated
|
||||
|
@ -15,10 +19,7 @@ add_custom_target(
|
|||
)
|
||||
add_dependencies(psa_constant_names psa_constant_names_generated)
|
||||
|
||||
install(TARGETS
|
||||
crypto_examples
|
||||
key_ladder_demo
|
||||
psa_constant_names
|
||||
install(TARGETS ${executables}
|
||||
DESTINATION "bin"
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
add_executable(gen_random_havege gen_random_havege.c)
|
||||
target_link_libraries(gen_random_havege mbedcrypto)
|
||||
set(executables
|
||||
gen_entropy
|
||||
gen_random_ctr_drbg
|
||||
gen_random_havege
|
||||
)
|
||||
|
||||
add_executable(gen_random_ctr_drbg gen_random_ctr_drbg.c)
|
||||
target_link_libraries(gen_random_ctr_drbg mbedcrypto)
|
||||
foreach(exe IN LISTS executables)
|
||||
add_executable(${exe} ${exe}.c $<TARGET_OBJECTS:mbedtls_test>)
|
||||
target_link_libraries(${exe} mbedcrypto)
|
||||
endforeach()
|
||||
|
||||
add_executable(gen_entropy gen_entropy.c)
|
||||
target_link_libraries(gen_entropy mbedcrypto)
|
||||
|
||||
install(TARGETS gen_random_havege gen_random_ctr_drbg gen_entropy
|
||||
install(TARGETS ${executables}
|
||||
DESTINATION "bin"
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
|
|
|
@ -5,17 +5,6 @@ set(libs
|
|||
mbedtls
|
||||
)
|
||||
|
||||
set(targets
|
||||
dtls_client
|
||||
dtls_server
|
||||
mini_client
|
||||
ssl_client1
|
||||
ssl_client2
|
||||
ssl_fork_server
|
||||
ssl_mail_client
|
||||
ssl_server
|
||||
)
|
||||
|
||||
if(USE_PKCS11_HELPER_LIBRARY)
|
||||
set(libs ${libs} pkcs11-helper)
|
||||
endif(USE_PKCS11_HELPER_LIBRARY)
|
||||
|
@ -24,44 +13,34 @@ if(ENABLE_ZLIB_SUPPORT)
|
|||
set(libs ${libs} ${ZLIB_LIBRARIES})
|
||||
endif(ENABLE_ZLIB_SUPPORT)
|
||||
|
||||
add_executable(dtls_client dtls_client.c)
|
||||
target_link_libraries(dtls_client ${libs})
|
||||
set(executables
|
||||
dtls_client
|
||||
dtls_server
|
||||
mini_client
|
||||
ssl_client1
|
||||
ssl_client2
|
||||
ssl_context_info
|
||||
ssl_fork_server
|
||||
ssl_mail_client
|
||||
ssl_server
|
||||
ssl_server2
|
||||
)
|
||||
|
||||
add_executable(dtls_server dtls_server.c)
|
||||
target_link_libraries(dtls_server ${libs})
|
||||
foreach(exe IN LISTS executables)
|
||||
add_executable(${exe} ${exe}.c $<TARGET_OBJECTS:mbedtls_test>)
|
||||
target_link_libraries(${exe} ${libs})
|
||||
target_include_directories(${exe} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../tests/include)
|
||||
endforeach()
|
||||
|
||||
add_executable(ssl_client1 ssl_client1.c)
|
||||
target_link_libraries(ssl_client1 ${libs})
|
||||
|
||||
add_executable(ssl_client2 ssl_client2.c)
|
||||
target_sources(ssl_client2 PUBLIC ../test/query_config.c)
|
||||
target_link_libraries(ssl_client2 ${libs})
|
||||
|
||||
add_executable(ssl_server ssl_server.c)
|
||||
target_link_libraries(ssl_server ${libs})
|
||||
|
||||
add_executable(ssl_server2 ssl_server2.c)
|
||||
target_sources(ssl_server2 PUBLIC ../test/query_config.c)
|
||||
target_link_libraries(ssl_server2 ${libs})
|
||||
|
||||
add_executable(ssl_context_info ssl_context_info.c)
|
||||
target_link_libraries(ssl_context_info ${libs})
|
||||
|
||||
add_executable(ssl_fork_server ssl_fork_server.c)
|
||||
target_link_libraries(ssl_fork_server ${libs})
|
||||
|
||||
add_executable(ssl_mail_client ssl_mail_client.c)
|
||||
target_link_libraries(ssl_mail_client ${libs})
|
||||
|
||||
add_executable(mini_client mini_client.c)
|
||||
target_link_libraries(mini_client ${libs})
|
||||
target_sources(ssl_client2 PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../test/query_config.c)
|
||||
target_sources(ssl_server2 PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../test/query_config.c)
|
||||
|
||||
if(THREADS_FOUND)
|
||||
add_executable(ssl_pthread_server ssl_pthread_server.c)
|
||||
add_executable(ssl_pthread_server ssl_pthread_server.c $<TARGET_OBJECTS:mbedtls_test>)
|
||||
target_link_libraries(ssl_pthread_server ${libs} ${CMAKE_THREAD_LIBS_INIT})
|
||||
set(targets ${targets} ssl_pthread_server)
|
||||
list(APPEND executables ssl_pthread_server)
|
||||
endif(THREADS_FOUND)
|
||||
|
||||
install(TARGETS ${targets}
|
||||
install(TARGETS ${executables}
|
||||
DESTINATION "bin"
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
|
|
|
@ -74,6 +74,8 @@ int main( void )
|
|||
#include "mbedtls/psa_util.h"
|
||||
#endif
|
||||
|
||||
#include <test/helpers.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -1016,45 +1018,6 @@ int idle( mbedtls_net_context *fd,
|
|||
return( 0 );
|
||||
}
|
||||
|
||||
/* Unhexify `hex` into `dst`. `dst` must have
|
||||
* size at least `strlen( hex ) / 2`. */
|
||||
int unhexify( char const *hex, unsigned char *dst )
|
||||
{
|
||||
unsigned char c;
|
||||
size_t j;
|
||||
size_t len = strlen( hex );
|
||||
|
||||
if( len % 2 != 0 )
|
||||
return( -1 );
|
||||
|
||||
for( j = 0; j < len; j += 2 )
|
||||
{
|
||||
c = hex[j];
|
||||
if( c >= '0' && c <= '9' )
|
||||
c -= '0';
|
||||
else if( c >= 'a' && c <= 'f' )
|
||||
c -= 'a' - 10;
|
||||
else if( c >= 'A' && c <= 'F' )
|
||||
c -= 'A' - 10;
|
||||
else
|
||||
return( -1 );
|
||||
dst[ j / 2 ] = c << 4;
|
||||
|
||||
c = hex[j + 1];
|
||||
if( c >= '0' && c <= '9' )
|
||||
c -= '0';
|
||||
else if( c >= 'a' && c <= 'f' )
|
||||
c -= 'a' - 10;
|
||||
else if( c >= 'A' && c <= 'F' )
|
||||
c -= 'A' - 10;
|
||||
else
|
||||
return( -1 );
|
||||
dst[ j / 2 ] |= c;
|
||||
}
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
#if defined(MBEDTLS_SSL_DTLS_CONNECTION_ID)
|
||||
int report_cid_usage( mbedtls_ssl_context *ssl,
|
||||
const char *additional_description )
|
||||
|
@ -1785,16 +1748,10 @@ int main( int argc, char *argv[] )
|
|||
*/
|
||||
if( strlen( opt.psk ) )
|
||||
{
|
||||
psk_len = strlen( opt.psk ) / 2;
|
||||
if( psk_len > sizeof( psk ) )
|
||||
if( mbedtls_test_unhexify( psk, sizeof( psk ),
|
||||
opt.psk, &psk_len ) != 0 )
|
||||
{
|
||||
mbedtls_printf( "pre-shared key too long\n" );
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if( unhexify( opt.psk, psk ) != 0 )
|
||||
{
|
||||
mbedtls_printf( "pre-shared key not valid hex\n" );
|
||||
mbedtls_printf( "pre-shared key not valid\n" );
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
|
@ -1896,16 +1853,10 @@ int main( int argc, char *argv[] )
|
|||
}
|
||||
|
||||
#if defined(MBEDTLS_SSL_DTLS_CONNECTION_ID)
|
||||
cid_len = strlen( opt.cid_val ) / 2;
|
||||
if( cid_len > sizeof( cid ) )
|
||||
if( mbedtls_test_unhexify( cid, sizeof( cid ),
|
||||
opt.cid_val, &cid_len ) != 0 )
|
||||
{
|
||||
mbedtls_printf( "CID too long\n" );
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if( unhexify( opt.cid_val, cid ) != 0 )
|
||||
{
|
||||
mbedtls_printf( "CID not valid hex\n" );
|
||||
mbedtls_printf( "CID not valid\n" );
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
@ -1916,16 +1867,10 @@ int main( int argc, char *argv[] )
|
|||
if( opt.cid_val_renego == DFL_CID_VALUE_RENEGO )
|
||||
opt.cid_val_renego = opt.cid_val;
|
||||
|
||||
cid_renego_len = strlen( opt.cid_val_renego ) / 2;
|
||||
if( cid_renego_len > sizeof( cid_renego ) )
|
||||
if( mbedtls_test_unhexify( cid_renego, sizeof( cid_renego ),
|
||||
opt.cid_val_renego, &cid_renego_len ) != 0 )
|
||||
{
|
||||
mbedtls_printf( "CID too long\n" );
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if( unhexify( opt.cid_val_renego, cid_renego ) != 0 )
|
||||
{
|
||||
mbedtls_printf( "CID not valid hex\n" );
|
||||
mbedtls_printf( "CID not valid\n" );
|
||||
goto exit;
|
||||
}
|
||||
#endif /* MBEDTLS_SSL_DTLS_CONNECTION_ID */
|
||||
|
|
|
@ -70,6 +70,8 @@ int main( void )
|
|||
#include "mbedtls/psa_util.h"
|
||||
#endif
|
||||
|
||||
#include <test/helpers.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -1202,52 +1204,6 @@ int sni_callback( void *p_info, mbedtls_ssl_context *ssl,
|
|||
|
||||
#endif /* SNI_OPTION */
|
||||
|
||||
#if defined(MBEDTLS_KEY_EXCHANGE_SOME_PSK_ENABLED) || \
|
||||
defined(MBEDTLS_SSL_DTLS_CONNECTION_ID)
|
||||
|
||||
#define HEX2NUM( c ) \
|
||||
do \
|
||||
{ \
|
||||
if( (c) >= '0' && (c) <= '9' ) \
|
||||
(c) -= '0'; \
|
||||
else if( (c) >= 'a' && (c) <= 'f' ) \
|
||||
(c) -= 'a' - 10; \
|
||||
else if( (c) >= 'A' && (c) <= 'F' ) \
|
||||
(c) -= 'A' - 10; \
|
||||
else \
|
||||
return( -1 ); \
|
||||
} while( 0 )
|
||||
|
||||
/*
|
||||
* Convert a hex string to bytes.
|
||||
* Return 0 on success, -1 on error.
|
||||
*/
|
||||
int unhexify( unsigned char *output, const char *input, size_t *olen )
|
||||
{
|
||||
unsigned char c;
|
||||
size_t j;
|
||||
|
||||
*olen = strlen( input );
|
||||
if( *olen % 2 != 0 || *olen / 2 > MBEDTLS_PSK_MAX_LEN )
|
||||
return( -1 );
|
||||
*olen /= 2;
|
||||
|
||||
for( j = 0; j < *olen * 2; j += 2 )
|
||||
{
|
||||
c = input[j];
|
||||
HEX2NUM( c );
|
||||
output[ j / 2 ] = c << 4;
|
||||
|
||||
c = input[j + 1];
|
||||
HEX2NUM( c );
|
||||
output[ j / 2 ] |= c;
|
||||
}
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_KEY_EXCHANGE_SOME_PSK_ENABLED)
|
||||
|
||||
typedef struct _psk_entry psk_entry;
|
||||
|
@ -1319,7 +1275,8 @@ psk_entry *psk_parse( char *psk_string )
|
|||
GET_ITEM( new->name );
|
||||
GET_ITEM( key_hex );
|
||||
|
||||
if( unhexify( new->key, key_hex, &new->key_len ) != 0 )
|
||||
if( mbedtls_test_unhexify( new->key, MBEDTLS_PSK_MAX_LEN,
|
||||
key_hex, &new->key_len ) != 0 )
|
||||
goto error;
|
||||
|
||||
new->next = cur;
|
||||
|
@ -2632,7 +2589,8 @@ int main( int argc, char *argv[] )
|
|||
}
|
||||
|
||||
#if defined(MBEDTLS_SSL_DTLS_CONNECTION_ID)
|
||||
if( unhexify( cid, opt.cid_val, &cid_len ) != 0 )
|
||||
if( mbedtls_test_unhexify( cid, sizeof( cid ),
|
||||
opt.cid_val, &cid_len ) != 0 )
|
||||
{
|
||||
mbedtls_printf( "CID not valid hex\n" );
|
||||
goto exit;
|
||||
|
@ -2645,7 +2603,8 @@ int main( int argc, char *argv[] )
|
|||
if( opt.cid_val_renego == DFL_CID_VALUE_RENEGO )
|
||||
opt.cid_val_renego = opt.cid_val;
|
||||
|
||||
if( unhexify( cid_renego, opt.cid_val_renego, &cid_renego_len ) != 0 )
|
||||
if( mbedtls_test_unhexify( cid_renego, sizeof( cid_renego ),
|
||||
opt.cid_val_renego, &cid_renego_len ) != 0 )
|
||||
{
|
||||
mbedtls_printf( "CID not valid hex\n" );
|
||||
goto exit;
|
||||
|
@ -2656,7 +2615,8 @@ int main( int argc, char *argv[] )
|
|||
/*
|
||||
* Unhexify the pre-shared key and parse the list if any given
|
||||
*/
|
||||
if( unhexify( psk, opt.psk, &psk_len ) != 0 )
|
||||
if( mbedtls_test_unhexify( psk, sizeof( psk ),
|
||||
opt.psk, &psk_len ) != 0 )
|
||||
{
|
||||
mbedtls_printf( "pre-shared key not valid hex\n" );
|
||||
goto exit;
|
||||
|
|
|
@ -10,27 +10,35 @@ if(ENABLE_ZLIB_SUPPORT)
|
|||
set(libs ${libs} ${ZLIB_LIBRARIES})
|
||||
endif(ENABLE_ZLIB_SUPPORT)
|
||||
|
||||
add_executable(selftest selftest.c)
|
||||
target_link_libraries(selftest ${libs})
|
||||
set(executables_libs
|
||||
selftest
|
||||
udp_proxy
|
||||
)
|
||||
|
||||
add_executable(benchmark benchmark.c)
|
||||
target_link_libraries(benchmark mbedcrypto)
|
||||
set(executables_mbedcrypto
|
||||
benchmark
|
||||
query_compile_time_config
|
||||
zeroize
|
||||
)
|
||||
|
||||
if(TEST_CPP)
|
||||
add_executable(cpp_dummy_build cpp_dummy_build.cpp)
|
||||
target_link_libraries(cpp_dummy_build mbedcrypto)
|
||||
list(APPEND executables_mbedcrypto cpp_dummy_build)
|
||||
endif()
|
||||
|
||||
add_executable(udp_proxy udp_proxy.c)
|
||||
target_link_libraries(udp_proxy ${libs})
|
||||
foreach(exe IN LISTS executables_libs executables_mbedcrypto)
|
||||
add_executable(${exe} ${exe}.c $<TARGET_OBJECTS:mbedtls_test>)
|
||||
|
||||
add_executable(zeroize zeroize.c)
|
||||
target_link_libraries(zeroize mbedcrypto)
|
||||
# This emulates "if ( ... IN_LIST ... )" which becomes available in CMake 3.3
|
||||
list(FIND executables_libs ${exe} exe_index)
|
||||
if (${exe_index} GREATER -1)
|
||||
target_link_libraries(${exe} ${libs})
|
||||
else()
|
||||
target_link_libraries(${exe} mbedcrypto)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
add_executable(query_compile_time_config query_compile_time_config.c)
|
||||
target_sources(query_compile_time_config PUBLIC query_config.c)
|
||||
target_link_libraries(query_compile_time_config mbedcrypto)
|
||||
target_sources(query_compile_time_config PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/query_config.c)
|
||||
|
||||
install(TARGETS selftest benchmark udp_proxy query_compile_time_config
|
||||
install(TARGETS ${executables_libs} ${executables_mbedcrypto}
|
||||
DESTINATION "bin"
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
|
|
|
@ -2,12 +2,16 @@ set(libs
|
|||
mbedcrypto
|
||||
)
|
||||
|
||||
add_executable(strerror strerror.c)
|
||||
target_link_libraries(strerror ${libs})
|
||||
set(executables
|
||||
pem2der
|
||||
strerror
|
||||
)
|
||||
|
||||
add_executable(pem2der pem2der.c)
|
||||
target_link_libraries(pem2der ${libs})
|
||||
foreach(exe IN LISTS executables)
|
||||
add_executable(${exe} ${exe}.c $<TARGET_OBJECTS:mbedtls_test>)
|
||||
target_link_libraries(${exe} ${libs})
|
||||
endforeach()
|
||||
|
||||
install(TARGETS strerror pem2der
|
||||
install(TARGETS ${executables}
|
||||
DESTINATION "bin"
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
|
|
|
@ -10,21 +10,21 @@ if(ENABLE_ZLIB_SUPPORT)
|
|||
set(libs ${libs} ${ZLIB_LIBRARIES})
|
||||
endif(ENABLE_ZLIB_SUPPORT)
|
||||
|
||||
add_executable(cert_app cert_app.c)
|
||||
target_link_libraries(cert_app ${libs} mbedtls)
|
||||
set(executables
|
||||
cert_app
|
||||
cert_req
|
||||
cert_write
|
||||
crl_app
|
||||
req_app
|
||||
)
|
||||
|
||||
add_executable(crl_app crl_app.c)
|
||||
target_link_libraries(crl_app ${libs})
|
||||
foreach(exe IN LISTS executables)
|
||||
add_executable(${exe} ${exe}.c $<TARGET_OBJECTS:mbedtls_test>)
|
||||
target_link_libraries(${exe} ${libs})
|
||||
endforeach()
|
||||
|
||||
add_executable(req_app req_app.c)
|
||||
target_link_libraries(req_app ${libs})
|
||||
target_link_libraries(cert_app mbedtls)
|
||||
|
||||
add_executable(cert_req cert_req.c)
|
||||
target_link_libraries(cert_req ${libs})
|
||||
|
||||
add_executable(cert_write cert_write.c)
|
||||
target_link_libraries(cert_write ${libs})
|
||||
|
||||
install(TARGETS cert_app crl_app req_app cert_req cert_write
|
||||
install(TARGETS ${executables}
|
||||
DESTINATION "bin"
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
|
|
|
@ -39,6 +39,8 @@ my $programs_dir = 'programs';
|
|||
my $mbedtls_header_dir = 'include/mbedtls';
|
||||
my $psa_header_dir = 'include/psa';
|
||||
my $source_dir = 'library';
|
||||
my $test_source_dir = 'tests/src';
|
||||
my $test_header_dir = 'tests/include/test';
|
||||
|
||||
my @thirdparty_header_dirs = qw(
|
||||
3rdparty/everest/include/everest
|
||||
|
@ -58,6 +60,7 @@ my @include_directories = qw(
|
|||
3rdparty/everest/include/everest
|
||||
3rdparty/everest/include/everest/vs2010
|
||||
3rdparty/everest/include/everest/kremlib
|
||||
tests/include
|
||||
);
|
||||
my $include_directories = join(';', map {"../../$_"} @include_directories);
|
||||
|
||||
|
@ -104,6 +107,8 @@ sub check_dirs {
|
|||
&& -d $mbedtls_header_dir
|
||||
&& -d $psa_header_dir
|
||||
&& -d $source_dir
|
||||
&& -d $test_source_dir
|
||||
&& -d $test_header_dir
|
||||
&& -d $programs_dir;
|
||||
}
|
||||
|
||||
|
@ -249,12 +254,14 @@ sub main {
|
|||
my @header_dirs = (
|
||||
$mbedtls_header_dir,
|
||||
$psa_header_dir,
|
||||
$test_header_dir,
|
||||
$source_dir,
|
||||
@thirdparty_header_dirs,
|
||||
);
|
||||
my @headers = (map { <$_/*.h> } @header_dirs);
|
||||
my @source_dirs = (
|
||||
$source_dir,
|
||||
$test_source_dir,
|
||||
@thirdparty_source_dirs,
|
||||
);
|
||||
my @sources = (map { <$_/*.c> } @source_dirs);
|
||||
|
|
|
@ -46,9 +46,12 @@ function(add_test_suite suite_name)
|
|||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/scripts/generate_test_code.py mbedtls ${CMAKE_CURRENT_SOURCE_DIR}/suites/helpers.function ${CMAKE_CURRENT_SOURCE_DIR}/suites/main_test.function ${CMAKE_CURRENT_SOURCE_DIR}/suites/host_test.function ${CMAKE_CURRENT_SOURCE_DIR}/suites/test_suite_${suite_name}.function ${CMAKE_CURRENT_SOURCE_DIR}/suites/test_suite_${data_name}.data
|
||||
)
|
||||
|
||||
add_executable(test_suite_${data_name} test_suite_${data_name}.c $<TARGET_OBJECTS:mbedtests>)
|
||||
add_executable(test_suite_${data_name} test_suite_${data_name}.c $<TARGET_OBJECTS:mbedtls_test>)
|
||||
target_link_libraries(test_suite_${data_name} ${libs})
|
||||
target_include_directories(test_suite_${data_name} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
target_include_directories(test_suite_${data_name}
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../library)
|
||||
|
||||
if(${data_name} MATCHES ${SKIP_TEST_SUITES_REGEX})
|
||||
message(STATUS "The test suite ${data_name} will not be executed.")
|
||||
else()
|
||||
|
@ -66,10 +69,6 @@ if(MSVC)
|
|||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX-")
|
||||
endif(MSVC)
|
||||
|
||||
file(GLOB MBEDTESTS_FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/*.c)
|
||||
add_library(mbedtests OBJECT ${MBEDTESTS_FILES})
|
||||
target_include_directories(mbedtests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
|
||||
add_test_suite(aes aes.cbc)
|
||||
add_test_suite(aes aes.cfb)
|
||||
add_test_suite(aes aes.ecb)
|
||||
|
|
|
@ -77,7 +77,9 @@ all: $(BINARIES)
|
|||
$(MBEDLIBS):
|
||||
$(MAKE) -C ../library
|
||||
|
||||
MBEDTESTS_OBJS=$(patsubst %.c,%.o,$(wildcard src/*.c))
|
||||
MBEDTLS_TEST_OBJS=$(patsubst %.c,%.o,$(wildcard src/*.c))
|
||||
|
||||
mbedtls_test: $(MBEDTLS_TEST_OBJS)
|
||||
|
||||
# Rule to compile common test C files in src folder
|
||||
src/%.o : src/%.c
|
||||
|
@ -112,9 +114,9 @@ C_FILES := $(addsuffix .c,$(APPS))
|
|||
-o .
|
||||
|
||||
|
||||
$(BINARIES): %$(EXEXT): %.c $(MBEDLIBS) $(MBEDTESTS_OBJS)
|
||||
$(BINARIES): %$(EXEXT): %.c $(MBEDLIBS) $(MBEDTLS_TEST_OBJS)
|
||||
echo " CC $<"
|
||||
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(MBEDTESTS_OBJS) $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
||||
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(MBEDTLS_TEST_OBJS) $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
|
||||
|
||||
# Some test suites require additional header files.
|
||||
$(filter test_suite_psa_crypto%, $(BINARIES)): include/test/psa_crypto_helpers.h
|
||||
|
|
|
@ -54,7 +54,29 @@
|
|||
int mbedtls_test_platform_setup( void );
|
||||
void mbedtls_test_platform_teardown( void );
|
||||
|
||||
int mbedtls_test_unhexify( unsigned char *obuf, const char *ibuf );
|
||||
/**
|
||||
* \brief This function translates an ASCII string encoding an
|
||||
* hexadecimal number into the encoded hexadecimal number. The
|
||||
* hexadecimal number is represented as an array of
|
||||
* unsigned char.
|
||||
*
|
||||
* \note The output buffer can be the same as the input buffer. For
|
||||
* any other overlapping of the input and output buffers, the
|
||||
* behavior is undefined.
|
||||
*
|
||||
* \param obuf Output buffer.
|
||||
* \param obufmax Size in number of bytes of \p obuf.
|
||||
* \param ibuf Input buffer.
|
||||
* \param len The number of unsigned char written in \p obuf. This must
|
||||
* not be \c NULL.
|
||||
*
|
||||
* \return \c 0 on success.
|
||||
* \return \c -1 if the output buffer is too small or the input string
|
||||
* is not a valid ASCII encoding of an hexadecimal number.
|
||||
*/
|
||||
int mbedtls_test_unhexify( unsigned char *obuf, size_t obufmax,
|
||||
const char *ibuf, size_t *len );
|
||||
|
||||
void mbedtls_test_hexify( unsigned char *obuf,
|
||||
const unsigned char *ibuf,
|
||||
int len );
|
||||
|
|
|
@ -60,12 +60,19 @@ else
|
|||
DOCKER="sudo docker"
|
||||
fi
|
||||
|
||||
# Figure out the number of processors available
|
||||
if [ "$(uname)" == "Darwin" ]; then
|
||||
NUM_PROC="$(sysctl -n hw.logicalcpu)"
|
||||
else
|
||||
NUM_PROC="$(nproc)"
|
||||
fi
|
||||
|
||||
# Build the Docker image
|
||||
echo "Getting docker image up to date (this may take a few minutes)..."
|
||||
${DOCKER} image build \
|
||||
-t ${DOCKER_IMAGE_TAG} \
|
||||
--cache-from=${DOCKER_IMAGE_TAG} \
|
||||
--build-arg MAKEFLAGS_PARALLEL="-j $(nproc)" \
|
||||
--build-arg MAKEFLAGS_PARALLEL="-j ${NUM_PROC}" \
|
||||
--network host \
|
||||
${http_proxy+--build-arg http_proxy=${http_proxy}} \
|
||||
${https_proxy+--build-arg https_proxy=${https_proxy}} \
|
||||
|
|
|
@ -41,38 +41,49 @@ void mbedtls_test_platform_teardown( void )
|
|||
#endif /* MBEDTLS_PLATFORM_C */
|
||||
}
|
||||
|
||||
int mbedtls_test_unhexify( unsigned char *obuf, const char *ibuf )
|
||||
static int ascii2uc(const char c, unsigned char *uc)
|
||||
{
|
||||
unsigned char c, c2;
|
||||
int len = strlen( ibuf ) / 2;
|
||||
TEST_HELPER_ASSERT( strlen( ibuf ) % 2 == 0 ); /* must be even number of bytes */
|
||||
if( ( c >= '0' ) && ( c <= '9' ) )
|
||||
*uc = c - '0';
|
||||
else if( ( c >= 'a' ) && ( c <= 'f' ) )
|
||||
*uc = c - 'a' + 10;
|
||||
else if( ( c >= 'A' ) && ( c <= 'F' ) )
|
||||
*uc = c - 'A' + 10;
|
||||
else
|
||||
return( -1 );
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
int mbedtls_test_unhexify( unsigned char *obuf,
|
||||
size_t obufmax,
|
||||
const char *ibuf,
|
||||
size_t *len )
|
||||
{
|
||||
unsigned char uc, uc2;
|
||||
|
||||
*len = strlen( ibuf );
|
||||
|
||||
/* Must be even number of bytes. */
|
||||
if ( ( *len ) & 1 )
|
||||
return( -1 );
|
||||
*len /= 2;
|
||||
|
||||
if ( (*len) > obufmax )
|
||||
return( -1 );
|
||||
|
||||
while( *ibuf != 0 )
|
||||
{
|
||||
c = *ibuf++;
|
||||
if( c >= '0' && c <= '9' )
|
||||
c -= '0';
|
||||
else if( c >= 'a' && c <= 'f' )
|
||||
c -= 'a' - 10;
|
||||
else if( c >= 'A' && c <= 'F' )
|
||||
c -= 'A' - 10;
|
||||
else
|
||||
TEST_HELPER_ASSERT( 0 );
|
||||
if ( ascii2uc( *(ibuf++), &uc ) != 0 )
|
||||
return( -1 );
|
||||
|
||||
c2 = *ibuf++;
|
||||
if( c2 >= '0' && c2 <= '9' )
|
||||
c2 -= '0';
|
||||
else if( c2 >= 'a' && c2 <= 'f' )
|
||||
c2 -= 'a' - 10;
|
||||
else if( c2 >= 'A' && c2 <= 'F' )
|
||||
c2 -= 'A' - 10;
|
||||
else
|
||||
TEST_HELPER_ASSERT( 0 );
|
||||
if ( ascii2uc( *(ibuf++), &uc2 ) != 0 )
|
||||
return( -1 );
|
||||
|
||||
*obuf++ = ( c << 4 ) | c2;
|
||||
*(obuf++) = ( uc << 4 ) | uc2;
|
||||
}
|
||||
|
||||
return len;
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
void mbedtls_test_hexify( unsigned char *obuf,
|
||||
|
@ -117,6 +128,7 @@ unsigned char *mbedtls_test_zero_alloc( size_t len )
|
|||
unsigned char *mbedtls_test_unhexify_alloc( const char *ibuf, size_t *olen )
|
||||
{
|
||||
unsigned char *obuf;
|
||||
size_t len;
|
||||
|
||||
*olen = strlen( ibuf ) / 2;
|
||||
|
||||
|
@ -125,8 +137,7 @@ unsigned char *mbedtls_test_unhexify_alloc( const char *ibuf, size_t *olen )
|
|||
|
||||
obuf = mbedtls_calloc( 1, *olen );
|
||||
TEST_HELPER_ASSERT( obuf != NULL );
|
||||
|
||||
(void) mbedtls_test_unhexify( obuf, ibuf );
|
||||
TEST_HELPER_ASSERT( mbedtls_test_unhexify( obuf, *olen, ibuf, &len ) == 0 );
|
||||
|
||||
return( obuf );
|
||||
}
|
||||
|
|
|
@ -277,8 +277,13 @@ static int convert_params( size_t cnt , char ** params , int * int_params_store
|
|||
{
|
||||
if ( verify_string( &val ) == 0 )
|
||||
{
|
||||
*int_params_store = mbedtls_test_unhexify(
|
||||
(unsigned char *) val, val );
|
||||
size_t len;
|
||||
|
||||
TEST_HELPER_ASSERT(
|
||||
mbedtls_test_unhexify( (unsigned char *) val, strlen( val ),
|
||||
val, &len ) == 0 );
|
||||
|
||||
*int_params_store = len;
|
||||
*out++ = val;
|
||||
*out++ = (char *)(int_params_store++);
|
||||
}
|
||||
|
|
|
@ -70,12 +70,16 @@ uint8_t receive_byte()
|
|||
{
|
||||
uint8_t byte;
|
||||
uint8_t c[3];
|
||||
char *endptr;
|
||||
size_t len;
|
||||
|
||||
c[0] = greentea_getc();
|
||||
c[1] = greentea_getc();
|
||||
c[2] = '\0';
|
||||
|
||||
TEST_HELPER_ASSERT( mbedtls_test_unhexify( &byte, c ) != 2 );
|
||||
TEST_HELPER_ASSERT( mbedtls_test_unhexify( &byte, sizeof( byte ),
|
||||
c, &len ) == 0 );
|
||||
TEST_HELPER_ASSERT( len != 2 );
|
||||
|
||||
return( byte );
|
||||
}
|
||||
|
||||
|
@ -90,6 +94,7 @@ uint8_t receive_byte()
|
|||
uint32_t receive_uint32()
|
||||
{
|
||||
uint32_t value;
|
||||
size_t len;
|
||||
const uint8_t c_be[8] = { greentea_getc(),
|
||||
greentea_getc(),
|
||||
greentea_getc(),
|
||||
|
@ -101,7 +106,11 @@ uint32_t receive_uint32()
|
|||
};
|
||||
const uint8_t c[9] = { c_be[6], c_be[7], c_be[4], c_be[5], c_be[2],
|
||||
c_be[3], c_be[0], c_be[1], '\0' };
|
||||
TEST_HELPER_ASSERT( mbedtls_test_unhexify( (uint8_t*)&value, c ) != 8 );
|
||||
|
||||
TEST_HELPER_ASSERT( mbedtls_test_unhexify( (uint8_t*)&value, sizeof( value ),
|
||||
c, &len ) == 0 );
|
||||
TEST_HELPER_ASSERT( len != 8 );
|
||||
|
||||
return( value );
|
||||
}
|
||||
|
||||
|
|
|
@ -327,51 +327,39 @@ exit:
|
|||
/* END_CASE */
|
||||
|
||||
/* BEGIN_CASE depends_on:MBEDTLS_CIPHER_MODE_OFB */
|
||||
void aes_encrypt_ofb( int fragment_size, char *hex_key_string,
|
||||
char *hex_iv_string, char *hex_src_string,
|
||||
char *hex_dst_string )
|
||||
void aes_encrypt_ofb( int fragment_size, data_t *key_str,
|
||||
data_t *iv_str, data_t *src_str,
|
||||
char *expected_output_string)
|
||||
{
|
||||
unsigned char key_str[32];
|
||||
unsigned char iv_str[16];
|
||||
unsigned char src_str[64];
|
||||
unsigned char dst_str[64];
|
||||
unsigned char output[32];
|
||||
unsigned char output_string[65];
|
||||
mbedtls_aes_context ctx;
|
||||
size_t iv_offset = 0;
|
||||
int in_buffer_len;
|
||||
unsigned char* src_str_next;
|
||||
int key_len;
|
||||
|
||||
memset( key_str, 0x00, sizeof( key_str ) );
|
||||
memset( iv_str, 0x00, sizeof( iv_str ) );
|
||||
memset( src_str, 0x00, sizeof( src_str ) );
|
||||
memset( dst_str, 0x00, sizeof( dst_str ) );
|
||||
memset( output, 0x00, sizeof( output ) );
|
||||
memset( output_string, 0x00, sizeof( output_string ) );
|
||||
mbedtls_aes_init( &ctx );
|
||||
|
||||
TEST_ASSERT( strlen( hex_key_string ) <= ( 32 * 2 ) );
|
||||
TEST_ASSERT( strlen( hex_iv_string ) <= ( 16 * 2 ) );
|
||||
TEST_ASSERT( strlen( hex_src_string ) <= ( 64 * 2 ) );
|
||||
TEST_ASSERT( strlen( hex_dst_string ) <= ( 64 * 2 ) );
|
||||
TEST_ASSERT( (size_t)fragment_size < sizeof( output ) );
|
||||
|
||||
key_len = mbedtls_test_unhexify( key_str, hex_key_string );
|
||||
mbedtls_test_unhexify( iv_str, hex_iv_string );
|
||||
in_buffer_len = mbedtls_test_unhexify( src_str, hex_src_string );
|
||||
|
||||
TEST_ASSERT( mbedtls_aes_setkey_enc( &ctx, key_str, key_len * 8 ) == 0 );
|
||||
src_str_next = src_str;
|
||||
TEST_ASSERT( mbedtls_aes_setkey_enc( &ctx, key_str->x,
|
||||
key_str->len * 8 ) == 0 );
|
||||
in_buffer_len = src_str->len;
|
||||
src_str_next = src_str->x;
|
||||
|
||||
while( in_buffer_len > 0 )
|
||||
{
|
||||
TEST_ASSERT( mbedtls_aes_crypt_ofb( &ctx, fragment_size, &iv_offset,
|
||||
iv_str, src_str_next, output ) == 0 );
|
||||
iv_str->x, src_str_next, output ) == 0 );
|
||||
|
||||
mbedtls_test_hexify( dst_str, output, fragment_size );
|
||||
TEST_ASSERT( strncmp( (char *) dst_str, hex_dst_string,
|
||||
mbedtls_test_hexify( output_string, output, fragment_size );
|
||||
TEST_ASSERT( strncmp( (char *) output_string, expected_output_string,
|
||||
( 2 * fragment_size ) ) == 0 );
|
||||
|
||||
in_buffer_len -= fragment_size;
|
||||
hex_dst_string += ( fragment_size * 2 );
|
||||
expected_output_string += ( fragment_size * 2 );
|
||||
src_str_next += fragment_size;
|
||||
|
||||
if( in_buffer_len < fragment_size )
|
||||
|
|
|
@ -206,35 +206,28 @@ exit:
|
|||
/* END_CASE */
|
||||
|
||||
/* BEGIN_CASE */
|
||||
void aria_encrypt_ecb( char *hex_key_string, char *hex_src_string,
|
||||
void aria_encrypt_ecb( data_t *key_str, data_t *src_str,
|
||||
char *hex_dst_string, int setkey_result )
|
||||
{
|
||||
unsigned char key_str[ARIA_MAX_KEY_STR];
|
||||
unsigned char src_str[ARIA_MAX_DATA_STR];
|
||||
unsigned char dst_str[ARIA_MAX_DATA_STR];
|
||||
unsigned char output[ARIA_MAX_DATASIZE];
|
||||
mbedtls_aria_context ctx;
|
||||
int key_len, data_len, i;
|
||||
size_t i;
|
||||
|
||||
memset( key_str, 0x00, sizeof( key_str ) );
|
||||
memset( src_str, 0x00, sizeof( src_str ) );
|
||||
memset( dst_str, 0x00, sizeof( dst_str ) );
|
||||
memset( output, 0x00, sizeof( output ) );
|
||||
mbedtls_aria_init( &ctx );
|
||||
|
||||
key_len = mbedtls_test_unhexify( key_str, hex_key_string );
|
||||
data_len = mbedtls_test_unhexify( src_str, hex_src_string );
|
||||
|
||||
TEST_ASSERT( mbedtls_aria_setkey_enc( &ctx, key_str, key_len * 8 )
|
||||
TEST_ASSERT( mbedtls_aria_setkey_enc( &ctx, key_str->x, key_str->len * 8 )
|
||||
== setkey_result );
|
||||
if( setkey_result == 0 )
|
||||
{
|
||||
for( i = 0; i < data_len; i += MBEDTLS_ARIA_BLOCKSIZE )
|
||||
for( i = 0; i < src_str->len; i += MBEDTLS_ARIA_BLOCKSIZE )
|
||||
{
|
||||
TEST_ASSERT( mbedtls_aria_crypt_ecb( &ctx, src_str + i, output + i )
|
||||
== 0 );
|
||||
TEST_ASSERT( mbedtls_aria_crypt_ecb( &ctx, src_str->x + i,
|
||||
output + i ) == 0 );
|
||||
}
|
||||
mbedtls_test_hexify( dst_str, output, data_len );
|
||||
mbedtls_test_hexify( dst_str, output, src_str->len );
|
||||
|
||||
TEST_ASSERT( strcasecmp( (char *) dst_str, hex_dst_string ) == 0 );
|
||||
}
|
||||
|
@ -245,35 +238,28 @@ exit:
|
|||
/* END_CASE */
|
||||
|
||||
/* BEGIN_CASE */
|
||||
void aria_decrypt_ecb( char *hex_key_string, char *hex_src_string,
|
||||
void aria_decrypt_ecb( data_t *key_str, data_t *src_str,
|
||||
char *hex_dst_string, int setkey_result )
|
||||
{
|
||||
unsigned char key_str[ARIA_MAX_KEY_STR];
|
||||
unsigned char src_str[ARIA_MAX_DATA_STR];
|
||||
unsigned char dst_str[ARIA_MAX_DATA_STR];
|
||||
unsigned char output[ARIA_MAX_DATASIZE];
|
||||
mbedtls_aria_context ctx;
|
||||
int key_len, data_len, i;
|
||||
size_t i;
|
||||
|
||||
memset( key_str, 0x00, sizeof( key_str ) );
|
||||
memset( src_str, 0x00, sizeof( src_str ) );
|
||||
memset( dst_str, 0x00, sizeof( dst_str ) );
|
||||
memset( output, 0x00, sizeof( output ) );
|
||||
mbedtls_aria_init( &ctx );
|
||||
|
||||
key_len = mbedtls_test_unhexify( key_str, hex_key_string );
|
||||
data_len = mbedtls_test_unhexify( src_str, hex_src_string );
|
||||
|
||||
TEST_ASSERT( mbedtls_aria_setkey_dec( &ctx, key_str, key_len * 8 )
|
||||
TEST_ASSERT( mbedtls_aria_setkey_dec( &ctx, key_str->x, key_str->len * 8 )
|
||||
== setkey_result );
|
||||
if( setkey_result == 0 )
|
||||
{
|
||||
for( i = 0; i < data_len; i += MBEDTLS_ARIA_BLOCKSIZE )
|
||||
for( i = 0; i < src_str->len; i += MBEDTLS_ARIA_BLOCKSIZE )
|
||||
{
|
||||
TEST_ASSERT( mbedtls_aria_crypt_ecb( &ctx, src_str + i, output + i )
|
||||
== 0 );
|
||||
TEST_ASSERT( mbedtls_aria_crypt_ecb( &ctx, src_str->x + i,
|
||||
output + i ) == 0 );
|
||||
}
|
||||
mbedtls_test_hexify( dst_str, output, data_len );
|
||||
mbedtls_test_hexify( dst_str, output, src_str->len );
|
||||
|
||||
TEST_ASSERT( strcasecmp( (char *) dst_str, hex_dst_string ) == 0 );
|
||||
}
|
||||
|
@ -284,36 +270,25 @@ exit:
|
|||
/* END_CASE */
|
||||
|
||||
/* BEGIN_CASE depends_on:MBEDTLS_CIPHER_MODE_CBC */
|
||||
void aria_encrypt_cbc( char *hex_key_string, char *hex_iv_string,
|
||||
char *hex_src_string, char *hex_dst_string,
|
||||
void aria_encrypt_cbc( data_t *key_str, data_t *iv_str,
|
||||
data_t *src_str, char *hex_dst_string,
|
||||
int cbc_result )
|
||||
{
|
||||
unsigned char key_str[ARIA_MAX_KEY_STR];
|
||||
unsigned char iv_str[ARIA_BLOCK_STR];
|
||||
unsigned char src_str[ARIA_MAX_DATA_STR];
|
||||
unsigned char dst_str[ARIA_MAX_DATA_STR];
|
||||
unsigned char output[ARIA_MAX_DATASIZE];
|
||||
mbedtls_aria_context ctx;
|
||||
int key_len, data_len;
|
||||
|
||||
memset( key_str, 0x00, sizeof( key_str ) );
|
||||
memset( iv_str, 0x00, sizeof( iv_str ) );
|
||||
memset( src_str, 0x00, sizeof( src_str ) );
|
||||
memset( dst_str, 0x00, sizeof( dst_str ) );
|
||||
memset( output, 0x00, sizeof( output ) );
|
||||
mbedtls_aria_init( &ctx );
|
||||
|
||||
key_len = mbedtls_test_unhexify( key_str, hex_key_string );
|
||||
mbedtls_test_unhexify( iv_str, hex_iv_string );
|
||||
data_len = mbedtls_test_unhexify( src_str, hex_src_string );
|
||||
|
||||
mbedtls_aria_setkey_enc( &ctx, key_str, key_len * 8 );
|
||||
TEST_ASSERT( mbedtls_aria_crypt_cbc( &ctx, MBEDTLS_ARIA_ENCRYPT, data_len,
|
||||
iv_str, src_str, output )
|
||||
== cbc_result );
|
||||
mbedtls_aria_setkey_enc( &ctx, key_str->x, key_str->len * 8 );
|
||||
TEST_ASSERT( mbedtls_aria_crypt_cbc( &ctx, MBEDTLS_ARIA_ENCRYPT,
|
||||
src_str->len, iv_str->x, src_str->x,
|
||||
output ) == cbc_result );
|
||||
if( cbc_result == 0 )
|
||||
{
|
||||
mbedtls_test_hexify( dst_str, output, data_len );
|
||||
mbedtls_test_hexify( dst_str, output, src_str->len );
|
||||
|
||||
TEST_ASSERT( strcasecmp( (char *) dst_str, hex_dst_string ) == 0 );
|
||||
}
|
||||
|
@ -324,36 +299,25 @@ exit:
|
|||
/* END_CASE */
|
||||
|
||||
/* BEGIN_CASE depends_on:MBEDTLS_CIPHER_MODE_CBC */
|
||||
void aria_decrypt_cbc( char *hex_key_string, char *hex_iv_string,
|
||||
char *hex_src_string, char *hex_dst_string,
|
||||
void aria_decrypt_cbc( data_t *key_str, data_t *iv_str,
|
||||
data_t *src_str, char *hex_dst_string,
|
||||
int cbc_result )
|
||||
{
|
||||
unsigned char key_str[ARIA_MAX_KEY_STR];
|
||||
unsigned char iv_str[ARIA_BLOCK_STR];
|
||||
unsigned char src_str[ARIA_MAX_DATA_STR];
|
||||
unsigned char dst_str[ARIA_MAX_DATA_STR];
|
||||
unsigned char output[ARIA_MAX_DATASIZE];
|
||||
mbedtls_aria_context ctx;
|
||||
int key_len, data_len;
|
||||
|
||||
memset( key_str, 0x00, sizeof( key_str ) );
|
||||
memset( iv_str, 0x00, sizeof( iv_str ) );
|
||||
memset( src_str, 0x00, sizeof( src_str ) );
|
||||
memset( dst_str, 0x00, sizeof( dst_str ) );
|
||||
memset( output, 0x00, sizeof( output ) );
|
||||
mbedtls_aria_init( &ctx );
|
||||
|
||||
key_len = mbedtls_test_unhexify( key_str, hex_key_string );
|
||||
mbedtls_test_unhexify( iv_str, hex_iv_string );
|
||||
data_len = mbedtls_test_unhexify( src_str, hex_src_string );
|
||||
|
||||
mbedtls_aria_setkey_dec( &ctx, key_str, key_len * 8 );
|
||||
TEST_ASSERT( mbedtls_aria_crypt_cbc( &ctx, MBEDTLS_ARIA_DECRYPT, data_len,
|
||||
iv_str, src_str, output )
|
||||
== cbc_result );
|
||||
mbedtls_aria_setkey_dec( &ctx, key_str->x, key_str->len * 8 );
|
||||
TEST_ASSERT( mbedtls_aria_crypt_cbc( &ctx, MBEDTLS_ARIA_DECRYPT,
|
||||
src_str->len, iv_str->x, src_str->x,
|
||||
output ) == cbc_result );
|
||||
if( cbc_result == 0 )
|
||||
{
|
||||
mbedtls_test_hexify( dst_str, output, data_len );
|
||||
mbedtls_test_hexify( dst_str, output, src_str->len );
|
||||
|
||||
TEST_ASSERT( strcasecmp( (char *) dst_str, hex_dst_string ) == 0 );
|
||||
}
|
||||
|
@ -364,36 +328,25 @@ exit:
|
|||
/* END_CASE */
|
||||
|
||||
/* BEGIN_CASE depends_on:MBEDTLS_CIPHER_MODE_CFB */
|
||||
void aria_encrypt_cfb128( char *hex_key_string, char *hex_iv_string,
|
||||
char *hex_src_string, char *hex_dst_string,
|
||||
void aria_encrypt_cfb128( data_t *key_str, data_t *iv_str,
|
||||
data_t *src_str, char *hex_dst_string,
|
||||
int result )
|
||||
{
|
||||
unsigned char key_str[ARIA_MAX_KEY_STR];
|
||||
unsigned char iv_str[ARIA_BLOCK_STR];
|
||||
unsigned char src_str[ARIA_MAX_DATA_STR];
|
||||
unsigned char dst_str[ARIA_MAX_DATA_STR];
|
||||
unsigned char output[ARIA_MAX_DATASIZE];
|
||||
mbedtls_aria_context ctx;
|
||||
size_t iv_offset = 0;
|
||||
int key_len, data_len;
|
||||
|
||||
memset( key_str, 0x00, sizeof( key_str ) );
|
||||
memset( iv_str, 0x00, sizeof( iv_str ) );
|
||||
memset( src_str, 0x00, sizeof( src_str ) );
|
||||
memset( dst_str, 0x00, sizeof( dst_str ) );
|
||||
memset( output, 0x00, sizeof( output ) );
|
||||
mbedtls_aria_init( &ctx );
|
||||
|
||||
key_len = mbedtls_test_unhexify( key_str, hex_key_string );
|
||||
mbedtls_test_unhexify( iv_str, hex_iv_string );
|
||||
data_len = mbedtls_test_unhexify( src_str, hex_src_string );
|
||||
|
||||
mbedtls_aria_setkey_enc( &ctx, key_str, key_len * 8 );
|
||||
mbedtls_aria_setkey_enc( &ctx, key_str->x, key_str->len * 8 );
|
||||
TEST_ASSERT( mbedtls_aria_crypt_cfb128( &ctx, MBEDTLS_ARIA_ENCRYPT,
|
||||
data_len, &iv_offset, iv_str,
|
||||
src_str, output )
|
||||
src_str->len, &iv_offset,
|
||||
iv_str->x, src_str->x, output )
|
||||
== result );
|
||||
mbedtls_test_hexify( dst_str, output, data_len );
|
||||
mbedtls_test_hexify( dst_str, output, src_str->len );
|
||||
|
||||
TEST_ASSERT( strcasecmp( (char *) dst_str, hex_dst_string ) == 0 );
|
||||
|
||||
|
@ -403,36 +356,25 @@ exit:
|
|||
/* END_CASE */
|
||||
|
||||
/* BEGIN_CASE depends_on:MBEDTLS_CIPHER_MODE_CFB */
|
||||
void aria_decrypt_cfb128( char *hex_key_string, char *hex_iv_string,
|
||||
char *hex_src_string, char *hex_dst_string,
|
||||
void aria_decrypt_cfb128( data_t *key_str, data_t *iv_str,
|
||||
data_t *src_str, char *hex_dst_string,
|
||||
int result )
|
||||
{
|
||||
unsigned char key_str[ARIA_MAX_KEY_STR];
|
||||
unsigned char iv_str[ARIA_BLOCK_STR];
|
||||
unsigned char src_str[ARIA_MAX_DATA_STR];
|
||||
unsigned char dst_str[ARIA_MAX_DATA_STR];
|
||||
unsigned char output[ARIA_MAX_DATASIZE];
|
||||
mbedtls_aria_context ctx;
|
||||
size_t iv_offset = 0;
|
||||
int key_len, data_len;
|
||||
|
||||
memset( key_str, 0x00, sizeof( key_str ) );
|
||||
memset( iv_str, 0x00, sizeof( iv_str ) );
|
||||
memset( src_str, 0x00, sizeof( src_str ) );
|
||||
memset( dst_str, 0x00, sizeof( dst_str ) );
|
||||
memset( output, 0x00, sizeof( output ) );
|
||||
mbedtls_aria_init( &ctx );
|
||||
|
||||
key_len = mbedtls_test_unhexify( key_str, hex_key_string );
|
||||
mbedtls_test_unhexify( iv_str, hex_iv_string );
|
||||
data_len = mbedtls_test_unhexify( src_str, hex_src_string );
|
||||
|
||||
mbedtls_aria_setkey_enc( &ctx, key_str, key_len * 8 );
|
||||
mbedtls_aria_setkey_enc( &ctx, key_str->x, key_str->len * 8 );
|
||||
TEST_ASSERT( mbedtls_aria_crypt_cfb128( &ctx, MBEDTLS_ARIA_DECRYPT,
|
||||
data_len, &iv_offset, iv_str,
|
||||
src_str, output )
|
||||
src_str->len, &iv_offset,
|
||||
iv_str->x, src_str->x, output )
|
||||
== result );
|
||||
mbedtls_test_hexify( dst_str, output, data_len );
|
||||
mbedtls_test_hexify( dst_str, output, src_str->len );
|
||||
|
||||
TEST_ASSERT( strcasecmp( (char *) dst_str, hex_dst_string ) == 0 );
|
||||
|
||||
|
@ -442,36 +384,25 @@ exit:
|
|||
/* END_CASE */
|
||||
|
||||
/* BEGIN_CASE depends_on:MBEDTLS_CIPHER_MODE_CTR */
|
||||
void aria_encrypt_ctr( char *hex_key_string, char *hex_iv_string,
|
||||
char *hex_src_string, char *hex_dst_string,
|
||||
void aria_encrypt_ctr( data_t *key_str, data_t *iv_str,
|
||||
data_t *src_str, char *hex_dst_string,
|
||||
int result )
|
||||
{
|
||||
unsigned char key_str[ARIA_MAX_KEY_STR];
|
||||
unsigned char iv_str[ARIA_BLOCK_STR];
|
||||
unsigned char src_str[ARIA_MAX_DATA_STR];
|
||||
unsigned char dst_str[ARIA_MAX_DATA_STR];
|
||||
unsigned char output[ARIA_MAX_DATASIZE];
|
||||
unsigned char blk[MBEDTLS_ARIA_BLOCKSIZE];
|
||||
mbedtls_aria_context ctx;
|
||||
size_t iv_offset = 0;
|
||||
int key_len, data_len;
|
||||
|
||||
memset( key_str, 0x00, sizeof( key_str ) );
|
||||
memset( iv_str, 0x00, sizeof( iv_str ) );
|
||||
memset( src_str, 0x00, sizeof( src_str ) );
|
||||
memset( dst_str, 0x00, sizeof( dst_str ) );
|
||||
memset( output, 0x00, sizeof( output ) );
|
||||
mbedtls_aria_init( &ctx );
|
||||
|
||||
key_len = mbedtls_test_unhexify( key_str, hex_key_string );
|
||||
mbedtls_test_unhexify( iv_str, hex_iv_string );
|
||||
data_len = mbedtls_test_unhexify( src_str, hex_src_string );
|
||||
|
||||
mbedtls_aria_setkey_enc( &ctx, key_str, key_len * 8 );
|
||||
TEST_ASSERT( mbedtls_aria_crypt_ctr( &ctx, data_len, &iv_offset, iv_str,
|
||||
blk, src_str, output )
|
||||
mbedtls_aria_setkey_enc( &ctx, key_str->x, key_str->len * 8 );
|
||||
TEST_ASSERT( mbedtls_aria_crypt_ctr( &ctx, src_str->len, &iv_offset,
|
||||
iv_str->x, blk, src_str->x, output )
|
||||
== result );
|
||||
mbedtls_test_hexify( dst_str, output, data_len );
|
||||
mbedtls_test_hexify( dst_str, output, src_str->len );
|
||||
|
||||
TEST_ASSERT( strcasecmp( (char *) dst_str, hex_dst_string ) == 0 );
|
||||
|
||||
|
@ -481,36 +412,25 @@ exit:
|
|||
/* END_CASE */
|
||||
|
||||
/* BEGIN_CASE depends_on:MBEDTLS_CIPHER_MODE_CTR */
|
||||
void aria_decrypt_ctr( char *hex_key_string, char *hex_iv_string,
|
||||
char *hex_src_string, char *hex_dst_string,
|
||||
void aria_decrypt_ctr( data_t *key_str, data_t *iv_str,
|
||||
data_t *src_str, char *hex_dst_string,
|
||||
int result )
|
||||
{
|
||||
unsigned char key_str[ARIA_MAX_KEY_STR];
|
||||
unsigned char iv_str[ARIA_BLOCK_STR];
|
||||
unsigned char src_str[ARIA_MAX_DATA_STR];
|
||||
unsigned char dst_str[ARIA_MAX_DATA_STR];
|
||||
unsigned char output[ARIA_MAX_DATASIZE];
|
||||
unsigned char blk[MBEDTLS_ARIA_BLOCKSIZE];
|
||||
mbedtls_aria_context ctx;
|
||||
size_t iv_offset = 0;
|
||||
int key_len, data_len;
|
||||
|
||||
memset( key_str, 0x00, sizeof( key_str ) );
|
||||
memset( iv_str, 0x00, sizeof( iv_str ) );
|
||||
memset( src_str, 0x00, sizeof( src_str ) );
|
||||
memset( dst_str, 0x00, sizeof( dst_str ) );
|
||||
memset( output, 0x00, sizeof( output ) );
|
||||
mbedtls_aria_init( &ctx );
|
||||
|
||||
key_len = mbedtls_test_unhexify( key_str, hex_key_string );
|
||||
mbedtls_test_unhexify( iv_str, hex_iv_string );
|
||||
data_len = mbedtls_test_unhexify( src_str, hex_src_string );
|
||||
|
||||
mbedtls_aria_setkey_enc( &ctx, key_str, key_len * 8 );
|
||||
TEST_ASSERT( mbedtls_aria_crypt_ctr( &ctx, data_len, &iv_offset, iv_str,
|
||||
blk, src_str, output )
|
||||
mbedtls_aria_setkey_enc( &ctx, key_str->x, key_str->len * 8 );
|
||||
TEST_ASSERT( mbedtls_aria_crypt_ctr( &ctx, src_str->len, &iv_offset,
|
||||
iv_str->x, blk, src_str->x, output )
|
||||
== result );
|
||||
mbedtls_test_hexify( dst_str, output, data_len );
|
||||
mbedtls_test_hexify( dst_str, output, src_str->len );
|
||||
|
||||
TEST_ASSERT( strcasecmp( (char *) dst_str, hex_dst_string ) == 0 );
|
||||
|
||||
|
|
|
@ -192,66 +192,51 @@ exit:
|
|||
|
||||
/* BEGIN_CASE */
|
||||
void mbedtls_ccm_star_encrypt_and_tag( int cipher_id,
|
||||
char *key_hex, char *msg_hex,
|
||||
char *source_address_hex, char *frame_counter_hex,
|
||||
int sec_level, char *add_hex,
|
||||
char *result_hex, int output_ret )
|
||||
data_t *key, data_t *msg,
|
||||
data_t *source_address, data_t *frame_counter,
|
||||
int sec_level, data_t *add,
|
||||
data_t *expected_result, int output_ret )
|
||||
{
|
||||
unsigned char key[32];
|
||||
unsigned char msg[50];
|
||||
unsigned char iv[13];
|
||||
unsigned char add[32];
|
||||
unsigned char result[50];
|
||||
unsigned char source_address[8];
|
||||
unsigned char frame_counter[4];
|
||||
mbedtls_ccm_context ctx;
|
||||
size_t i, key_len, msg_len, iv_len, add_len, result_len, source_address_len, frame_counter_len, tag_len;
|
||||
size_t i, iv_len, tag_len;
|
||||
int ret;
|
||||
|
||||
mbedtls_ccm_init( &ctx );
|
||||
|
||||
memset( key, 0x00, sizeof( key ) );
|
||||
memset( msg, 0x00, sizeof( msg ) );
|
||||
memset( iv, 0x00, sizeof( iv ) );
|
||||
memset( add, 0x00, sizeof( add ) );
|
||||
memset( result, 0x00, sizeof( result ) );
|
||||
memset( source_address, 0x00, sizeof( source_address ) );
|
||||
memset( frame_counter, 0x00, sizeof( frame_counter ) );
|
||||
|
||||
key_len = mbedtls_test_unhexify( key, key_hex );
|
||||
msg_len = mbedtls_test_unhexify( msg, msg_hex );
|
||||
add_len = mbedtls_test_unhexify( add, add_hex );
|
||||
result_len = mbedtls_test_unhexify( result, result_hex );
|
||||
source_address_len = mbedtls_test_unhexify( source_address,
|
||||
source_address_hex );
|
||||
frame_counter_len = mbedtls_test_unhexify( frame_counter,
|
||||
frame_counter_hex );
|
||||
|
||||
if( sec_level % 4 == 0)
|
||||
tag_len = 0;
|
||||
else
|
||||
tag_len = 1 << ( sec_level % 4 + 1);
|
||||
|
||||
for( i = 0; i < source_address_len; i++ )
|
||||
iv[i] = source_address[i];
|
||||
for( i = 0; i < source_address->len; i++ )
|
||||
iv[i] = source_address->x[i];
|
||||
|
||||
for( i = 0; i < frame_counter_len; i++ )
|
||||
iv[source_address_len + i] = frame_counter[i];
|
||||
for( i = 0; i < frame_counter->len; i++ )
|
||||
iv[source_address->len + i] = frame_counter->x[i];
|
||||
|
||||
iv[source_address_len + frame_counter_len] = sec_level;
|
||||
iv[source_address->len + frame_counter->len] = sec_level;
|
||||
iv_len = sizeof( iv );
|
||||
|
||||
TEST_ASSERT( mbedtls_ccm_setkey( &ctx, cipher_id, key, key_len * 8 ) == 0 );
|
||||
TEST_ASSERT( mbedtls_ccm_setkey( &ctx, cipher_id,
|
||||
key->x, key->len * 8 ) == 0 );
|
||||
|
||||
ret = mbedtls_ccm_star_encrypt_and_tag( &ctx, msg_len, iv, iv_len,
|
||||
add, add_len, msg, msg, msg + msg_len, tag_len );
|
||||
ret = mbedtls_ccm_star_encrypt_and_tag( &ctx, msg->len, iv, iv_len,
|
||||
add->x, add->len, msg->x,
|
||||
result, result + msg->len, tag_len );
|
||||
|
||||
TEST_ASSERT( ret == output_ret );
|
||||
|
||||
TEST_ASSERT( memcmp( msg, result, result_len ) == 0 );
|
||||
TEST_ASSERT( memcmp( result,
|
||||
expected_result->x, expected_result->len ) == 0 );
|
||||
|
||||
/* Check we didn't write past the end */
|
||||
TEST_ASSERT( msg[result_len] == 0 && msg[result_len + 1] == 0 );
|
||||
TEST_ASSERT( result[expected_result->len] == 0 &&
|
||||
result[expected_result->len + 1] == 0 );
|
||||
|
||||
exit:
|
||||
mbedtls_ccm_free( &ctx );
|
||||
|
@ -260,71 +245,51 @@ exit:
|
|||
|
||||
/* BEGIN_CASE */
|
||||
void mbedtls_ccm_star_auth_decrypt( int cipher_id,
|
||||
char *key_hex, char *msg_hex,
|
||||
char *source_address_hex, char *frame_counter_hex,
|
||||
int sec_level, char *add_hex,
|
||||
char *result_hex, int output_ret )
|
||||
data_t *key, data_t *msg,
|
||||
data_t *source_address, data_t *frame_counter,
|
||||
int sec_level, data_t *add,
|
||||
data_t *expected_result, int output_ret )
|
||||
{
|
||||
unsigned char key[32];
|
||||
unsigned char msg[50];
|
||||
unsigned char iv[13];
|
||||
unsigned char add[32];
|
||||
unsigned char tag[16];
|
||||
unsigned char result[50];
|
||||
unsigned char source_address[8];
|
||||
unsigned char frame_counter[4];
|
||||
mbedtls_ccm_context ctx;
|
||||
size_t i, key_len, msg_len, iv_len, add_len, tag_len, result_len, source_address_len, frame_counter_len;
|
||||
size_t i, iv_len, tag_len;
|
||||
int ret;
|
||||
|
||||
mbedtls_ccm_init( &ctx );
|
||||
|
||||
memset( key, 0x00, sizeof( key ) );
|
||||
memset( msg, 0x00, sizeof( msg ) );
|
||||
memset( iv, 0x00, sizeof( iv ) );
|
||||
memset( add, 0x00, sizeof( add ) );
|
||||
memset( result, 0x00, sizeof( result ) );
|
||||
memset( source_address, 0x00, sizeof( source_address ) );
|
||||
memset( frame_counter, 0x00, sizeof( frame_counter ) );
|
||||
memset( tag, 0x00, sizeof( tag ) );
|
||||
|
||||
key_len = mbedtls_test_unhexify( key, key_hex );
|
||||
msg_len = mbedtls_test_unhexify( msg, msg_hex );
|
||||
add_len = mbedtls_test_unhexify( add, add_hex );
|
||||
result_len = mbedtls_test_unhexify( result, result_hex );
|
||||
source_address_len = mbedtls_test_unhexify( source_address,
|
||||
source_address_hex );
|
||||
frame_counter_len = mbedtls_test_unhexify( frame_counter,
|
||||
frame_counter_hex );
|
||||
memset( result, '+', sizeof( result ) );
|
||||
|
||||
if( sec_level % 4 == 0)
|
||||
tag_len = 0;
|
||||
else
|
||||
tag_len = 1 << ( sec_level % 4 + 1);
|
||||
|
||||
for( i = 0; i < source_address_len; i++ )
|
||||
iv[i] = source_address[i];
|
||||
for( i = 0; i < source_address->len; i++ )
|
||||
iv[i] = source_address->x[i];
|
||||
|
||||
for( i = 0; i < frame_counter_len; i++ )
|
||||
iv[source_address_len + i] = frame_counter[i];
|
||||
for( i = 0; i < frame_counter->len; i++ )
|
||||
iv[source_address->len + i] = frame_counter->x[i];
|
||||
|
||||
iv[source_address_len + frame_counter_len] = sec_level;
|
||||
iv[source_address->len + frame_counter->len] = sec_level;
|
||||
iv_len = sizeof( iv );
|
||||
|
||||
msg_len -= tag_len;
|
||||
memcpy( tag, msg + msg_len, tag_len );
|
||||
TEST_ASSERT( mbedtls_ccm_setkey( &ctx, cipher_id, key->x, key->len * 8 ) == 0 );
|
||||
|
||||
TEST_ASSERT( mbedtls_ccm_setkey( &ctx, cipher_id, key, key_len * 8 ) == 0 );
|
||||
|
||||
ret = mbedtls_ccm_star_auth_decrypt( &ctx, msg_len, iv, iv_len,
|
||||
add, add_len, msg, msg, msg + msg_len, tag_len );
|
||||
ret = mbedtls_ccm_star_auth_decrypt( &ctx, msg->len - tag_len, iv, iv_len,
|
||||
add->x, add->len, msg->x, result,
|
||||
msg->x + msg->len - tag_len, tag_len );
|
||||
|
||||
TEST_ASSERT( ret == output_ret );
|
||||
|
||||
TEST_ASSERT( memcmp( msg, result, result_len ) == 0 );
|
||||
TEST_ASSERT( memcmp( result, expected_result->x,
|
||||
expected_result->len ) == 0 );
|
||||
|
||||
/* Check we didn't write past the end (where the original tag is) */
|
||||
TEST_ASSERT( memcmp( msg + msg_len, tag, tag_len ) == 0 );
|
||||
TEST_ASSERT( ( msg->len + 2 ) <= sizeof( result ) );
|
||||
TEST_EQUAL( result[msg->len], '+' );
|
||||
TEST_EQUAL( result[msg->len + 1], '+' );
|
||||
|
||||
exit:
|
||||
mbedtls_ccm_free( &ctx );
|
||||
|
|
|
@ -8,60 +8,55 @@
|
|||
*/
|
||||
|
||||
/* BEGIN_CASE */
|
||||
void chacha20_crypt( char *hex_key_string,
|
||||
char *hex_nonce_string,
|
||||
void chacha20_crypt( data_t *key_str,
|
||||
data_t *nonce_str,
|
||||
int counter,
|
||||
char *hex_src_string,
|
||||
char *hex_dst_string )
|
||||
data_t *src_str,
|
||||
data_t *expected_output_str )
|
||||
{
|
||||
unsigned char key_str[32]; /* size set by the standard */
|
||||
unsigned char nonce_str[12]; /* size set by the standard */
|
||||
unsigned char src_str[375]; /* max size of binary input */
|
||||
unsigned char dst_str[751]; /* hex expansion of the above */
|
||||
unsigned char output[751];
|
||||
size_t key_len;
|
||||
size_t nonce_len;
|
||||
size_t src_len;
|
||||
size_t dst_len;
|
||||
unsigned char output[375];
|
||||
mbedtls_chacha20_context ctx;
|
||||
|
||||
memset( key_str, 0x00, sizeof( key_str ) );
|
||||
memset( nonce_str, 0x00, sizeof( nonce_str ) );
|
||||
memset( src_str, 0x00, sizeof( src_str ) );
|
||||
memset( dst_str, 0x00, sizeof( dst_str ) );
|
||||
memset( output, 0x00, sizeof( output ) );
|
||||
/*
|
||||
* Buffers to store the ASCII string representation of output and
|
||||
* expected_output_str.
|
||||
*/
|
||||
unsigned char output_string[751] = { '\0' };
|
||||
unsigned char expected_output_string[751] = { '\0' };
|
||||
|
||||
key_len = mbedtls_test_unhexify( key_str, hex_key_string );
|
||||
nonce_len = mbedtls_test_unhexify( nonce_str, hex_nonce_string );
|
||||
src_len = mbedtls_test_unhexify( src_str, hex_src_string );
|
||||
dst_len = mbedtls_test_unhexify( dst_str, hex_dst_string );
|
||||
memset( output, 0x00, sizeof( output ) );
|
||||
|
||||
TEST_ASSERT( src_len == dst_len );
|
||||
TEST_ASSERT( key_len == 32U );
|
||||
TEST_ASSERT( nonce_len == 12U );
|
||||
TEST_ASSERT( src_str->len == expected_output_str->len );
|
||||
TEST_ASSERT( key_str->len == 32U );
|
||||
TEST_ASSERT( nonce_str->len == 12U );
|
||||
|
||||
/*
|
||||
* Test the integrated API
|
||||
*/
|
||||
TEST_ASSERT( mbedtls_chacha20_crypt( key_str, nonce_str, counter, src_len, src_str, output ) == 0 );
|
||||
TEST_ASSERT( mbedtls_chacha20_crypt( key_str->x, nonce_str->x, counter, src_str->len, src_str->x, output ) == 0 );
|
||||
|
||||
mbedtls_test_hexify( dst_str, output, src_len );
|
||||
TEST_ASSERT( strcmp( (char*) dst_str, hex_dst_string ) == 0 );
|
||||
mbedtls_test_hexify( expected_output_string,
|
||||
expected_output_str->x,
|
||||
expected_output_str->len);
|
||||
mbedtls_test_hexify( output_string, output, src_str->len );
|
||||
TEST_ASSERT( strcmp( (char *)output_string,
|
||||
(char *)expected_output_string ) == 0 );
|
||||
|
||||
/*
|
||||
* Test the streaming API
|
||||
*/
|
||||
mbedtls_chacha20_init( &ctx );
|
||||
|
||||
TEST_ASSERT( mbedtls_chacha20_setkey( &ctx, key_str ) == 0 );
|
||||
TEST_ASSERT( mbedtls_chacha20_setkey( &ctx, key_str->x ) == 0 );
|
||||
|
||||
TEST_ASSERT( mbedtls_chacha20_starts( &ctx, nonce_str, counter ) == 0 );
|
||||
TEST_ASSERT( mbedtls_chacha20_starts( &ctx, nonce_str->x, counter ) == 0 );
|
||||
|
||||
memset( output, 0x00, sizeof( output ) );
|
||||
TEST_ASSERT( mbedtls_chacha20_update( &ctx, src_len, src_str, output ) == 0 );
|
||||
TEST_ASSERT( mbedtls_chacha20_update( &ctx, src_str->len, src_str->x, output ) == 0 );
|
||||
|
||||
mbedtls_test_hexify( dst_str, output, src_len );
|
||||
TEST_ASSERT( strcmp( (char*) dst_str, hex_dst_string ) == 0 );
|
||||
mbedtls_test_hexify( output_string, output, src_str->len );
|
||||
TEST_ASSERT( strcmp( (char *)output_string,
|
||||
(char *)expected_output_string ) == 0 );
|
||||
|
||||
/*
|
||||
* Test the streaming API again, piecewise
|
||||
|
@ -69,14 +64,16 @@ void chacha20_crypt( char *hex_key_string,
|
|||
|
||||
/* Don't free/init the context nor set the key again,
|
||||
* in order to test that starts() does the right thing. */
|
||||
TEST_ASSERT( mbedtls_chacha20_starts( &ctx, nonce_str, counter ) == 0 );
|
||||
TEST_ASSERT( mbedtls_chacha20_starts( &ctx, nonce_str->x, counter ) == 0 );
|
||||
|
||||
memset( output, 0x00, sizeof( output ) );
|
||||
TEST_ASSERT( mbedtls_chacha20_update( &ctx, 1, src_str, output ) == 0 );
|
||||
TEST_ASSERT( mbedtls_chacha20_update( &ctx, src_len - 1, src_str + 1, output + 1 ) == 0 );
|
||||
TEST_ASSERT( mbedtls_chacha20_update( &ctx, 1, src_str->x, output ) == 0 );
|
||||
TEST_ASSERT( mbedtls_chacha20_update( &ctx, src_str->len - 1,
|
||||
src_str->x + 1, output + 1 ) == 0 );
|
||||
|
||||
mbedtls_test_hexify( dst_str, output, src_len );
|
||||
TEST_ASSERT( strcmp( (char*) dst_str, hex_dst_string ) == 0 );
|
||||
mbedtls_test_hexify( output_string, output, src_str->len );
|
||||
TEST_ASSERT( strcmp( (char *)output_string,
|
||||
(char *)expected_output_string ) == 0 );
|
||||
|
||||
mbedtls_chacha20_free( &ctx );
|
||||
}
|
||||
|
|
|
@ -8,53 +8,27 @@
|
|||
*/
|
||||
|
||||
/* BEGIN_CASE */
|
||||
void mbedtls_chachapoly_enc( char *hex_key_string, char *hex_nonce_string, char *hex_aad_string, char *hex_input_string, char *hex_output_string, char *hex_mac_string )
|
||||
void mbedtls_chachapoly_enc( data_t *key_str, data_t *nonce_str, data_t *aad_str, data_t *input_str, data_t *output_str, data_t *mac_str )
|
||||
{
|
||||
unsigned char key_str[32]; /* size set by the standard */
|
||||
unsigned char nonce_str[12]; /* size set by the standard */
|
||||
unsigned char aad_str[12]; /* max size of test data so far */
|
||||
unsigned char input_str[265]; /* max size of binary input/output so far */
|
||||
unsigned char output_str[265];
|
||||
unsigned char output[265];
|
||||
unsigned char mac_str[16]; /* size set by the standard */
|
||||
unsigned char mac[16]; /* size set by the standard */
|
||||
size_t input_len;
|
||||
size_t output_len;
|
||||
size_t aad_len;
|
||||
size_t key_len;
|
||||
size_t nonce_len;
|
||||
size_t mac_len;
|
||||
mbedtls_chachapoly_context ctx;
|
||||
|
||||
memset( key_str, 0x00, sizeof( key_str ) );
|
||||
memset( nonce_str, 0x00, sizeof( nonce_str ) );
|
||||
memset( aad_str, 0x00, sizeof( aad_str ) );
|
||||
memset( input_str, 0x00, sizeof( input_str ) );
|
||||
memset( output_str, 0x00, sizeof( output_str ) );
|
||||
memset( mac_str, 0x00, sizeof( mac_str ) );
|
||||
|
||||
aad_len = mbedtls_test_unhexify( aad_str, hex_aad_string );
|
||||
input_len = mbedtls_test_unhexify( input_str, hex_input_string );
|
||||
output_len = mbedtls_test_unhexify( output_str, hex_output_string );
|
||||
key_len = mbedtls_test_unhexify( key_str, hex_key_string );
|
||||
nonce_len = mbedtls_test_unhexify( nonce_str, hex_nonce_string );
|
||||
mac_len = mbedtls_test_unhexify( mac_str, hex_mac_string );
|
||||
|
||||
TEST_ASSERT( key_len == 32 );
|
||||
TEST_ASSERT( nonce_len == 12 );
|
||||
TEST_ASSERT( mac_len == 16 );
|
||||
TEST_ASSERT( key_str->len == 32 );
|
||||
TEST_ASSERT( nonce_str->len == 12 );
|
||||
TEST_ASSERT( mac_str->len == 16 );
|
||||
|
||||
mbedtls_chachapoly_init( &ctx );
|
||||
|
||||
TEST_ASSERT( mbedtls_chachapoly_setkey( &ctx, key_str ) == 0 );
|
||||
TEST_ASSERT( mbedtls_chachapoly_setkey( &ctx, key_str->x ) == 0 );
|
||||
|
||||
TEST_ASSERT( mbedtls_chachapoly_encrypt_and_tag( &ctx,
|
||||
input_len, nonce_str,
|
||||
aad_str, aad_len,
|
||||
input_str, output, mac ) == 0 );
|
||||
input_str->len, nonce_str->x,
|
||||
aad_str->x, aad_str->len,
|
||||
input_str->x, output, mac ) == 0 );
|
||||
|
||||
TEST_ASSERT( memcmp( output_str, output, output_len ) == 0 );
|
||||
TEST_ASSERT( memcmp( mac_str, mac, 16U ) == 0 );
|
||||
TEST_ASSERT( memcmp( output_str->x, output, output_str->len ) == 0 );
|
||||
TEST_ASSERT( memcmp( mac_str->x, mac, 16U ) == 0 );
|
||||
|
||||
exit:
|
||||
mbedtls_chachapoly_free( &ctx );
|
||||
|
@ -62,55 +36,29 @@ exit:
|
|||
/* END_CASE */
|
||||
|
||||
/* BEGIN_CASE */
|
||||
void mbedtls_chachapoly_dec( char *hex_key_string, char *hex_nonce_string, char *hex_aad_string, char *hex_input_string, char *hex_output_string, char *hex_mac_string, int ret_exp )
|
||||
void mbedtls_chachapoly_dec( data_t *key_str, data_t *nonce_str, data_t *aad_str, data_t *input_str, data_t *output_str, data_t *mac_str, int ret_exp )
|
||||
{
|
||||
unsigned char key_str[32]; /* size set by the standard */
|
||||
unsigned char nonce_str[12]; /* size set by the standard */
|
||||
unsigned char aad_str[12]; /* max size of test data so far */
|
||||
unsigned char input_str[265]; /* max size of binary input/output so far */
|
||||
unsigned char output_str[265];
|
||||
unsigned char output[265];
|
||||
unsigned char mac_str[16]; /* size set by the standard */
|
||||
size_t input_len;
|
||||
size_t output_len;
|
||||
size_t aad_len;
|
||||
size_t key_len;
|
||||
size_t nonce_len;
|
||||
size_t mac_len;
|
||||
int ret;
|
||||
mbedtls_chachapoly_context ctx;
|
||||
|
||||
memset( key_str, 0x00, sizeof( key_str ) );
|
||||
memset( nonce_str, 0x00, sizeof( nonce_str ) );
|
||||
memset( aad_str, 0x00, sizeof( aad_str ) );
|
||||
memset( input_str, 0x00, sizeof( input_str ) );
|
||||
memset( output_str, 0x00, sizeof( output_str ) );
|
||||
memset( mac_str, 0x00, sizeof( mac_str ) );
|
||||
|
||||
aad_len = mbedtls_test_unhexify( aad_str, hex_aad_string );
|
||||
input_len = mbedtls_test_unhexify( input_str, hex_input_string );
|
||||
output_len = mbedtls_test_unhexify( output_str, hex_output_string );
|
||||
key_len = mbedtls_test_unhexify( key_str, hex_key_string );
|
||||
nonce_len = mbedtls_test_unhexify( nonce_str, hex_nonce_string );
|
||||
mac_len = mbedtls_test_unhexify( mac_str, hex_mac_string );
|
||||
|
||||
TEST_ASSERT( key_len == 32 );
|
||||
TEST_ASSERT( nonce_len == 12 );
|
||||
TEST_ASSERT( mac_len == 16 );
|
||||
TEST_ASSERT( key_str->len == 32 );
|
||||
TEST_ASSERT( nonce_str->len == 12 );
|
||||
TEST_ASSERT( mac_str->len == 16 );
|
||||
|
||||
mbedtls_chachapoly_init( &ctx );
|
||||
|
||||
TEST_ASSERT( mbedtls_chachapoly_setkey( &ctx, key_str ) == 0 );
|
||||
TEST_ASSERT( mbedtls_chachapoly_setkey( &ctx, key_str->x ) == 0 );
|
||||
|
||||
ret = mbedtls_chachapoly_auth_decrypt( &ctx,
|
||||
input_len, nonce_str,
|
||||
aad_str, aad_len,
|
||||
mac_str, input_str, output );
|
||||
input_str->len, nonce_str->x,
|
||||
aad_str->x, aad_str->len,
|
||||
mac_str->x, input_str->x, output );
|
||||
|
||||
TEST_ASSERT( ret == ret_exp );
|
||||
if( ret_exp == 0 )
|
||||
{
|
||||
TEST_ASSERT( memcmp( output_str, output, output_len ) == 0 );
|
||||
TEST_ASSERT( memcmp( output_str->x, output, output_str->len ) == 0 );
|
||||
}
|
||||
|
||||
exit:
|
||||
|
|
|
@ -1125,26 +1125,17 @@ exit:
|
|||
/* END_CASE */
|
||||
|
||||
/* BEGIN_CASE depends_on:MBEDTLS_CIPHER_MODE_WITH_PADDING */
|
||||
void test_vec_crypt( int cipher_id, int operation, char *hex_key,
|
||||
char *hex_iv, char *hex_input, char *hex_result,
|
||||
void test_vec_crypt( int cipher_id, int operation, data_t *key,
|
||||
data_t *iv, data_t *input, data_t *result,
|
||||
int finish_result, int use_psa )
|
||||
{
|
||||
unsigned char key[50];
|
||||
unsigned char input[16];
|
||||
unsigned char result[16];
|
||||
unsigned char iv[16];
|
||||
size_t key_len, iv_len, inputlen, resultlen;
|
||||
mbedtls_cipher_context_t ctx;
|
||||
unsigned char output[32];
|
||||
size_t outlen;
|
||||
|
||||
mbedtls_cipher_init( &ctx );
|
||||
|
||||
memset( key, 0x00, sizeof( key ) );
|
||||
memset( input, 0x00, sizeof( input ) );
|
||||
memset( result, 0x00, sizeof( result ) );
|
||||
memset( output, 0x00, sizeof( output ) );
|
||||
memset( iv, 0x00, sizeof( iv ) );
|
||||
|
||||
/* Prepare context */
|
||||
#if !defined(MBEDTLS_USE_PSA_CRYPTO)
|
||||
|
@ -1161,23 +1152,17 @@ void test_vec_crypt( int cipher_id, int operation, char *hex_key,
|
|||
TEST_ASSERT( 0 == mbedtls_cipher_setup( &ctx,
|
||||
mbedtls_cipher_info_from_type( cipher_id ) ) );
|
||||
|
||||
key_len = mbedtls_test_unhexify( key, hex_key );
|
||||
inputlen = mbedtls_test_unhexify( input, hex_input );
|
||||
resultlen = mbedtls_test_unhexify( result, hex_result );
|
||||
|
||||
TEST_ASSERT( 0 == mbedtls_cipher_setkey( &ctx, key, 8 * key_len, operation ) );
|
||||
TEST_ASSERT( 0 == mbedtls_cipher_setkey( &ctx, key->x, 8 * key->len, operation ) );
|
||||
if( MBEDTLS_MODE_CBC == ctx.cipher_info->mode )
|
||||
TEST_ASSERT( 0 == mbedtls_cipher_set_padding_mode( &ctx, MBEDTLS_PADDING_NONE ) );
|
||||
|
||||
iv_len = mbedtls_test_unhexify( iv, hex_iv );
|
||||
|
||||
TEST_ASSERT( finish_result == mbedtls_cipher_crypt( &ctx, iv_len ? iv : NULL,
|
||||
iv_len, input, inputlen,
|
||||
TEST_ASSERT( finish_result == mbedtls_cipher_crypt( &ctx, iv->len ? iv->x : NULL,
|
||||
iv->len, input->x, input->len,
|
||||
output, &outlen ) );
|
||||
TEST_ASSERT( resultlen == outlen );
|
||||
TEST_ASSERT( result->len == outlen );
|
||||
/* check plaintext only if everything went fine */
|
||||
if( 0 == finish_result )
|
||||
TEST_ASSERT( 0 == memcmp( output, result, outlen ) );
|
||||
TEST_ASSERT( 0 == memcmp( output, result->x, outlen ) );
|
||||
|
||||
exit:
|
||||
mbedtls_cipher_free( &ctx );
|
||||
|
|
|
@ -346,7 +346,7 @@ exit:
|
|||
/* END_CASE */
|
||||
|
||||
/* BEGIN_CASE depends_on:MBEDTLS_ECP_RESTARTABLE */
|
||||
void ecdh_restart( int id, char *dA_str, char *dB_str, char *z_str,
|
||||
void ecdh_restart( int id, data_t *dA, data_t *dB, data_t *z,
|
||||
int enable, int max_ops, int min_restart, int max_restart )
|
||||
{
|
||||
int ret;
|
||||
|
@ -354,10 +354,6 @@ void ecdh_restart( int id, char *dA_str, char *dB_str, char *z_str,
|
|||
unsigned char buf[1000];
|
||||
const unsigned char *vbuf;
|
||||
size_t len;
|
||||
unsigned char z[MBEDTLS_ECP_MAX_BYTES];
|
||||
size_t z_len;
|
||||
unsigned char rnd_buf_A[MBEDTLS_ECP_MAX_BYTES];
|
||||
unsigned char rnd_buf_B[MBEDTLS_ECP_MAX_BYTES];
|
||||
mbedtls_test_rnd_buf_info rnd_info_A, rnd_info_B;
|
||||
int cnt_restart;
|
||||
mbedtls_ecp_group grp;
|
||||
|
@ -366,13 +362,11 @@ void ecdh_restart( int id, char *dA_str, char *dB_str, char *z_str,
|
|||
mbedtls_ecdh_init( &srv );
|
||||
mbedtls_ecdh_init( &cli );
|
||||
|
||||
z_len = mbedtls_test_unhexify( z, z_str );
|
||||
rnd_info_A.buf = dA->x;
|
||||
rnd_info_A.length = dA->len;
|
||||
|
||||
rnd_info_A.buf = rnd_buf_A;
|
||||
rnd_info_A.length = mbedtls_test_unhexify( rnd_buf_A, dA_str );
|
||||
|
||||
rnd_info_B.buf = rnd_buf_B;
|
||||
rnd_info_B.length = mbedtls_test_unhexify( rnd_buf_B, dB_str );
|
||||
rnd_info_B.buf = dB->x;
|
||||
rnd_info_B.length = dB->len;
|
||||
|
||||
/* The ECDH context is not guaranteed ot have an mbedtls_ecp_group structure
|
||||
* in every configuration, therefore we load it separately. */
|
||||
|
@ -444,8 +438,8 @@ void ecdh_restart( int id, char *dA_str, char *dB_str, char *z_str,
|
|||
TEST_ASSERT( cnt_restart >= min_restart );
|
||||
TEST_ASSERT( cnt_restart <= max_restart );
|
||||
|
||||
TEST_ASSERT( len == z_len );
|
||||
TEST_ASSERT( memcmp( buf, z, len ) == 0 );
|
||||
TEST_ASSERT( len == z->len );
|
||||
TEST_ASSERT( memcmp( buf, z->x, len ) == 0 );
|
||||
|
||||
/* client computes shared secret */
|
||||
memset( buf, 0, sizeof( buf ) );
|
||||
|
@ -461,8 +455,8 @@ void ecdh_restart( int id, char *dA_str, char *dB_str, char *z_str,
|
|||
TEST_ASSERT( cnt_restart >= min_restart );
|
||||
TEST_ASSERT( cnt_restart <= max_restart );
|
||||
|
||||
TEST_ASSERT( len == z_len );
|
||||
TEST_ASSERT( memcmp( buf, z, len ) == 0 );
|
||||
TEST_ASSERT( len == z->len );
|
||||
TEST_ASSERT( memcmp( buf, z->x, len ) == 0 );
|
||||
|
||||
exit:
|
||||
mbedtls_ecp_group_free( &grp );
|
||||
|
|
|
@ -411,33 +411,26 @@ exit:
|
|||
/* END_CASE */
|
||||
|
||||
/* BEGIN_CASE depends_on:MBEDTLS_ECP_RESTARTABLE */
|
||||
void ecdsa_read_restart( int id, char *k_str, char *h_str, char *s_str,
|
||||
void ecdsa_read_restart( int id, data_t *pk, data_t *hash, data_t *sig,
|
||||
int max_ops, int min_restart, int max_restart )
|
||||
{
|
||||
mbedtls_ecdsa_context ctx;
|
||||
mbedtls_ecdsa_restart_ctx rs_ctx;
|
||||
unsigned char hash[64];
|
||||
unsigned char sig[200];
|
||||
unsigned char pk[65];
|
||||
size_t sig_len, hash_len, pk_len;
|
||||
int ret, cnt_restart;
|
||||
|
||||
mbedtls_ecdsa_init( &ctx );
|
||||
mbedtls_ecdsa_restart_init( &rs_ctx );
|
||||
|
||||
hash_len = mbedtls_test_unhexify(hash, h_str);
|
||||
sig_len = mbedtls_test_unhexify(sig, s_str);
|
||||
pk_len = mbedtls_test_unhexify(pk, k_str);
|
||||
|
||||
TEST_ASSERT( mbedtls_ecp_group_load( &ctx.grp, id ) == 0 );
|
||||
TEST_ASSERT( mbedtls_ecp_point_read_binary( &ctx.grp, &ctx.Q, pk, pk_len ) == 0 );
|
||||
TEST_ASSERT( mbedtls_ecp_point_read_binary( &ctx.grp, &ctx.Q,
|
||||
pk->x, pk->len ) == 0 );
|
||||
|
||||
mbedtls_ecp_set_max_ops( max_ops );
|
||||
|
||||
cnt_restart = 0;
|
||||
do {
|
||||
ret = mbedtls_ecdsa_read_signature_restartable( &ctx,
|
||||
hash, hash_len, sig, sig_len, &rs_ctx );
|
||||
hash->x, hash->len, sig->x, sig->len, &rs_ctx );
|
||||
} while( ret == MBEDTLS_ERR_ECP_IN_PROGRESS && ++cnt_restart );
|
||||
|
||||
TEST_ASSERT( ret == 0 );
|
||||
|
@ -445,29 +438,31 @@ void ecdsa_read_restart( int id, char *k_str, char *h_str, char *s_str,
|
|||
TEST_ASSERT( cnt_restart <= max_restart );
|
||||
|
||||
/* try modifying r */
|
||||
sig[10]++;
|
||||
|
||||
TEST_ASSERT( sig->len > 10 );
|
||||
sig->x[10]++;
|
||||
do {
|
||||
ret = mbedtls_ecdsa_read_signature_restartable( &ctx,
|
||||
hash, hash_len, sig, sig_len, &rs_ctx );
|
||||
hash->x, hash->len, sig->x, sig->len, &rs_ctx );
|
||||
} while( ret == MBEDTLS_ERR_ECP_IN_PROGRESS );
|
||||
TEST_ASSERT( ret == MBEDTLS_ERR_ECP_VERIFY_FAILED );
|
||||
sig[10]--;
|
||||
sig->x[10]--;
|
||||
|
||||
/* try modifying s */
|
||||
sig[sig_len - 1]++;
|
||||
sig->x[sig->len - 1]++;
|
||||
do {
|
||||
ret = mbedtls_ecdsa_read_signature_restartable( &ctx,
|
||||
hash, hash_len, sig, sig_len, &rs_ctx );
|
||||
hash->x, hash->len, sig->x, sig->len, &rs_ctx );
|
||||
} while( ret == MBEDTLS_ERR_ECP_IN_PROGRESS );
|
||||
TEST_ASSERT( ret == MBEDTLS_ERR_ECP_VERIFY_FAILED );
|
||||
sig[sig_len - 1]--;
|
||||
sig->x[sig->len - 1]--;
|
||||
|
||||
/* Do we leak memory when aborting an operation?
|
||||
* This test only makes sense when we actually restart */
|
||||
if( min_restart > 0 )
|
||||
{
|
||||
ret = mbedtls_ecdsa_read_signature_restartable( &ctx,
|
||||
hash, hash_len, sig, sig_len, &rs_ctx );
|
||||
hash->x, hash->len, sig->x, sig->len, &rs_ctx );
|
||||
TEST_ASSERT( ret == MBEDTLS_ERR_ECP_IN_PROGRESS );
|
||||
}
|
||||
|
||||
|
@ -479,7 +474,7 @@ exit:
|
|||
|
||||
/* BEGIN_CASE depends_on:MBEDTLS_ECP_RESTARTABLE:MBEDTLS_ECDSA_DETERMINISTIC */
|
||||
void ecdsa_write_restart( int id, char *d_str, int md_alg,
|
||||
char *msg, char *sig_str,
|
||||
char *msg, data_t *sig_check,
|
||||
int max_ops, int min_restart, int max_restart )
|
||||
{
|
||||
int ret, cnt_restart;
|
||||
|
@ -487,19 +482,16 @@ void ecdsa_write_restart( int id, char *d_str, int md_alg,
|
|||
mbedtls_ecdsa_context ctx;
|
||||
unsigned char hash[MBEDTLS_MD_MAX_SIZE];
|
||||
unsigned char sig[MBEDTLS_ECDSA_MAX_LEN];
|
||||
unsigned char sig_check[MBEDTLS_ECDSA_MAX_LEN];
|
||||
size_t hlen, slen, slen_check;
|
||||
size_t hlen, slen;
|
||||
const mbedtls_md_info_t *md_info;
|
||||
|
||||
mbedtls_ecdsa_restart_init( &rs_ctx );
|
||||
mbedtls_ecdsa_init( &ctx );
|
||||
memset( hash, 0, sizeof( hash ) );
|
||||
memset( sig, 0, sizeof( sig ) );
|
||||
memset( sig_check, 0, sizeof( sig_check ) );
|
||||
|
||||
TEST_ASSERT( mbedtls_ecp_group_load( &ctx.grp, id ) == 0 );
|
||||
TEST_ASSERT( mbedtls_mpi_read_string( &ctx.d, 16, d_str ) == 0 );
|
||||
slen_check = mbedtls_test_unhexify( sig_check, sig_str );
|
||||
|
||||
md_info = mbedtls_md_info_from_type( md_alg );
|
||||
TEST_ASSERT( md_info != NULL );
|
||||
|
@ -519,8 +511,8 @@ void ecdsa_write_restart( int id, char *d_str, int md_alg,
|
|||
} while( ret == MBEDTLS_ERR_ECP_IN_PROGRESS && ++cnt_restart );
|
||||
|
||||
TEST_ASSERT( ret == 0 );
|
||||
TEST_ASSERT( slen == slen_check );
|
||||
TEST_ASSERT( memcmp( sig, sig_check, slen ) == 0 );
|
||||
TEST_ASSERT( slen == sig_check->len );
|
||||
TEST_ASSERT( memcmp( sig, sig_check->x, slen ) == 0 );
|
||||
|
||||
TEST_ASSERT( cnt_restart >= min_restart );
|
||||
TEST_ASSERT( cnt_restart <= max_restart );
|
||||
|
|
|
@ -9,40 +9,36 @@
|
|||
*/
|
||||
|
||||
/* BEGIN_CASE */
|
||||
void test_hkdf( int md_alg, char *hex_ikm_string, char *hex_salt_string,
|
||||
char *hex_info_string, char *hex_okm_string )
|
||||
void test_hkdf( int md_alg, data_t *ikm, data_t *salt, data_t *info,
|
||||
data_t *expected_okm )
|
||||
{
|
||||
int ret;
|
||||
size_t ikm_len, salt_len, info_len, okm_len;
|
||||
unsigned char ikm[128] = { '\0' };
|
||||
unsigned char salt[128] = { '\0' };
|
||||
unsigned char info[128] = { '\0' };
|
||||
unsigned char expected_okm[128] = { '\0' };
|
||||
unsigned char okm[128] = { '\0' };
|
||||
/*
|
||||
* okm_hex is the string representation of okm,
|
||||
* so its size is twice the size of okm, and an extra null-termination.
|
||||
* okm_string and expected_okm_string are the ASCII string representations
|
||||
* of km and expected_okm, so their size should be twice the size of
|
||||
* okm and expected_okm, and an extra null-termination.
|
||||
*/
|
||||
unsigned char okm_hex[257] = { '\0' };
|
||||
unsigned char okm_string[257] = { '\0' };
|
||||
unsigned char expected_okm_string[257] = { '\0' };
|
||||
|
||||
const mbedtls_md_info_t *md = mbedtls_md_info_from_type( md_alg );
|
||||
TEST_ASSERT( md != NULL );
|
||||
|
||||
ikm_len = mbedtls_test_unhexify( ikm, hex_ikm_string );
|
||||
salt_len = mbedtls_test_unhexify( salt, hex_salt_string );
|
||||
info_len = mbedtls_test_unhexify( info, hex_info_string );
|
||||
okm_len = mbedtls_test_unhexify( expected_okm, hex_okm_string );
|
||||
TEST_ASSERT( expected_okm->len <= sizeof( okm ) );
|
||||
|
||||
ret = mbedtls_hkdf( md, salt, salt_len, ikm, ikm_len, info, info_len, okm,
|
||||
okm_len);
|
||||
ret = mbedtls_hkdf( md, salt->x, salt->len, ikm->x, ikm->len,
|
||||
info->x, info->len, okm, expected_okm->len );
|
||||
TEST_ASSERT( ret == 0 );
|
||||
|
||||
/*
|
||||
* Run mbedtls_test_hexify on it so that it looks nicer if the assertion
|
||||
* fails.
|
||||
* Run mbedtls_test_hexify on okm and expected_okm so that it looks nicer
|
||||
* if the assertion fails.
|
||||
*/
|
||||
mbedtls_test_hexify( okm_hex, okm, okm_len );
|
||||
TEST_ASSERT( !strcmp( (char *)okm_hex, hex_okm_string ) );
|
||||
mbedtls_test_hexify( okm_string, okm, expected_okm->len );
|
||||
mbedtls_test_hexify( expected_okm_string,
|
||||
expected_okm->x, expected_okm->len );
|
||||
TEST_ASSERT( !strcmp( (char *)okm_string, (char *)expected_okm_string ) );
|
||||
}
|
||||
/* END_CASE */
|
||||
|
||||
|
|
|
@ -242,42 +242,31 @@ exit:
|
|||
/* END_CASE */
|
||||
|
||||
/* BEGIN_CASE */
|
||||
void mbedtls_nist_kw_wrap( int cipher_id, int mode,
|
||||
char *key_hex, char *msg_hex,
|
||||
char *result_hex )
|
||||
void mbedtls_nist_kw_wrap( int cipher_id, int mode, data_t *key, data_t *msg,
|
||||
data_t *expected_result )
|
||||
{
|
||||
unsigned char key[32];
|
||||
unsigned char msg[512];
|
||||
unsigned char result[528];
|
||||
unsigned char expected_result[528];
|
||||
mbedtls_nist_kw_context ctx;
|
||||
size_t key_len, msg_len, output_len, result_len, i, padlen;
|
||||
size_t result_len, i, padlen;
|
||||
|
||||
mbedtls_nist_kw_init( &ctx );
|
||||
|
||||
memset( key, 0x00, sizeof( key ) );
|
||||
memset( msg, 0x00, sizeof( msg ) );
|
||||
memset( result, '+', sizeof( result ) );
|
||||
|
||||
key_len = mbedtls_test_unhexify( key, key_hex );
|
||||
msg_len = mbedtls_test_unhexify( msg, msg_hex );
|
||||
result_len = mbedtls_test_unhexify( expected_result, result_hex );
|
||||
output_len = sizeof( result );
|
||||
|
||||
TEST_ASSERT( mbedtls_nist_kw_setkey( &ctx, cipher_id, key, key_len * 8, 1 )
|
||||
== 0 );
|
||||
TEST_ASSERT( mbedtls_nist_kw_setkey( &ctx, cipher_id,
|
||||
key->x, key->len * 8, 1 ) == 0 );
|
||||
|
||||
/* Test with input == output */
|
||||
TEST_ASSERT( mbedtls_nist_kw_wrap( &ctx, mode, msg, msg_len,
|
||||
result, &output_len, sizeof( result ) ) == 0 );
|
||||
TEST_ASSERT( mbedtls_nist_kw_wrap( &ctx, mode, msg->x, msg->len,
|
||||
result, &result_len, sizeof( result ) ) == 0 );
|
||||
|
||||
TEST_ASSERT( output_len == result_len );
|
||||
TEST_ASSERT( result_len == expected_result->len );
|
||||
|
||||
TEST_ASSERT( memcmp( expected_result, result, result_len ) == 0 );
|
||||
TEST_ASSERT( memcmp( expected_result->x, result, result_len ) == 0 );
|
||||
|
||||
padlen = ( msg_len % 8 != 0 ) ? 8 - (msg_len % 8 ) : 0;
|
||||
padlen = ( msg->len % 8 != 0 ) ? 8 - (msg->len % 8 ) : 0;
|
||||
/* Check that the function didn't write beyond the end of the buffer. */
|
||||
for( i = msg_len + 8 + padlen; i < sizeof( result ); i++ )
|
||||
for( i = msg->len + 8 + padlen; i < sizeof( result ); i++ )
|
||||
{
|
||||
TEST_ASSERT( result[i] == '+' );
|
||||
}
|
||||
|
@ -288,47 +277,35 @@ exit:
|
|||
/* END_CASE */
|
||||
|
||||
/* BEGIN_CASE */
|
||||
void mbedtls_nist_kw_unwrap( int cipher_id, int mode,
|
||||
char *key_hex, char *msg_hex,
|
||||
char *result_hex, int expected_ret )
|
||||
void mbedtls_nist_kw_unwrap( int cipher_id, int mode, data_t *key, data_t *msg,
|
||||
data_t *expected_result, int expected_ret )
|
||||
{
|
||||
unsigned char key[32];
|
||||
unsigned char msg[528];
|
||||
unsigned char result[528];
|
||||
unsigned char expected_result[528];
|
||||
mbedtls_nist_kw_context ctx;
|
||||
size_t key_len, msg_len, output_len, result_len, i;
|
||||
size_t result_len, i;
|
||||
|
||||
mbedtls_nist_kw_init( &ctx );
|
||||
|
||||
memset( key, 0x00, sizeof( key ) );
|
||||
memset( msg, 0x00, sizeof( msg ) );
|
||||
memset( result, '+', sizeof( result ) );
|
||||
memset( expected_result, 0x00, sizeof( expected_result ) );
|
||||
|
||||
key_len = mbedtls_test_unhexify( key, key_hex );
|
||||
msg_len = mbedtls_test_unhexify( msg, msg_hex );
|
||||
result_len = mbedtls_test_unhexify( expected_result, result_hex );
|
||||
output_len = sizeof( result );
|
||||
|
||||
TEST_ASSERT( mbedtls_nist_kw_setkey( &ctx, cipher_id, key, key_len * 8, 0 )
|
||||
== 0 );
|
||||
TEST_ASSERT( mbedtls_nist_kw_setkey( &ctx, cipher_id,
|
||||
key->x, key->len * 8, 0 ) == 0 );
|
||||
|
||||
/* Test with input == output */
|
||||
TEST_ASSERT( mbedtls_nist_kw_unwrap( &ctx, mode, msg, msg_len,
|
||||
result, &output_len, sizeof( result ) ) == expected_ret );
|
||||
TEST_ASSERT( mbedtls_nist_kw_unwrap( &ctx, mode, msg->x, msg->len,
|
||||
result, &result_len, sizeof( result ) ) == expected_ret );
|
||||
if( expected_ret == 0 )
|
||||
{
|
||||
TEST_ASSERT( output_len == result_len );
|
||||
TEST_ASSERT( memcmp( expected_result, result, result_len ) == 0 );
|
||||
TEST_ASSERT( result_len == expected_result->len );
|
||||
TEST_ASSERT( memcmp( expected_result->x, result, result_len ) == 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
TEST_ASSERT( output_len == 0 );
|
||||
TEST_ASSERT( result_len == 0 );
|
||||
}
|
||||
|
||||
/* Check that the function didn't write beyond the end of the buffer. */
|
||||
for( i = msg_len - 8; i < sizeof( result ); i++ )
|
||||
for( i = msg->len - 8; i < sizeof( result ); i++ )
|
||||
{
|
||||
TEST_ASSERT( result[i] == '+' );
|
||||
}
|
||||
|
|
|
@ -788,7 +788,7 @@ exit:
|
|||
/* BEGIN_CASE depends_on:MBEDTLS_ECP_RESTARTABLE:MBEDTLS_ECDSA_C:MBEDTLS_ECDSA_DETERMINISTIC */
|
||||
void pk_sign_verify_restart( int pk_type, int grp_id, char *d_str,
|
||||
char *QX_str, char *QY_str,
|
||||
int md_alg, char *msg, char *sig_str,
|
||||
int md_alg, char *msg, data_t *sig_check,
|
||||
int max_ops, int min_restart, int max_restart )
|
||||
{
|
||||
int ret, cnt_restart;
|
||||
|
@ -796,8 +796,7 @@ void pk_sign_verify_restart( int pk_type, int grp_id, char *d_str,
|
|||
mbedtls_pk_context prv, pub;
|
||||
unsigned char hash[MBEDTLS_MD_MAX_SIZE];
|
||||
unsigned char sig[MBEDTLS_ECDSA_MAX_LEN];
|
||||
unsigned char sig_check[MBEDTLS_ECDSA_MAX_LEN];
|
||||
size_t hlen, slen, slen_check;
|
||||
size_t hlen, slen;
|
||||
const mbedtls_md_info_t *md_info;
|
||||
|
||||
mbedtls_pk_restart_init( &rs_ctx );
|
||||
|
@ -805,7 +804,6 @@ void pk_sign_verify_restart( int pk_type, int grp_id, char *d_str,
|
|||
mbedtls_pk_init( &pub );
|
||||
memset( hash, 0, sizeof( hash ) );
|
||||
memset( sig, 0, sizeof( sig ) );
|
||||
memset( sig_check, 0, sizeof( sig_check ) );
|
||||
|
||||
TEST_ASSERT( mbedtls_pk_setup( &prv, mbedtls_pk_info_from_type( pk_type ) ) == 0 );
|
||||
TEST_ASSERT( mbedtls_ecp_group_load( &mbedtls_pk_ec( prv )->grp, grp_id ) == 0 );
|
||||
|
@ -815,8 +813,6 @@ void pk_sign_verify_restart( int pk_type, int grp_id, char *d_str,
|
|||
TEST_ASSERT( mbedtls_ecp_group_load( &mbedtls_pk_ec( pub )->grp, grp_id ) == 0 );
|
||||
TEST_ASSERT( mbedtls_ecp_point_read_string( &mbedtls_pk_ec( pub )->Q, 16, QX_str, QY_str ) == 0 );
|
||||
|
||||
slen_check = mbedtls_test_unhexify( sig_check, sig_str );
|
||||
|
||||
md_info = mbedtls_md_info_from_type( md_alg );
|
||||
TEST_ASSERT( md_info != NULL );
|
||||
|
||||
|
@ -835,8 +831,8 @@ void pk_sign_verify_restart( int pk_type, int grp_id, char *d_str,
|
|||
} while( ret == MBEDTLS_ERR_ECP_IN_PROGRESS && ++cnt_restart );
|
||||
|
||||
TEST_ASSERT( ret == 0 );
|
||||
TEST_ASSERT( slen == slen_check );
|
||||
TEST_ASSERT( memcmp( sig, sig_check, slen ) == 0 );
|
||||
TEST_ASSERT( slen == sig_check->len );
|
||||
TEST_ASSERT( memcmp( sig, sig_check->x, slen ) == 0 );
|
||||
|
||||
TEST_ASSERT( cnt_restart >= min_restart );
|
||||
TEST_ASSERT( cnt_restart <= max_restart );
|
||||
|
|
|
@ -9,27 +9,20 @@
|
|||
*/
|
||||
|
||||
/* BEGIN_CASE */
|
||||
void mbedtls_poly1305( char *hex_key_string, char *hex_mac_string, char *hex_src_string )
|
||||
void mbedtls_poly1305( data_t *key, char *hex_mac_string, data_t *src_str )
|
||||
{
|
||||
unsigned char src_str[375]; /* max size of binary input */
|
||||
unsigned char key[32]; /* size set by the standard */
|
||||
unsigned char mac[16]; /* size set by the standard */
|
||||
unsigned char mac_str[33]; /* hex expansion of the above */
|
||||
size_t src_len;
|
||||
mbedtls_poly1305_context ctx;
|
||||
|
||||
memset( src_str, 0x00, sizeof( src_str ) );
|
||||
memset( mac_str, 0x00, sizeof( mac_str ) );
|
||||
memset( key, 0x00, sizeof( key ) );
|
||||
memset( mac, 0x00, sizeof( mac ) );
|
||||
|
||||
src_len = mbedtls_test_unhexify( src_str, hex_src_string );
|
||||
mbedtls_test_unhexify( key, hex_key_string );
|
||||
|
||||
/*
|
||||
* Test the integrated API
|
||||
*/
|
||||
TEST_ASSERT( mbedtls_poly1305_mac( key, src_str, src_len, mac ) == 0 );
|
||||
TEST_ASSERT( mbedtls_poly1305_mac( key->x, src_str->x,
|
||||
src_str->len, mac ) == 0 );
|
||||
|
||||
mbedtls_test_hexify( mac_str, mac, 16 );
|
||||
TEST_ASSERT( strcmp( (char *) mac_str, hex_mac_string ) == 0 );
|
||||
|
@ -39,9 +32,9 @@ void mbedtls_poly1305( char *hex_key_string, char *hex_mac_string, char *hex_src
|
|||
*/
|
||||
mbedtls_poly1305_init( &ctx );
|
||||
|
||||
TEST_ASSERT( mbedtls_poly1305_starts( &ctx, key ) == 0 );
|
||||
TEST_ASSERT( mbedtls_poly1305_starts( &ctx, key->x ) == 0 );
|
||||
|
||||
TEST_ASSERT( mbedtls_poly1305_update( &ctx, src_str, src_len ) == 0 );
|
||||
TEST_ASSERT( mbedtls_poly1305_update( &ctx, src_str->x, src_str->len ) == 0 );
|
||||
|
||||
TEST_ASSERT( mbedtls_poly1305_finish( &ctx, mac ) == 0 );
|
||||
|
||||
|
@ -54,12 +47,12 @@ void mbedtls_poly1305( char *hex_key_string, char *hex_mac_string, char *hex_src
|
|||
|
||||
/* Don't free/init the context, in order to test that starts() does the
|
||||
* right thing. */
|
||||
if( src_len >= 1 )
|
||||
if( src_str->len >= 1 )
|
||||
{
|
||||
TEST_ASSERT( mbedtls_poly1305_starts( &ctx, key ) == 0 );
|
||||
TEST_ASSERT( mbedtls_poly1305_starts( &ctx, key->x ) == 0 );
|
||||
|
||||
TEST_ASSERT( mbedtls_poly1305_update( &ctx, src_str, 1 ) == 0 );
|
||||
TEST_ASSERT( mbedtls_poly1305_update( &ctx, src_str + 1, src_len - 1 ) == 0 );
|
||||
TEST_ASSERT( mbedtls_poly1305_update( &ctx, src_str->x, 1 ) == 0 );
|
||||
TEST_ASSERT( mbedtls_poly1305_update( &ctx, src_str->x + 1, src_str->len - 1 ) == 0 );
|
||||
|
||||
TEST_ASSERT( mbedtls_poly1305_finish( &ctx, mac ) == 0 );
|
||||
|
||||
|
@ -70,13 +63,13 @@ void mbedtls_poly1305( char *hex_key_string, char *hex_mac_string, char *hex_src
|
|||
/*
|
||||
* Again with more pieces
|
||||
*/
|
||||
if( src_len >= 2 )
|
||||
if( src_str->len >= 2 )
|
||||
{
|
||||
TEST_ASSERT( mbedtls_poly1305_starts( &ctx, key ) == 0 );
|
||||
TEST_ASSERT( mbedtls_poly1305_starts( &ctx, key->x ) == 0 );
|
||||
|
||||
TEST_ASSERT( mbedtls_poly1305_update( &ctx, src_str, 1 ) == 0 );
|
||||
TEST_ASSERT( mbedtls_poly1305_update( &ctx, src_str + 1, 1 ) == 0 );
|
||||
TEST_ASSERT( mbedtls_poly1305_update( &ctx, src_str + 2, src_len - 2 ) == 0 );
|
||||
TEST_ASSERT( mbedtls_poly1305_update( &ctx, src_str->x, 1 ) == 0 );
|
||||
TEST_ASSERT( mbedtls_poly1305_update( &ctx, src_str->x + 1, 1 ) == 0 );
|
||||
TEST_ASSERT( mbedtls_poly1305_update( &ctx, src_str->x + 2, src_str->len - 2 ) == 0 );
|
||||
|
||||
TEST_ASSERT( mbedtls_poly1305_finish( &ctx, mac ) == 0 );
|
||||
|
||||
|
|
|
@ -24,17 +24,29 @@ register_twice:3
|
|||
Register SE driver: maximum number of drivers
|
||||
register_max:
|
||||
|
||||
SE key import-export (p_allocate allows all slots)
|
||||
key_creation_import_export:0:0
|
||||
SE key import-export persistent (p_allocate allows all slots)
|
||||
key_creation_import_export:TEST_SE_PERSISTENT_LIFETIME:0:0
|
||||
|
||||
SE key import-export (p_allocate allows 1 slot)
|
||||
key_creation_import_export:ARRAY_LENGTH( ram_slots ) - 1:0
|
||||
SE key import-export persistent (p_allocate allows 1 slot)
|
||||
key_creation_import_export:TEST_SE_PERSISTENT_LIFETIME:ARRAY_LENGTH( ram_slots ) - 1:0
|
||||
|
||||
SE key import-export, check after restart (slot 0)
|
||||
key_creation_import_export:0:1
|
||||
SE key import-export persistent, check after restart (slot 0)
|
||||
key_creation_import_export:TEST_SE_PERSISTENT_LIFETIME:0:1
|
||||
|
||||
SE key import-export, check after restart (slot 3)
|
||||
key_creation_import_export:3:1
|
||||
SE key import-export persistent, check after restart (slot 3)
|
||||
key_creation_import_export:TEST_SE_PERSISTENT_LIFETIME:3:1
|
||||
|
||||
SE key import-export volatile (p_allocate allows all slots)
|
||||
key_creation_import_export:TEST_SE_VOLATILE_LIFETIME:0:0
|
||||
|
||||
SE key import-export volatile (p_allocate allows 1 slot)
|
||||
key_creation_import_export:TEST_SE_VOLATILE_LIFETIME:ARRAY_LENGTH( ram_slots ) - 1:0
|
||||
|
||||
SE key import-export volatile, check after restart (slot 0)
|
||||
key_creation_import_export:TEST_SE_VOLATILE_LIFETIME:0:1
|
||||
|
||||
SE key import-export volatile, check after restart (slot 3)
|
||||
key_creation_import_export:TEST_SE_VOLATILE_LIFETIME:3:1
|
||||
|
||||
Key creation in a specific slot (0)
|
||||
key_creation_in_chosen_slot:0:0:PSA_SUCCESS
|
||||
|
@ -118,22 +130,28 @@ Key generation smoke test: HMAC-SHA-256
|
|||
generate_key_smoke:PSA_KEY_TYPE_HMAC:256:PSA_ALG_HMAC( PSA_ALG_SHA_256 )
|
||||
|
||||
Key registration: smoke test
|
||||
register_key_smoke_test:TEST_SE_PERSISTENT_LIFETIME:1:PSA_SUCCESS
|
||||
register_key_smoke_test:TEST_SE_PERSISTENT_LIFETIME:1:1:PSA_SUCCESS
|
||||
|
||||
Key registration: invalid lifetime (volatile)
|
||||
register_key_smoke_test:PSA_KEY_LIFETIME_VOLATILE:1:PSA_ERROR_INVALID_ARGUMENT
|
||||
Key registration: invalid lifetime (volatile internal storage)
|
||||
register_key_smoke_test:PSA_KEY_LIFETIME_VOLATILE:1:1:PSA_ERROR_INVALID_ARGUMENT
|
||||
|
||||
Key registration: invalid lifetime (internal storage)
|
||||
register_key_smoke_test:PSA_KEY_LIFETIME_PERSISTENT:1:PSA_ERROR_INVALID_ARGUMENT
|
||||
register_key_smoke_test:PSA_KEY_LIFETIME_PERSISTENT:1:1:PSA_ERROR_INVALID_ARGUMENT
|
||||
|
||||
Key registration: invalid lifetime (no registered driver)
|
||||
register_key_smoke_test:PSA_KEY_LIFETIME_FROM_PERSISTENCE_AND_LOCATION( PSA_KEY_PERSISTENCE_DEFAULT, TEST_DRIVER_LOCATION + 1 ):1:PSA_ERROR_INVALID_ARGUMENT
|
||||
register_key_smoke_test:PSA_KEY_LIFETIME_FROM_PERSISTENCE_AND_LOCATION( PSA_KEY_PERSISTENCE_DEFAULT, TEST_DRIVER_LOCATION + 1 ):1:1:PSA_ERROR_INVALID_ARGUMENT
|
||||
|
||||
Key registration: rejected
|
||||
register_key_smoke_test:TEST_SE_PERSISTENT_LIFETIME:0:PSA_ERROR_NOT_PERMITTED
|
||||
register_key_smoke_test:TEST_SE_PERSISTENT_LIFETIME:1:0:PSA_ERROR_NOT_PERMITTED
|
||||
|
||||
Key registration: not supported
|
||||
register_key_smoke_test:TEST_SE_PERSISTENT_LIFETIME:-1:PSA_ERROR_NOT_SUPPORTED
|
||||
register_key_smoke_test:TEST_SE_PERSISTENT_LIFETIME:1:-1:PSA_ERROR_NOT_SUPPORTED
|
||||
|
||||
Key registration: key id out of range
|
||||
register_key_smoke_test:TEST_SE_PERSISTENT_LIFETIME:PSA_KEY_ID_VENDOR_MAX+1:-1:PSA_ERROR_INVALID_ARGUMENT
|
||||
|
||||
Key registration: key id in vendor range
|
||||
register_key_smoke_test:TEST_SE_PERSISTENT_LIFETIME:PSA_KEY_ID_VENDOR_MAX:1:PSA_SUCCESS
|
||||
|
||||
Import-sign-verify: sign in driver, ECDSA
|
||||
depends_on:MBEDTLS_ECDSA_C:MBEDTLS_ECP_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED
|
||||
|
|
|
@ -27,6 +27,10 @@
|
|||
( PSA_KEY_LIFETIME_FROM_PERSISTENCE_AND_LOCATION( \
|
||||
PSA_KEY_PERSISTENCE_DEFAULT, TEST_DRIVER_LOCATION ) )
|
||||
|
||||
#define TEST_SE_VOLATILE_LIFETIME \
|
||||
( PSA_KEY_LIFETIME_FROM_PERSISTENCE_AND_LOCATION( \
|
||||
PSA_KEY_PERSISTENCE_VOLATILE, TEST_DRIVER_LOCATION ) )
|
||||
|
||||
/** The driver detected a condition that shouldn't happen.
|
||||
* This is probably a bug in the library. */
|
||||
#define PSA_ERROR_DETECTED_BY_DRIVER ((psa_status_t)( -500 ))
|
||||
|
@ -609,6 +613,20 @@ exit:
|
|||
return( ok );
|
||||
}
|
||||
|
||||
/* Check that no persistent data exists for the given location. */
|
||||
static int check_no_persistent_data( psa_key_location_t location )
|
||||
{
|
||||
psa_storage_uid_t uid = file_uid_for_location( location );
|
||||
struct psa_storage_info_t info;
|
||||
int ok = 0;
|
||||
|
||||
TEST_EQUAL( psa_its_get_info( uid, &info ), PSA_ERROR_DOES_NOT_EXIST );
|
||||
ok = 1;
|
||||
|
||||
exit:
|
||||
return( ok );
|
||||
}
|
||||
|
||||
/* Check that a function's return status is "smoke-free", i.e. that
|
||||
* it's an acceptable error code when calling an API function that operates
|
||||
* on a key with potentially bogus parameters. */
|
||||
|
@ -829,11 +847,11 @@ exit:
|
|||
/* END_CASE */
|
||||
|
||||
/* BEGIN_CASE */
|
||||
void key_creation_import_export( int min_slot, int restart )
|
||||
void key_creation_import_export( int lifetime_arg, int min_slot, int restart )
|
||||
{
|
||||
psa_drv_se_t driver;
|
||||
psa_drv_se_key_management_t key_management;
|
||||
psa_key_lifetime_t lifetime = TEST_SE_PERSISTENT_LIFETIME;
|
||||
psa_key_lifetime_t lifetime = (psa_key_lifetime_t) lifetime_arg;
|
||||
psa_key_location_t location = PSA_KEY_LIFETIME_GET_LOCATION( lifetime );
|
||||
psa_key_id_t id = 1;
|
||||
psa_key_handle_t handle = 0;
|
||||
|
@ -864,10 +882,25 @@ void key_creation_import_export( int min_slot, int restart )
|
|||
PSA_ASSERT( psa_import_key( &attributes,
|
||||
key_material, sizeof( key_material ),
|
||||
&handle ) );
|
||||
if( ! check_persistent_data( location,
|
||||
&ram_shadow_slot_usage,
|
||||
sizeof( ram_shadow_slot_usage ) ) )
|
||||
goto exit;
|
||||
|
||||
|
||||
if( PSA_KEY_LIFETIME_IS_VOLATILE( lifetime ) )
|
||||
{
|
||||
/* For volatile keys, check no persistent data was created */
|
||||
if( ! check_no_persistent_data( location ) )
|
||||
goto exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* For persistent keys, check persistent data */
|
||||
if( ! check_persistent_data( location,
|
||||
&ram_shadow_slot_usage,
|
||||
sizeof( ram_shadow_slot_usage ) ) )
|
||||
goto exit;
|
||||
}
|
||||
|
||||
/* Test that the key was created in the expected slot. */
|
||||
TEST_EQUAL( ram_slots[min_slot].type, PSA_KEY_TYPE_RAW_DATA );
|
||||
|
||||
/* Maybe restart, to check that the information is saved correctly. */
|
||||
if( restart )
|
||||
|
@ -875,15 +908,37 @@ void key_creation_import_export( int min_slot, int restart )
|
|||
mbedtls_psa_crypto_free( );
|
||||
PSA_ASSERT( psa_register_se_driver( location, &driver ) );
|
||||
PSA_ASSERT( psa_crypto_init( ) );
|
||||
if( ! check_persistent_data( location,
|
||||
&ram_shadow_slot_usage,
|
||||
sizeof( ram_shadow_slot_usage ) ) )
|
||||
goto exit;
|
||||
PSA_ASSERT( psa_open_key( id, &handle ) );
|
||||
|
||||
if( PSA_KEY_LIFETIME_IS_VOLATILE( lifetime ) )
|
||||
{
|
||||
/* Check that the PSA core has no knowledge of the volatile key */
|
||||
TEST_ASSERT( psa_open_key( id, &handle ) == PSA_ERROR_DOES_NOT_EXIST );
|
||||
|
||||
/* Drop data from our mockup driver */
|
||||
ram_slots_reset();
|
||||
ram_min_slot = min_slot;
|
||||
|
||||
/* Re-import key */
|
||||
PSA_ASSERT( psa_import_key( &attributes,
|
||||
key_material, sizeof( key_material ),
|
||||
&handle ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
/* Check we can re-open the persistent key */
|
||||
if( ! check_persistent_data( location,
|
||||
&ram_shadow_slot_usage,
|
||||
sizeof( ram_shadow_slot_usage ) ) )
|
||||
goto exit;
|
||||
|
||||
/* Check that the PSA core still knows about the key */
|
||||
PSA_ASSERT( psa_open_key( id, &handle ) );
|
||||
}
|
||||
}
|
||||
|
||||
/* Test that the key was created in the expected slot. */
|
||||
TEST_ASSERT( ram_slots[min_slot].type == PSA_KEY_TYPE_RAW_DATA );
|
||||
TEST_EQUAL( ram_slots[min_slot].type, PSA_KEY_TYPE_RAW_DATA );
|
||||
|
||||
/* Test the key attributes, including the reported slot number. */
|
||||
psa_set_key_bits( &attributes,
|
||||
|
@ -909,7 +964,7 @@ void key_creation_import_export( int min_slot, int restart )
|
|||
PSA_ERROR_DOES_NOT_EXIST );
|
||||
|
||||
/* Test that the key has been erased from the designated slot. */
|
||||
TEST_ASSERT( ram_slots[min_slot].type == 0 );
|
||||
TEST_EQUAL( ram_slots[min_slot].type, 0 );
|
||||
|
||||
exit:
|
||||
PSA_DONE( );
|
||||
|
@ -1263,7 +1318,7 @@ void sign_verify( int flow,
|
|||
* generate material, store the desired result of generation in
|
||||
* the mock secure element storage. */
|
||||
PSA_ASSERT( psa_get_key_attributes( drv_handle, &drv_attributes ) );
|
||||
TEST_ASSERT( key_material->len == PSA_BITS_TO_BYTES( bits ) );
|
||||
TEST_EQUAL( key_material->len, PSA_BITS_TO_BYTES( bits ) );
|
||||
memcpy( ram_slots[ram_min_slot].content, key_material->x,
|
||||
key_material->len );
|
||||
}
|
||||
|
@ -1355,6 +1410,7 @@ exit:
|
|||
|
||||
/* BEGIN_CASE */
|
||||
void register_key_smoke_test( int lifetime_arg,
|
||||
int id_arg,
|
||||
int validate,
|
||||
int expected_status_arg )
|
||||
{
|
||||
|
@ -1364,7 +1420,7 @@ void register_key_smoke_test( int lifetime_arg,
|
|||
psa_drv_se_t driver;
|
||||
psa_drv_se_key_management_t key_management;
|
||||
psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
|
||||
psa_key_id_t id = 1;
|
||||
psa_key_id_t id = id_arg;
|
||||
size_t bit_size = 48;
|
||||
psa_key_slot_number_t wanted_slot = 0x123456789;
|
||||
psa_key_handle_t handle = 0;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
Check compiletime library version
|
||||
check_compiletime_version:"2.22.0"
|
||||
check_compiletime_version:"2.23.0"
|
||||
|
||||
Check runtime library version
|
||||
check_runtime_version:"2.22.0"
|
||||
check_runtime_version:"2.23.0"
|
||||
|
||||
Check for MBEDTLS_VERSION_C
|
||||
check_feature:"MBEDTLS_VERSION_C":0
|
||||
|
|
|
@ -93,7 +93,7 @@
|
|||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -111,7 +111,7 @@
|
|||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -131,7 +131,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -150,7 +150,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
|
|
@ -93,7 +93,7 @@
|
|||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -111,7 +111,7 @@
|
|||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -131,7 +131,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -150,7 +150,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
|
|
@ -93,7 +93,7 @@
|
|||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -111,7 +111,7 @@
|
|||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -131,7 +131,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -150,7 +150,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
|
|
@ -93,7 +93,7 @@
|
|||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -111,7 +111,7 @@
|
|||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -131,7 +131,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -150,7 +150,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
|
|
@ -93,7 +93,7 @@
|
|||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -111,7 +111,7 @@
|
|||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -131,7 +131,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -150,7 +150,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
|
|
@ -93,7 +93,7 @@
|
|||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -111,7 +111,7 @@
|
|||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -131,7 +131,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -150,7 +150,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
|
|
@ -93,7 +93,7 @@
|
|||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -111,7 +111,7 @@
|
|||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -131,7 +131,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -150,7 +150,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
|
|
@ -93,7 +93,7 @@
|
|||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -111,7 +111,7 @@
|
|||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -131,7 +131,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -150,7 +150,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
|
|
@ -93,7 +93,7 @@
|
|||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -111,7 +111,7 @@
|
|||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -131,7 +131,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -150,7 +150,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
|
|
@ -93,7 +93,7 @@
|
|||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -111,7 +111,7 @@
|
|||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -131,7 +131,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -150,7 +150,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
|
|
@ -93,7 +93,7 @@
|
|||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -111,7 +111,7 @@
|
|||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -131,7 +131,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -150,7 +150,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
|
|
@ -93,7 +93,7 @@
|
|||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -111,7 +111,7 @@
|
|||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -131,7 +131,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -150,7 +150,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
|
|
@ -93,7 +93,7 @@
|
|||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -111,7 +111,7 @@
|
|||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -131,7 +131,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -150,7 +150,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
|
|
@ -93,7 +93,7 @@
|
|||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -111,7 +111,7 @@
|
|||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -131,7 +131,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -150,7 +150,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
|
|
@ -93,7 +93,7 @@
|
|||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -111,7 +111,7 @@
|
|||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -131,7 +131,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -150,7 +150,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
|
|
@ -93,7 +93,7 @@
|
|||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -111,7 +111,7 @@
|
|||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -131,7 +131,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -150,7 +150,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
|
|
@ -93,7 +93,7 @@
|
|||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -111,7 +111,7 @@
|
|||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -131,7 +131,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -150,7 +150,7 @@
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib </AdditionalIncludeDirectories>
|
||||
../../include;../../3rdparty/everest/include/;../../3rdparty/everest/include/everest;../../3rdparty/everest/include/everest/vs2010;../../3rdparty/everest/include/everest/kremlib;../../tests/include </AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue