From c5d68e5b702ec63198b9206aa77b8b10e3c25b6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Fri, 23 Jan 2015 12:37:21 +0000 Subject: [PATCH 01/46] Fix dependency declaration --- library/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/Makefile b/library/Makefile index d637417c5..123f4908d 100644 --- a/library/Makefile +++ b/library/Makefile @@ -81,7 +81,7 @@ libpolarssl.a: $(OBJS) echo " RL $@" $(AR) s $@ -libpolarssl.${DLEXT}: libpolarssl.a +libpolarssl.${DLEXT}: $(OBJS) echo " LD $@" $(CC) ${LDFLAGS} -shared -Wl,-soname,$(SONAME) -o $@ $(OBJS) @@ -89,11 +89,11 @@ libpolarssl.so: libpolarssl.${DLEXT} echo " LN $@ -> libpolarssl.${DLEXT}" ln -sf libpolarssl.${DLEXT} $@ -libpolarssl.dylib: libpolarssl.a +libpolarssl.dylib: $(OBJS) echo " LD $@" $(CC) ${LDFLAGS} -dynamiclib -o $@ $(OBJS) -libpolarssl.dll: libpolarssl.a +libpolarssl.dll: $(OBJS) echo " LD $@" $(CC) -shared -Wl,-soname,$@ -o $@ $(OBJS) -lws2_32 -lwinmm -lgdi32 From c26a092b50671a071e087f9c0f08bced1b623f77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Fri, 23 Jan 2015 12:51:33 +0000 Subject: [PATCH 02/46] Rename static lib name with make --- library/.gitignore | 1 + library/Makefile | 14 +++++-- programs/Makefile | 92 +++++++++++++++++++++++----------------------- tests/Makefile | 2 +- 4 files changed, 59 insertions(+), 50 deletions(-) diff --git a/library/.gitignore b/library/.gitignore index 9d80fa47a..872219be4 100644 --- a/library/.gitignore +++ b/library/.gitignore @@ -1,2 +1,3 @@ *.o libpolarssl* +libmbedtls.* diff --git a/library/Makefile b/library/Makefile index 123f4908d..72e376c94 100644 --- a/library/Makefile +++ b/library/Makefile @@ -75,7 +75,15 @@ static: libpolarssl.a shared: libpolarssl.$(DLEXT) libpolarssl.so -libpolarssl.a: $(OBJS) +libpolarssl.a: libmbedtls.a + echo " LN $@ -> $?" +ifndef WINDOWS + ln -sf $? $@ +else + copy /y /b $? $@ +endif + +libmbedtls.a: $(OBJS) echo " AR $@" $(AR) r $@ $(OBJS) echo " RL $@" @@ -103,8 +111,8 @@ libpolarssl.dll: $(OBJS) clean: ifndef WINDOWS - rm -f *.o libpolarssl.* + rm -f *.o libpolarssl.* libmbedtls.* endif ifdef WINDOWS - del /Q /F *.o libpolarssl.* + del /Q /F *.o libpolarssl.* libmbedtls.* endif diff --git a/programs/Makefile b/programs/Makefile index 9238ae8c2..b7fcf92c6 100644 --- a/programs/Makefile +++ b/programs/Makefile @@ -57,187 +57,187 @@ endif all: $(APPS) -aes/aescrypt2: aes/aescrypt2.c ../library/libpolarssl.a +aes/aescrypt2: aes/aescrypt2.c ../library/libmbedtls.a echo " CC aes/aescrypt2.c" $(CC) $(CFLAGS) $(OFLAGS) aes/aescrypt2.c $(LDFLAGS) -o $@ -aes/crypt_and_hash: aes/crypt_and_hash.c ../library/libpolarssl.a +aes/crypt_and_hash: aes/crypt_and_hash.c ../library/libmbedtls.a echo " CC aes/crypt_and_hash.c" $(CC) $(CFLAGS) $(OFLAGS) aes/crypt_and_hash.c $(LDFLAGS) -o $@ -hash/hello: hash/hello.c ../library/libpolarssl.a +hash/hello: hash/hello.c ../library/libmbedtls.a echo " CC hash/hello.c" $(CC) $(CFLAGS) $(OFLAGS) hash/hello.c $(LDFLAGS) -o $@ -hash/generic_sum: hash/generic_sum.c ../library/libpolarssl.a +hash/generic_sum: hash/generic_sum.c ../library/libmbedtls.a echo " CC hash/generic_sum.c" $(CC) $(CFLAGS) $(OFLAGS) hash/generic_sum.c $(LDFLAGS) -o $@ -hash/md5sum: hash/md5sum.c ../library/libpolarssl.a +hash/md5sum: hash/md5sum.c ../library/libmbedtls.a echo " CC hash/md5sum.c" $(CC) $(CFLAGS) $(OFLAGS) hash/md5sum.c $(LDFLAGS) -o $@ -hash/sha1sum: hash/sha1sum.c ../library/libpolarssl.a +hash/sha1sum: hash/sha1sum.c ../library/libmbedtls.a echo " CC hash/sha1sum.c" $(CC) $(CFLAGS) $(OFLAGS) hash/sha1sum.c $(LDFLAGS) -o $@ -hash/sha2sum: hash/sha2sum.c ../library/libpolarssl.a +hash/sha2sum: hash/sha2sum.c ../library/libmbedtls.a echo " CC hash/sha2sum.c" $(CC) $(CFLAGS) $(OFLAGS) hash/sha2sum.c $(LDFLAGS) -o $@ -pkey/dh_client: pkey/dh_client.c ../library/libpolarssl.a +pkey/dh_client: pkey/dh_client.c ../library/libmbedtls.a echo " CC pkey/dh_client.c" $(CC) $(CFLAGS) $(OFLAGS) pkey/dh_client.c $(LDFLAGS) -o $@ -pkey/dh_genprime: pkey/dh_genprime.c ../library/libpolarssl.a +pkey/dh_genprime: pkey/dh_genprime.c ../library/libmbedtls.a echo " CC pkey/dh_genprime.c" $(CC) $(CFLAGS) $(OFLAGS) pkey/dh_genprime.c $(LDFLAGS) -o $@ -pkey/dh_server: pkey/dh_server.c ../library/libpolarssl.a +pkey/dh_server: pkey/dh_server.c ../library/libmbedtls.a echo " CC pkey/dh_server.c" $(CC) $(CFLAGS) $(OFLAGS) pkey/dh_server.c $(LDFLAGS) -o $@ -pkey/ecdsa: pkey/ecdsa.c ../library/libpolarssl.a +pkey/ecdsa: pkey/ecdsa.c ../library/libmbedtls.a echo " CC pkey/ecdsa.c" $(CC) $(CFLAGS) $(OFLAGS) pkey/ecdsa.c $(LDFLAGS) -o $@ -pkey/gen_key: pkey/gen_key.c ../library/libpolarssl.a +pkey/gen_key: pkey/gen_key.c ../library/libmbedtls.a echo " CC pkey/gen_key.c" $(CC) $(CFLAGS) $(OFLAGS) pkey/gen_key.c $(LDFLAGS) -o $@ -pkey/key_app: pkey/key_app.c ../library/libpolarssl.a +pkey/key_app: pkey/key_app.c ../library/libmbedtls.a echo " CC pkey/key_app.c" $(CC) $(CFLAGS) $(OFLAGS) pkey/key_app.c $(LDFLAGS) -o $@ -pkey/key_app_writer: pkey/key_app_writer.c ../library/libpolarssl.a +pkey/key_app_writer: pkey/key_app_writer.c ../library/libmbedtls.a echo " CC pkey/key_app_writer.c" $(CC) $(CFLAGS) $(OFLAGS) pkey/key_app_writer.c $(LDFLAGS) -o $@ -pkey/mpi_demo: pkey/mpi_demo.c ../library/libpolarssl.a +pkey/mpi_demo: pkey/mpi_demo.c ../library/libmbedtls.a echo " CC pkey/mpi_demo.c" $(CC) $(CFLAGS) $(OFLAGS) pkey/mpi_demo.c $(LDFLAGS) -o $@ -pkey/pk_decrypt: pkey/pk_decrypt.c ../library/libpolarssl.a +pkey/pk_decrypt: pkey/pk_decrypt.c ../library/libmbedtls.a echo " CC pkey/pk_decrypt.c" $(CC) $(CFLAGS) $(OFLAGS) pkey/pk_decrypt.c $(LDFLAGS) -o $@ -pkey/pk_encrypt: pkey/pk_encrypt.c ../library/libpolarssl.a +pkey/pk_encrypt: pkey/pk_encrypt.c ../library/libmbedtls.a echo " CC pkey/pk_encrypt.c" $(CC) $(CFLAGS) $(OFLAGS) pkey/pk_encrypt.c $(LDFLAGS) -o $@ -pkey/pk_sign: pkey/pk_sign.c ../library/libpolarssl.a +pkey/pk_sign: pkey/pk_sign.c ../library/libmbedtls.a echo " CC pkey/pk_sign.c" $(CC) $(CFLAGS) $(OFLAGS) pkey/pk_sign.c $(LDFLAGS) -o $@ -pkey/pk_verify: pkey/pk_verify.c ../library/libpolarssl.a +pkey/pk_verify: pkey/pk_verify.c ../library/libmbedtls.a echo " CC pkey/pk_verify.c" $(CC) $(CFLAGS) $(OFLAGS) pkey/pk_verify.c $(LDFLAGS) -o $@ -pkey/rsa_genkey: pkey/rsa_genkey.c ../library/libpolarssl.a +pkey/rsa_genkey: pkey/rsa_genkey.c ../library/libmbedtls.a echo " CC pkey/rsa_genkey.c" $(CC) $(CFLAGS) $(OFLAGS) pkey/rsa_genkey.c $(LDFLAGS) -o $@ -pkey/rsa_sign: pkey/rsa_sign.c ../library/libpolarssl.a +pkey/rsa_sign: pkey/rsa_sign.c ../library/libmbedtls.a echo " CC pkey/rsa_sign.c" $(CC) $(CFLAGS) $(OFLAGS) pkey/rsa_sign.c $(LDFLAGS) -o $@ -pkey/rsa_verify: pkey/rsa_verify.c ../library/libpolarssl.a +pkey/rsa_verify: pkey/rsa_verify.c ../library/libmbedtls.a echo " CC pkey/rsa_verify.c" $(CC) $(CFLAGS) $(OFLAGS) pkey/rsa_verify.c $(LDFLAGS) -o $@ -pkey/rsa_sign_pss: pkey/rsa_sign_pss.c ../library/libpolarssl.a +pkey/rsa_sign_pss: pkey/rsa_sign_pss.c ../library/libmbedtls.a echo " CC pkey/rsa_sign_pss.c" $(CC) $(CFLAGS) $(OFLAGS) pkey/rsa_sign_pss.c $(LDFLAGS) -o $@ -pkey/rsa_verify_pss: pkey/rsa_verify_pss.c ../library/libpolarssl.a +pkey/rsa_verify_pss: pkey/rsa_verify_pss.c ../library/libmbedtls.a echo " CC pkey/rsa_verify_pss.c" $(CC) $(CFLAGS) $(OFLAGS) pkey/rsa_verify_pss.c $(LDFLAGS) -o $@ -pkey/rsa_decrypt: pkey/rsa_decrypt.c ../library/libpolarssl.a +pkey/rsa_decrypt: pkey/rsa_decrypt.c ../library/libmbedtls.a echo " CC pkey/rsa_decrypt.c" $(CC) $(CFLAGS) $(OFLAGS) pkey/rsa_decrypt.c $(LDFLAGS) -o $@ -pkey/rsa_encrypt: pkey/rsa_encrypt.c ../library/libpolarssl.a +pkey/rsa_encrypt: pkey/rsa_encrypt.c ../library/libmbedtls.a echo " CC pkey/rsa_encrypt.c" $(CC) $(CFLAGS) $(OFLAGS) pkey/rsa_encrypt.c $(LDFLAGS) -o $@ -random/gen_entropy: random/gen_entropy.c ../library/libpolarssl.a +random/gen_entropy: random/gen_entropy.c ../library/libmbedtls.a echo " CC random/gen_entropy.c" $(CC) $(CFLAGS) $(OFLAGS) random/gen_entropy.c $(LDFLAGS) -o $@ -random/gen_random_havege: random/gen_random_havege.c ../library/libpolarssl.a +random/gen_random_havege: random/gen_random_havege.c ../library/libmbedtls.a echo " CC random/gen_random_havege.c" $(CC) $(CFLAGS) $(OFLAGS) random/gen_random_havege.c $(LDFLAGS) -o $@ -random/gen_random_ctr_drbg: random/gen_random_ctr_drbg.c ../library/libpolarssl.a +random/gen_random_ctr_drbg: random/gen_random_ctr_drbg.c ../library/libmbedtls.a echo " CC random/gen_random_ctr_drbg.c" $(CC) $(CFLAGS) $(OFLAGS) random/gen_random_ctr_drbg.c $(LDFLAGS) -o $@ -ssl/ssl_client1: ssl/ssl_client1.c ../library/libpolarssl.a +ssl/ssl_client1: ssl/ssl_client1.c ../library/libmbedtls.a echo " CC ssl/ssl_client1.c" $(CC) $(CFLAGS) $(OFLAGS) ssl/ssl_client1.c $(LDFLAGS) -o $@ -ssl/ssl_client2: ssl/ssl_client2.c ../library/libpolarssl.a +ssl/ssl_client2: ssl/ssl_client2.c ../library/libmbedtls.a echo " CC ssl/ssl_client2.c" $(CC) $(CFLAGS) $(OFLAGS) ssl/ssl_client2.c $(LDFLAGS) -o $@ -ssl/ssl_server: ssl/ssl_server.c ../library/libpolarssl.a +ssl/ssl_server: ssl/ssl_server.c ../library/libmbedtls.a echo " CC ssl/ssl_server.c" $(CC) $(CFLAGS) $(OFLAGS) ssl/ssl_server.c $(LDFLAGS) -o $@ -ssl/ssl_server2: ssl/ssl_server2.c ../library/libpolarssl.a +ssl/ssl_server2: ssl/ssl_server2.c ../library/libmbedtls.a echo " CC ssl/ssl_server2.c" $(CC) $(CFLAGS) $(OFLAGS) ssl/ssl_server2.c $(LDFLAGS) -o $@ -ssl/ssl_fork_server: ssl/ssl_fork_server.c ../library/libpolarssl.a +ssl/ssl_fork_server: ssl/ssl_fork_server.c ../library/libmbedtls.a echo " CC ssl/ssl_fork_server.c" $(CC) $(CFLAGS) $(OFLAGS) ssl/ssl_fork_server.c $(LDFLAGS) -o $@ -ssl/ssl_pthread_server: ssl/ssl_pthread_server.c ../library/libpolarssl.a +ssl/ssl_pthread_server: ssl/ssl_pthread_server.c ../library/libmbedtls.a echo " CC ssl/ssl_pthread_server.c" $(CC) $(CFLAGS) $(OFLAGS) ssl/ssl_pthread_server.c $(LDFLAGS) -o $@ -lpthread -ssl/ssl_mail_client: ssl/ssl_mail_client.c ../library/libpolarssl.a +ssl/ssl_mail_client: ssl/ssl_mail_client.c ../library/libmbedtls.a echo " CC ssl/ssl_mail_client.c" $(CC) $(CFLAGS) $(OFLAGS) ssl/ssl_mail_client.c $(LDFLAGS) -o $@ -test/ssl_cert_test: test/ssl_cert_test.c ../library/libpolarssl.a +test/ssl_cert_test: test/ssl_cert_test.c ../library/libmbedtls.a echo " CC test/ssl_cert_test.c" $(CC) $(CFLAGS) $(OFLAGS) test/ssl_cert_test.c $(LDFLAGS) -o $@ -test/benchmark: test/benchmark.c ../library/libpolarssl.a +test/benchmark: test/benchmark.c ../library/libmbedtls.a echo " CC test/benchmark.c" $(CC) $(CFLAGS) $(OFLAGS) test/benchmark.c $(LDFLAGS) -o $@ -test/selftest: test/selftest.c ../library/libpolarssl.a +test/selftest: test/selftest.c ../library/libmbedtls.a echo " CC test/selftest.c" $(CC) $(CFLAGS) $(OFLAGS) test/selftest.c $(LDFLAGS) -o $@ -test/ssl_test: test/ssl_test.c ../library/libpolarssl.a +test/ssl_test: test/ssl_test.c ../library/libmbedtls.a echo " CC test/ssl_test.c" $(CC) $(CFLAGS) $(OFLAGS) test/ssl_test.c $(LDFLAGS) -o $@ -test/o_p_test: test/o_p_test.c ../library/libpolarssl.a +test/o_p_test: test/o_p_test.c ../library/libmbedtls.a echo " CC test/o_p_test.c" $(CC) $(CFLAGS) $(OFLAGS) test/o_p_test.c $(LDFLAGS) -o $@ -lssl -lcrypto -util/pem2der: util/pem2der.c ../library/libpolarssl.a +util/pem2der: util/pem2der.c ../library/libmbedtls.a echo " CC util/pem2der.c" $(CC) $(CFLAGS) $(OFLAGS) util/pem2der.c $(LDFLAGS) -o $@ -util/strerror: util/strerror.c ../library/libpolarssl.a +util/strerror: util/strerror.c ../library/libmbedtls.a echo " CC util/strerror.c" $(CC) $(CFLAGS) $(OFLAGS) util/strerror.c $(LDFLAGS) -o $@ -x509/cert_app: x509/cert_app.c ../library/libpolarssl.a +x509/cert_app: x509/cert_app.c ../library/libmbedtls.a echo " CC x509/cert_app.c" $(CC) $(CFLAGS) $(OFLAGS) x509/cert_app.c $(LDFLAGS) -o $@ -x509/crl_app: x509/crl_app.c ../library/libpolarssl.a +x509/crl_app: x509/crl_app.c ../library/libmbedtls.a echo " CC x509/crl_app.c" $(CC) $(CFLAGS) $(OFLAGS) x509/crl_app.c $(LDFLAGS) -o $@ -x509/cert_req: x509/cert_req.c ../library/libpolarssl.a +x509/cert_req: x509/cert_req.c ../library/libmbedtls.a echo " CC x509/cert_req.c" $(CC) $(CFLAGS) $(OFLAGS) x509/cert_req.c $(LDFLAGS) -o $@ diff --git a/tests/Makefile b/tests/Makefile index 37e1aacc3..a0753965b 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -10,7 +10,7 @@ OFLAGS = -O2 LDFLAGS += -L../library -lpolarssl $(SYS_LDFLAGS) ifndef SHARED -DEP=../library/libpolarssl.a +DEP=../library/libmbedtls.a CHECK_PRELOAD= else DEP=../library/libpolarssl.so From cfa9a45dd677a2f1e86c3773cfcb2df8df967b6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Fri, 23 Jan 2015 13:33:31 +0000 Subject: [PATCH 03/46] Rename in cmake help strings --- CMakeLists.txt | 10 +++++----- include/CMakeLists.txt | 2 +- library/CMakeLists.txt | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 84854833a..aea680672 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,11 +39,11 @@ if(CMAKE_BUILD_TYPE STREQUAL "Coverage") endif(CMAKE_COMPILER_IS_CLANG) endif(CMAKE_BUILD_TYPE STREQUAL "Coverage") -option(USE_PKCS11_HELPER_LIBRARY "Build PolarSSL with the pkcs11-helper library." OFF) +option(USE_PKCS11_HELPER_LIBRARY "Build mbed TLS with the pkcs11-helper library." OFF) -option(ENABLE_ZLIB_SUPPORT "Build PolarSSL with zlib library." OFF) -option(ENABLE_PROGRAMS "Build PolarSSL programs." ON) -option(ENABLE_TESTING "Build PolarSSL tests." ON) +option(ENABLE_ZLIB_SUPPORT "Build mbed TLS with zlib library." OFF) +option(ENABLE_PROGRAMS "Build mbed TLS programs." ON) +option(ENABLE_TESTING "Build mbed TLS tests." ON) if(ENABLE_TESTING) enable_testing() @@ -103,7 +103,7 @@ if(ENABLE_TESTING) COMMAND lcov --add-tracefile files.info --add-tracefile tests.info -o all.info COMMAND lcov --remove all.info -o final.info '*.h' COMMAND gendesc tests/Descriptions.txt -o descriptions - COMMAND genhtml --title PolarSSL --description-file descriptions --keep-descriptions --legend --no-branch-coverage -o Coverage final.info + COMMAND genhtml --title mbed TLS --description-file descriptions --keep-descriptions --legend --no-branch-coverage -o Coverage final.info COMMAND rm -f files.info tests.info all.info final.info descriptions ) diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index 8468871dc..17a098c34 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -1,4 +1,4 @@ -option(INSTALL_POLARSSL_HEADERS "Install PolarSSL headers." ON) +option(INSTALL_POLARSSL_HEADERS "Install mbed TLS headers." ON) if(INSTALL_POLARSSL_HEADERS) diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt index f562ca6f4..4de96c93e 100644 --- a/library/CMakeLists.txt +++ b/library/CMakeLists.txt @@ -1,6 +1,6 @@ -option(USE_STATIC_POLARSSL_LIBRARY "Build PolarSSL static library." ON) -option(USE_SHARED_POLARSSL_LIBRARY "Build PolarSSL shared library." OFF) -option(LINK_WITH_PTHREAD "Explicitly link PolarSSL library to pthread." OFF) +option(USE_STATIC_POLARSSL_LIBRARY "Build mbed TLS static library." ON) +option(USE_SHARED_POLARSSL_LIBRARY "Build mbed TLS shared library." OFF) +option(LINK_WITH_PTHREAD "Explicitly link mbed TLS library to pthread." OFF) set(src aes.c From 2be147a9cb27e4c1ca78e52cd980d3f193ac2630 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Fri, 23 Jan 2015 16:19:47 +0000 Subject: [PATCH 04/46] Improve documentation of CBC functions --- include/polarssl/aes.h | 24 ++++++++++++++++++++++++ include/polarssl/blowfish.h | 16 ++++++++++++++++ include/polarssl/camellia.h | 16 ++++++++++++++++ include/polarssl/des.h | 16 ++++++++++++++++ 4 files changed, 72 insertions(+) diff --git a/include/polarssl/aes.h b/include/polarssl/aes.h index bb5d161ba..0910479ba 100644 --- a/include/polarssl/aes.h +++ b/include/polarssl/aes.h @@ -129,6 +129,14 @@ int aes_crypt_ecb( aes_context *ctx, * Length should be a multiple of the block * size (16 bytes) * + * \note Upon exit, the content of the IV is updated so that you can + * call the function same function again on the following + * block(s) of data and get the same result as if it was + * encrypted in one call. This allows a "streaming" usage. + * If on the other hand you need to retain the contents of the + * IV, you should either save it manually or use the cipher + * module instead. + * * \param ctx AES context * \param mode AES_ENCRYPT or AES_DECRYPT * \param length length of the input data @@ -154,6 +162,14 @@ int aes_crypt_cbc( aes_context *ctx, * both encryption and decryption. So a context initialized with * aes_setkey_enc() for both AES_ENCRYPT and AES_DECRYPT. * + * \note Upon exit, the content of the IV is updated so that you can + * call the function same function again on the following + * block(s) of data and get the same result as if it was + * encrypted in one call. This allows a "streaming" usage. + * If on the other hand you need to retain the contents of the + * IV, you should either save it manually or use the cipher + * module instead. + * * \param ctx AES context * \param mode AES_ENCRYPT or AES_DECRYPT * \param length length of the input data @@ -179,6 +195,14 @@ int aes_crypt_cfb128( aes_context *ctx, * both encryption and decryption. So a context initialized with * aes_setkey_enc() for both AES_ENCRYPT and AES_DECRYPT. * + * \note Upon exit, the content of the IV is updated so that you can + * call the function same function again on the following + * block(s) of data and get the same result as if it was + * encrypted in one call. This allows a "streaming" usage. + * If on the other hand you need to retain the contents of the + * IV, you should either save it manually or use the cipher + * module instead. + * * \param ctx AES context * \param mode AES_ENCRYPT or AES_DECRYPT * \param length length of the input data diff --git a/include/polarssl/blowfish.h b/include/polarssl/blowfish.h index e1d25cfa8..f91b38da6 100644 --- a/include/polarssl/blowfish.h +++ b/include/polarssl/blowfish.h @@ -114,6 +114,14 @@ int blowfish_crypt_ecb( blowfish_context *ctx, * Length should be a multiple of the block * size (8 bytes) * + * \note Upon exit, the content of the IV is updated so that you can + * call the function same function again on the following + * block(s) of data and get the same result as if it was + * encrypted in one call. This allows a "streaming" usage. + * If on the other hand you need to retain the contents of the + * IV, you should either save it manually or use the cipher + * module instead. + * * \param ctx Blowfish context * \param mode BLOWFISH_ENCRYPT or BLOWFISH_DECRYPT * \param length length of the input data @@ -136,6 +144,14 @@ int blowfish_crypt_cbc( blowfish_context *ctx, /** * \brief Blowfish CFB buffer encryption/decryption. * + * \note Upon exit, the content of the IV is updated so that you can + * call the function same function again on the following + * block(s) of data and get the same result as if it was + * encrypted in one call. This allows a "streaming" usage. + * If on the other hand you need to retain the contents of the + * IV, you should either save it manually or use the cipher + * module instead. + * * \param ctx Blowfish context * \param mode BLOWFISH_ENCRYPT or BLOWFISH_DECRYPT * \param length length of the input data diff --git a/include/polarssl/camellia.h b/include/polarssl/camellia.h index 2023775d2..47e9f8192 100644 --- a/include/polarssl/camellia.h +++ b/include/polarssl/camellia.h @@ -122,6 +122,14 @@ int camellia_crypt_ecb( camellia_context *ctx, * Length should be a multiple of the block * size (16 bytes) * + * \note Upon exit, the content of the IV is updated so that you can + * call the function same function again on the following + * block(s) of data and get the same result as if it was + * encrypted in one call. This allows a "streaming" usage. + * If on the other hand you need to retain the contents of the + * IV, you should either save it manually or use the cipher + * module instead. + * * \param ctx CAMELLIA context * \param mode CAMELLIA_ENCRYPT or CAMELLIA_DECRYPT * \param length length of the input data @@ -148,6 +156,14 @@ int camellia_crypt_cbc( camellia_context *ctx, * both encryption and decryption. So a context initialized with * camellia_setkey_enc() for both CAMELLIA_ENCRYPT and CAMELLIE_DECRYPT. * + * \note Upon exit, the content of the IV is updated so that you can + * call the function same function again on the following + * block(s) of data and get the same result as if it was + * encrypted in one call. This allows a "streaming" usage. + * If on the other hand you need to retain the contents of the + * IV, you should either save it manually or use the cipher + * module instead. + * * \param ctx CAMELLIA context * \param mode CAMELLIA_ENCRYPT or CAMELLIA_DECRYPT * \param length length of the input data diff --git a/include/polarssl/des.h b/include/polarssl/des.h index 86e6b1de9..998ae4603 100644 --- a/include/polarssl/des.h +++ b/include/polarssl/des.h @@ -214,6 +214,14 @@ int des_crypt_ecb( des_context *ctx, /** * \brief DES-CBC buffer encryption/decryption * + * \note Upon exit, the content of the IV is updated so that you can + * call the function same function again on the following + * block(s) of data and get the same result as if it was + * encrypted in one call. This allows a "streaming" usage. + * If on the other hand you need to retain the contents of the + * IV, you should either save it manually or use the cipher + * module instead. + * * \param ctx DES context * \param mode DES_ENCRYPT or DES_DECRYPT * \param length length of the input data @@ -246,6 +254,14 @@ int des3_crypt_ecb( des3_context *ctx, /** * \brief 3DES-CBC buffer encryption/decryption * + * \note Upon exit, the content of the IV is updated so that you can + * call the function same function again on the following + * block(s) of data and get the same result as if it was + * encrypted in one call. This allows a "streaming" usage. + * If on the other hand you need to retain the contents of the + * IV, you should either save it manually or use the cipher + * module instead. + * * \param ctx 3DES context * \param mode DES_ENCRYPT or DES_DECRYPT * \param length length of the input data From 0a155b826cdbadec311e388aaeeaf877569074bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Fri, 23 Jan 2015 17:28:27 +0000 Subject: [PATCH 05/46] Fix bug with compatibility memory define/header --- include/polarssl/check_config.h | 4 ++++ include/polarssl/config.h | 1 + include/polarssl/memory.h | 4 ---- include/polarssl/platform.h | 5 +++++ 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/include/polarssl/check_config.h b/include/polarssl/check_config.h index b44bcd5fb..e6df92f21 100644 --- a/include/polarssl/check_config.h +++ b/include/polarssl/check_config.h @@ -156,6 +156,10 @@ #error "POLARSSL_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites" #endif +#if defined(POLARSSL_MEMORY_C) && !defined(POLARSSL_PLATFORM_C) +#error "POLARSSL_MEMORY_C defined, but not all prerequisites" +#endif + #if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) && \ ( !defined(POLARSSL_PLATFORM_C) || !defined(POLARSSL_PLATFORM_MEMORY) ) #error "POLARSSL_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites" diff --git a/include/polarssl/config.h b/include/polarssl/config.h index 41ca1ab84..ad0cceb2b 100644 --- a/include/polarssl/config.h +++ b/include/polarssl/config.h @@ -1679,6 +1679,7 @@ /** * \def POLARSSL_MEMORY_C * Deprecated since 1.3.5. Please use POLARSSL_PLATFORM_MEMORY instead. + * Depends on: POLARSSL_PLATFORM_C */ //#define POLARSSL_MEMORY_C diff --git a/include/polarssl/memory.h b/include/polarssl/memory.h index 039740c12..986c0e768 100644 --- a/include/polarssl/memory.h +++ b/include/polarssl/memory.h @@ -32,10 +32,6 @@ #include -#if defined(POLARSSL_MEMORY_C) && !defined(POLARSSL_PLATFORM_MEMORY) -#define POLARSSL_PLATFORM_MEMORY -#endif - #include "platform.h" #include "memory_buffer_alloc.h" diff --git a/include/polarssl/platform.h b/include/polarssl/platform.h index 9e79b64df..f2d62630b 100644 --- a/include/polarssl/platform.h +++ b/include/polarssl/platform.h @@ -30,6 +30,11 @@ #include POLARSSL_CONFIG_FILE #endif +/* Temporary compability hack for to keep the deprecated MEMORY_C working */ +#if defined(POLARSSL_MEMORY_C) && !defined(POLARSSL_PLATFORM_MEMORY) +#define POLARSSL_PLATFORM_MEMORY +#endif + #include #ifdef __cplusplus From d43ccb66fb356f0a65819d22962cb508d3d79e39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Fri, 23 Jan 2015 17:38:09 +0000 Subject: [PATCH 06/46] Quit using deprecated header. --- programs/ssl/ssl_pthread_server.c | 2 +- programs/ssl/ssl_server2.c | 2 +- programs/test/selftest.c | 2 +- tests/suites/helpers.function | 4 ---- 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/programs/ssl/ssl_pthread_server.c b/programs/ssl/ssl_pthread_server.c index 3f7d2cd70..96e872a60 100644 --- a/programs/ssl/ssl_pthread_server.c +++ b/programs/ssl/ssl_pthread_server.c @@ -48,7 +48,7 @@ #endif #if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) -#include "polarssl/memory.h" +#include "polarssl/memory_buffer_alloc.h" #endif #if !defined(POLARSSL_BIGNUM_C) || !defined(POLARSSL_CERTS_C) || \ diff --git a/programs/ssl/ssl_server2.c b/programs/ssl/ssl_server2.c index 0126b4ce5..7e0af496d 100644 --- a/programs/ssl/ssl_server2.c +++ b/programs/ssl/ssl_server2.c @@ -79,7 +79,7 @@ int main( int argc, char *argv[] ) #endif #if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) -#include "polarssl/memory.h" +#include "polarssl/memory_buffer_alloc.h" #endif #define DFL_SERVER_ADDR NULL diff --git a/programs/test/selftest.c b/programs/test/selftest.c index aa4410d0d..15a63d004 100644 --- a/programs/test/selftest.c +++ b/programs/test/selftest.c @@ -57,7 +57,7 @@ #include "polarssl/timing.h" #if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) -#include "polarssl/memory.h" +#include "polarssl/memory_buffer_alloc.h" #endif int main( int argc, char *argv[] ) diff --git a/tests/suites/helpers.function b/tests/suites/helpers.function index b00642946..2cc129a52 100644 --- a/tests/suites/helpers.function +++ b/tests/suites/helpers.function @@ -1,7 +1,3 @@ -#if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) -#include "polarssl/memory.h" -#endif - #if defined(POLARSSL_PLATFORM_C) #include "polarssl/platform.h" #else From afe8f53eadcc68e24c15211f6016ea91715abe71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Fri, 23 Jan 2015 17:40:33 +0000 Subject: [PATCH 07/46] Fix error in lcov target --- CMakeLists.txt | 2 +- Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index aea680672..d133de1fe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -103,7 +103,7 @@ if(ENABLE_TESTING) COMMAND lcov --add-tracefile files.info --add-tracefile tests.info -o all.info COMMAND lcov --remove all.info -o final.info '*.h' COMMAND gendesc tests/Descriptions.txt -o descriptions - COMMAND genhtml --title mbed TLS --description-file descriptions --keep-descriptions --legend --no-branch-coverage -o Coverage final.info + COMMAND genhtml --title "mbed TLS" --description-file descriptions --keep-descriptions --legend --no-branch-coverage -o Coverage final.info COMMAND rm -f files.info tests.info all.info final.info descriptions ) diff --git a/Makefile b/Makefile index 6eeb97840..17544a5c6 100644 --- a/Makefile +++ b/Makefile @@ -71,7 +71,7 @@ lcov: lcov --add-tracefile files.info --add-tracefile tests.info -o all.info lcov --remove all.info -o final.info '*.h' gendesc tests/Descriptions.txt -o descriptions - genhtml --title mbed TLS --description-file descriptions --keep-descriptions --legend --no-branch-coverage -o Coverage final.info + genhtml --title "mbed TLS" --description-file descriptions --keep-descriptions --legend --no-branch-coverage -o Coverage final.info rm -f files.info tests.info all.info final.info descriptions apidoc: From acdb9b95250c232e719b13df1e56d72f71904b8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Fri, 23 Jan 2015 17:50:34 +0000 Subject: [PATCH 08/46] Fix unchecked error code on Windows --- ChangeLog | 2 ++ library/x509_crt.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/ChangeLog b/ChangeLog index 582a9df2c..0d40eb8d5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -47,6 +47,8 @@ Bugfix * Fix potential undefined behaviour in Camellia. * Fix potential failure in ECDSA signatures when POLARSSL_ECP_MAX_BITS is a multiple of 8 (found by Gergely Budai). + * Fix unchecked return code in x509_crt_parse_path() on Windows (found by + Peter Vaskovic). Changes * Use deterministic nonces for AEAD ciphers in TLS by default (possible to diff --git a/library/x509_crt.c b/library/x509_crt.c index 84d529793..31e3bc43d 100644 --- a/library/x509_crt.c +++ b/library/x509_crt.c @@ -990,6 +990,8 @@ int x509_crt_parse_path( x509_crt *chain, const char *path ) w_ret = MultiByteToWideChar( CP_ACP, 0, filename, len, szDir, MAX_PATH - 3 ); + if( w_ret == 0 ) + return( POLARSSL_ERR_X509_BAD_INPUT_DATA ); hFind = FindFirstFileW( szDir, &file_data ); if( hFind == INVALID_HANDLE_VALUE ) @@ -1007,6 +1009,8 @@ int x509_crt_parse_path( x509_crt *chain, const char *path ) lstrlenW( file_data.cFileName ), p, len - 1, NULL, NULL ); + if( w_ret == 0 ) + return( POLARSSL_ERR_X509_FILE_IO_ERROR ); w_ret = x509_crt_parse_file( chain, filename ); if( w_ret < 0 ) From 1e77a966836acde5d07282db23f03d2f6b388759 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Mon, 26 Jan 2015 14:11:51 +0100 Subject: [PATCH 09/46] Fix memsan false positive on Linux >= 3.17 --- tests/scripts/all.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh index 77e2e4742..790af5b76 100755 --- a/tests/scripts/all.sh +++ b/tests/scripts/all.sh @@ -134,6 +134,7 @@ msg "build: MSan (clang)" # ~ 1 min 20s cleanup cp "$CONFIG_H" "$CONFIG_BAK" scripts/config.pl unset POLARSSL_AESNI_C # memsan doesn't grok asm +scripts/config.pl set POLARSSL_NO_PLATFORM_ENTROPY # memsan vs getrandom() CC=clang cmake -D CMAKE_BUILD_TYPE:String=MemSan . make From 0ac1d2d5ca5d1deee89954ccac9fde72b0c0e52a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Mon, 26 Jan 2015 14:58:04 +0100 Subject: [PATCH 10/46] Fix error while removing memory.h usage --- tests/suites/main_test.function | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/suites/main_test.function b/tests/suites/main_test.function index fae56f425..9ebd9c3db 100644 --- a/tests/suites/main_test.function +++ b/tests/suites/main_test.function @@ -9,6 +9,10 @@ #define polarssl_free free #endif +#if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) +#include "polarssl/memory_buffer_alloc.h" +#endif + static int test_errors = 0; SUITE_PRE_DEP From 392d3dde0bc852c1269e36691c5470aa749a75eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Mon, 26 Jan 2015 14:03:56 +0000 Subject: [PATCH 11/46] Adapt all.sh for OS X (no MemSan) --- tests/scripts/all.sh | 41 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh index 790af5b76..fb0fe2685 100755 --- a/tests/scripts/all.sh +++ b/tests/scripts/all.sh @@ -6,8 +6,8 @@ # CMake configuration. After this script is run, the CMake cache is lost and # CMake is not initialised any more! # -# Assumes gcc and clang (recent enough for using ASan with gcc and MemSen with -# clang) are available, as well as cmake and GNU find. +# Assumes gcc and clang (recent enough for using ASan with gcc and MemSan with +# clang, or valgrind) are available, as well as cmake and a "good" find. # Abort on errors (and uninitiliased variables) set -eu @@ -25,7 +25,7 @@ MEMORY=0 while [ $# -gt 0 ]; do case "$1" in -m*) - MEMORY=1 + MEMORY=${1#-m} ;; *) echo "Unknown argument: '$1'" >&2 @@ -58,7 +58,7 @@ msg() echo "" echo "******************************************************************" echo "* $1 " - echo -n "* "; date + printf "* "; date echo "******************************************************************" } @@ -130,6 +130,9 @@ msg "build: Unix make, -O2 (gcc)" # ~ 30s cleanup CC=gcc make +# MemSan currently only available on Linux +if [ `uname` = 'Linux' ]; then + msg "build: MSan (clang)" # ~ 1 min 20s cleanup cp "$CONFIG_H" "$CONFIG_BAK" @@ -155,6 +158,36 @@ if [ "$MEMORY" -gt 0 ]; then cd .. fi +else # no MemSan + +msg "build: Release (clang)" +cleanup +CC=clang cmake -D CMAKE_BUILD_TYPE:String=Release . +make + +msg "test: main suites valgrind (Release)" +make test + +# Optional part(s) +# Currently broken, programs don't seem to receive signals +# under valgrind on OS X + +if [ "$MEMORY" -gt 0 ]; then + msg "test: ssl-opt.sh --memcheck (Release)" + cd tests + ./ssl-opt.sh --memcheck + cd .. +fi + +if [ "$MEMORY" -gt 1 ]; then + msg "test: compat.sh --memcheck (Release)" + cd tests + ./compat.sh --memcheck + cd .. +fi + +fi # MemSan + msg "Done, cleaning up" cleanup From 813e585fe3811a885e190797a0b20289bb2096d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Mon, 26 Jan 2015 15:42:27 +0000 Subject: [PATCH 12/46] Rename in visual C script and templates --- .../data_files/vs2010-app-template.vcxproj | 8 ++++---- .../data_files/vs2010-main-template.vcxproj | 10 +++++----- scripts/data_files/vs2010-sln-template.sln | 2 +- scripts/data_files/vs6-main-template.dsp | 20 +++++++++---------- scripts/generate_visualc_files.pl | 16 +++++++-------- 5 files changed, 28 insertions(+), 28 deletions(-) diff --git a/scripts/data_files/vs2010-app-template.vcxproj b/scripts/data_files/vs2010-app-template.vcxproj index 9e2b47a50..593c22df9 100644 --- a/scripts/data_files/vs2010-app-template.vcxproj +++ b/scripts/data_files/vs2010-app-template.vcxproj @@ -22,7 +22,7 @@ - + {46cf2d25-6a36-4189-b59c-e4815388e554} @@ -96,7 +96,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -116,7 +116,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -140,7 +140,7 @@ true true Release - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib diff --git a/scripts/data_files/vs2010-main-template.vcxproj b/scripts/data_files/vs2010-main-template.vcxproj index 20d3de583..6e30ffe15 100644 --- a/scripts/data_files/vs2010-main-template.vcxproj +++ b/scripts/data_files/vs2010-main-template.vcxproj @@ -21,7 +21,7 @@ {46CF2D25-6A36-4189-B59C-E4815388E554} Win32Proj - PolarSSL + mbedTLS @@ -81,7 +81,7 @@ Level3 Disabled - WIN32;_DEBUG;_WINDOWS;_USRDLL;POLARSSL_EXPORTS;%(PreprocessorDefinitions) + WIN32;_DEBUG;_WINDOWS;_USRDLL;MBEDTLS_EXPORTS;%(PreprocessorDefinitions) ../../include CompileAsC @@ -96,7 +96,7 @@ Level3 Disabled - WIN32;_DEBUG;_WINDOWS;_USRDLL;POLARSSL_EXPORTS;%(PreprocessorDefinitions) + WIN32;_DEBUG;_WINDOWS;_USRDLL;MBEDTLS_EXPORTS;%(PreprocessorDefinitions) ../../include CompileAsC @@ -113,7 +113,7 @@ MaxSpeed true true - WIN32;NDEBUG;_WINDOWS;_USRDLL;POLARSSL_EXPORTS;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;MBEDTLS_EXPORTS;%(PreprocessorDefinitions) ../../include @@ -131,7 +131,7 @@ MaxSpeed true true - WIN64;NDEBUG;_WINDOWS;_USRDLL;POLARSSL_EXPORTS;%(PreprocessorDefinitions) + WIN64;NDEBUG;_WINDOWS;_USRDLL;MBEDTLS_EXPORTS;%(PreprocessorDefinitions) ../../include diff --git a/scripts/data_files/vs2010-sln-template.sln b/scripts/data_files/vs2010-sln-template.sln index c4c861380..78dcde8d1 100644 --- a/scripts/data_files/vs2010-sln-template.sln +++ b/scripts/data_files/vs2010-sln-template.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 11.00 # Visual C++ Express 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PolarSSL", "PolarSSL.vcxproj", "{46CF2D25-6A36-4189-B59C-E4815388E554}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mbedTLS", "mbedTLS.vcxproj", "{46CF2D25-6A36-4189-B59C-E4815388E554}" EndProject APP_ENTRIES Global diff --git a/scripts/data_files/vs6-main-template.dsp b/scripts/data_files/vs6-main-template.dsp index af4901f3b..dc728c489 100644 --- a/scripts/data_files/vs6-main-template.dsp +++ b/scripts/data_files/vs6-main-template.dsp @@ -1,24 +1,24 @@ -# Microsoft Developer Studio Project File - Name="polarssl" - Package Owner=<4> +# Microsoft Developer Studio Project File - Name="mbedtls" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Static Library" 0x0104 -CFG=polarssl - Win32 Debug +CFG=mbedtls - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE -!MESSAGE NMAKE /f "polarssl.mak". +!MESSAGE NMAKE /f "mbedtls.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE -!MESSAGE NMAKE /f "polarssl.mak" CFG="polarssl - Win32 Debug" +!MESSAGE NMAKE /f "mbedtls.mak" CFG="mbedtls - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE -!MESSAGE "polarssl - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "polarssl - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "mbedtls - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "mbedtls - Win32 Debug" (based on "Win32 (x86) Static Library") !MESSAGE # Begin Project @@ -28,7 +28,7 @@ CFG=polarssl - Win32 Debug CPP=cl.exe RSC=rc.exe -!IF "$(CFG)" == "polarssl - Win32 Release" +!IF "$(CFG)" == "mbedtls - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 @@ -51,7 +51,7 @@ LIB32=link.exe -lib # ADD BASE LIB32 /nologo # ADD LIB32 /nologo -!ELSEIF "$(CFG)" == "polarssl - Win32 Debug" +!ELSEIF "$(CFG)" == "mbedtls - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 @@ -78,8 +78,8 @@ LIB32=link.exe -lib # Begin Target -# Name "polarssl - Win32 Release" -# Name "polarssl - Win32 Debug" +# Name "mbedtls - Win32 Release" +# Name "mbedtls - Win32 Debug" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" diff --git a/scripts/generate_visualc_files.pl b/scripts/generate_visualc_files.pl index f6bf25ca6..d6f7104a2 100755 --- a/scripts/generate_visualc_files.pl +++ b/scripts/generate_visualc_files.pl @@ -4,7 +4,7 @@ # - for VS6: main project (library) file, individual app files, workspace # - for VS2010: main file, individual apps, solution file # -# Must be run from PolarSSL root or scripts directory. +# Must be run from mbedTLS root or scripts directory. # Takes no argument. use warnings; @@ -15,17 +15,17 @@ my $vs6_dir = "visualc/VS6"; my $vs6_ext = "dsp"; my $vs6_app_tpl_file = "scripts/data_files/vs6-app-template.$vs6_ext"; my $vs6_main_tpl_file = "scripts/data_files/vs6-main-template.$vs6_ext"; -my $vs6_main_file = "$vs6_dir/polarssl.$vs6_ext"; +my $vs6_main_file = "$vs6_dir/mbedtls.$vs6_ext"; my $vs6_wsp_tpl_file = "scripts/data_files/vs6-workspace-template.dsw"; -my $vs6_wsp_file = "$vs6_dir/polarssl.dsw"; +my $vs6_wsp_file = "$vs6_dir/mbedtls.dsw"; my $vsx_dir = "visualc/VS2010"; my $vsx_ext = "vcxproj"; my $vsx_app_tpl_file = "scripts/data_files/vs2010-app-template.$vsx_ext"; my $vsx_main_tpl_file = "scripts/data_files/vs2010-main-template.$vsx_ext"; -my $vsx_main_file = "$vsx_dir/PolarSSL.$vsx_ext"; +my $vsx_main_file = "$vsx_dir/mbedTLS.$vsx_ext"; my $vsx_sln_tpl_file = "scripts/data_files/vs2010-sln-template.sln"; -my $vsx_sln_file = "$vsx_dir/PolarSSL.sln"; +my $vsx_sln_file = "$vsx_dir/mbedTLS.sln"; my $programs_dir = 'programs'; my $header_dir = 'include/polarssl'; @@ -51,7 +51,7 @@ Package=<5>\r Package=<4>\r {{{\r Begin Project Dependency\r - Project_Dep_Name polarssl\r + Project_Dep_Name mbedtls\r End Project Dependency\r }}}\r \r @@ -115,7 +115,7 @@ sub content_to_file { sub gen_app_guid { my ($path) = @_; - my $guid = md5_hex( "PolarSSL:$path" ); + my $guid = md5_hex( "mbedTLS:$path" ); $guid =~ s/(.{8})(.{4})(.{4})(.{4})(.{12})/\U{$1-$2-$3-$4-$5}/; return $guid; @@ -222,7 +222,7 @@ sub gen_vsx_solution { sub main { if( ! check_dirs() ) { chdir '..' or die; - check_dirs or die "Must but run from PolarSSL root or scripts dir\n"; + check_dirs or die "Must but run from mbedTLS root or scripts dir\n"; } my @app_list = get_app_list(); From edaa9a02c4d1b7efcb7977042484bcc07d2cc2a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Mon, 26 Jan 2015 15:43:46 +0000 Subject: [PATCH 13/46] Generate VC files with new name --- visualc/VS2010/PolarSSL.sln | 585 -------- visualc/VS2010/aescrypt2.vcxproj | 10 +- visualc/VS2010/benchmark.vcxproj | 10 +- visualc/VS2010/cert_app.vcxproj | 10 +- visualc/VS2010/cert_req.vcxproj | 10 +- visualc/VS2010/crl_app.vcxproj | 10 +- visualc/VS2010/crypt_and_hash.vcxproj | 10 +- visualc/VS2010/dh_client.vcxproj | 10 +- visualc/VS2010/dh_genprime.vcxproj | 10 +- visualc/VS2010/dh_server.vcxproj | 10 +- visualc/VS2010/gen_entropy.vcxproj | 10 +- visualc/VS2010/gen_key.vcxproj | 10 +- visualc/VS2010/gen_random_ctr_drbg.vcxproj | 10 +- visualc/VS2010/gen_random_havege.vcxproj | 10 +- visualc/VS2010/generic_sum.vcxproj | 10 +- visualc/VS2010/hello.vcxproj | 10 +- visualc/VS2010/key_app.vcxproj | 10 +- visualc/VS2010/key_app_writer.vcxproj | 10 +- visualc/VS2010/mbedTLS.sln | 585 ++++++++ .../{PolarSSL.vcxproj => mbedTLS.vcxproj} | 568 +++---- visualc/VS2010/md5sum.vcxproj | 10 +- visualc/VS2010/mpi_demo.vcxproj | 10 +- visualc/VS2010/pem2der.vcxproj | 10 +- visualc/VS2010/pk_decrypt.vcxproj | 10 +- visualc/VS2010/pk_encrypt.vcxproj | 10 +- visualc/VS2010/pk_sign.vcxproj | 10 +- visualc/VS2010/pk_verify.vcxproj | 10 +- visualc/VS2010/rsa_decrypt.vcxproj | 10 +- visualc/VS2010/rsa_encrypt.vcxproj | 10 +- visualc/VS2010/rsa_genkey.vcxproj | 10 +- visualc/VS2010/rsa_sign.vcxproj | 10 +- visualc/VS2010/rsa_sign_pss.vcxproj | 10 +- visualc/VS2010/rsa_verify.vcxproj | 10 +- visualc/VS2010/rsa_verify_pss.vcxproj | 10 +- visualc/VS2010/selftest.vcxproj | 10 +- visualc/VS2010/sha1sum.vcxproj | 10 +- visualc/VS2010/sha2sum.vcxproj | 10 +- visualc/VS2010/ssl_cert_test.vcxproj | 10 +- visualc/VS2010/ssl_client1.vcxproj | 10 +- visualc/VS2010/ssl_client2.vcxproj | 10 +- visualc/VS2010/ssl_fork_server.vcxproj | 10 +- visualc/VS2010/ssl_mail_client.vcxproj | 10 +- visualc/VS2010/ssl_server.vcxproj | 10 +- visualc/VS2010/ssl_server2.vcxproj | 10 +- visualc/VS2010/ssl_test.vcxproj | 10 +- visualc/VS2010/strerror.vcxproj | 10 +- visualc/VS6/{polarssl.dsp => mbedtls.dsp} | 1248 ++++++++-------- visualc/VS6/{polarssl.dsw => mbedtls.dsw} | 1323 ++++++++--------- 48 files changed, 2369 insertions(+), 2370 deletions(-) delete mode 100644 visualc/VS2010/PolarSSL.sln create mode 100644 visualc/VS2010/mbedTLS.sln rename visualc/VS2010/{PolarSSL.vcxproj => mbedTLS.vcxproj} (94%) rename visualc/VS6/{polarssl.dsp => mbedtls.dsp} (90%) rename visualc/VS6/{polarssl.dsw => mbedtls.dsw} (84%) diff --git a/visualc/VS2010/PolarSSL.sln b/visualc/VS2010/PolarSSL.sln deleted file mode 100644 index c46a91a2b..000000000 --- a/visualc/VS2010/PolarSSL.sln +++ /dev/null @@ -1,585 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual C++ Express 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PolarSSL", "PolarSSL.vcxproj", "{46CF2D25-6A36-4189-B59C-E4815388E554}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "aescrypt2", "aescrypt2.vcxproj", "{46298485-CE22-B800-3D95-6D6C821819A1}" - ProjectSection(ProjectDependencies) = postProject - {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "crypt_and_hash", "crypt_and_hash.vcxproj", "{84F76F01-FA6C-7C48-1979-06FD24B476C1}" - ProjectSection(ProjectDependencies) = postProject - {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hello", "hello.vcxproj", "{7076F38E-EDC4-1A0C-8D9B-CFB0A3E9724F}" - ProjectSection(ProjectDependencies) = postProject - {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "generic_sum", "generic_sum.vcxproj", "{7036A174-35D6-54AE-7613-A50F5FD8AF86}" - ProjectSection(ProjectDependencies) = postProject - {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "md5sum", "md5sum.vcxproj", "{D4F79297-4960-6D63-D50E-5823C50ED124}" - ProjectSection(ProjectDependencies) = postProject - {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sha1sum", "sha1sum.vcxproj", "{A0278E64-D98F-842D-438A-6747411CE76F}" - ProjectSection(ProjectDependencies) = postProject - {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sha2sum", "sha2sum.vcxproj", "{BAF92F6C-E5BE-95B7-6E36-823A1779A818}" - ProjectSection(ProjectDependencies) = postProject - {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dh_client", "dh_client.vcxproj", "{92253FCF-72E1-7AF6-EAD1-E9037A194C9F}" - ProjectSection(ProjectDependencies) = postProject - {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dh_genprime", "dh_genprime.vcxproj", "{8972AF2C-6333-2827-F75D-3BAC5E07915A}" - ProjectSection(ProjectDependencies) = postProject - {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dh_server", "dh_server.vcxproj", "{9BB33B8B-A1D3-ABEF-9071-D92289A4CEED}" - ProjectSection(ProjectDependencies) = postProject - {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gen_key", "gen_key.vcxproj", "{7721EBA2-C892-AD9B-4994-A0E988BA4BF8}" - ProjectSection(ProjectDependencies) = postProject - {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "key_app", "key_app.vcxproj", "{5129B724-3FB6-CE34-FF51-57031A33C50B}" - ProjectSection(ProjectDependencies) = postProject - {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "key_app_writer", "key_app_writer.vcxproj", "{090B665D-0F4C-4D77-D1B1-A6D882842AA3}" - ProjectSection(ProjectDependencies) = postProject - {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mpi_demo", "mpi_demo.vcxproj", "{08A79AF8-5B8A-4343-D01A-B8AB47F3366C}" - ProjectSection(ProjectDependencies) = postProject - {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pk_decrypt", "pk_decrypt.vcxproj", "{C69CD150-7174-FA91-9E6E-B7DDD56FDE8E}" - ProjectSection(ProjectDependencies) = postProject - {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pk_encrypt", "pk_encrypt.vcxproj", "{239051A9-0CE6-7730-7BB0-83599DC37AA4}" - ProjectSection(ProjectDependencies) = postProject - {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pk_sign", "pk_sign.vcxproj", "{EBDBB632-13A2-45F8-A44E-4837F6467512}" - ProjectSection(ProjectDependencies) = postProject - {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pk_verify", "pk_verify.vcxproj", "{CA8D1EDA-2881-55E0-8F1C-B379B5AA7B56}" - ProjectSection(ProjectDependencies) = postProject - {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rsa_genkey", "rsa_genkey.vcxproj", "{AD5B2F84-44A2-8D21-D47D-07E0ED7E0AAD}" - ProjectSection(ProjectDependencies) = postProject - {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rsa_decrypt", "rsa_decrypt.vcxproj", "{7E3D99BD-3D9E-762A-E235-9C8275E7010F}" - ProjectSection(ProjectDependencies) = postProject - {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rsa_encrypt", "rsa_encrypt.vcxproj", "{DA85604D-9ED1-FD08-4F37-FBD33E5E3642}" - ProjectSection(ProjectDependencies) = postProject - {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rsa_sign", "rsa_sign.vcxproj", "{CFC883CE-9BAE-B26F-B08B-7F194AD35929}" - ProjectSection(ProjectDependencies) = postProject - {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rsa_verify", "rsa_verify.vcxproj", "{77834257-2878-A38D-AEBE-79423968B6DB}" - ProjectSection(ProjectDependencies) = postProject - {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rsa_sign_pss", "rsa_sign_pss.vcxproj", "{34A00BC1-32A6-5145-606F-F081D31CC1D1}" - ProjectSection(ProjectDependencies) = postProject - {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rsa_verify_pss", "rsa_verify_pss.vcxproj", "{DAD91B2F-DEC8-E94F-8D9A-66B6E237AF07}" - ProjectSection(ProjectDependencies) = postProject - {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssl_client1", "ssl_client1.vcxproj", "{CE90D346-EBC0-D292-6D68-24717DB3F510}" - ProjectSection(ProjectDependencies) = postProject - {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssl_client2", "ssl_client2.vcxproj", "{436AF1C2-99E7-32FA-5BFA-641F1FF2C57D}" - ProjectSection(ProjectDependencies) = postProject - {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssl_server", "ssl_server.vcxproj", "{C49B1EF8-D169-70C5-2FA4-837A900267A7}" - ProjectSection(ProjectDependencies) = postProject - {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssl_server2", "ssl_server2.vcxproj", "{870B39B9-8F38-D9A4-8A07-87047C565061}" - ProjectSection(ProjectDependencies) = postProject - {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssl_fork_server", "ssl_fork_server.vcxproj", "{D8295912-D341-F4E4-DC8E-98A2A0604221}" - ProjectSection(ProjectDependencies) = postProject - {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssl_mail_client", "ssl_mail_client.vcxproj", "{68EFA4E3-08B0-2925-0EF6-177996B08B24}" - ProjectSection(ProjectDependencies) = postProject - {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gen_entropy", "gen_entropy.vcxproj", "{2E5B8634-26AC-5819-5AF7-16F996A7F529}" - ProjectSection(ProjectDependencies) = postProject - {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gen_random_havege", "gen_random_havege.vcxproj", "{D93D1FF0-5E83-2247-31A0-017D20F8011F}" - ProjectSection(ProjectDependencies) = postProject - {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gen_random_ctr_drbg", "gen_random_ctr_drbg.vcxproj", "{C5DF2F0C-3EFC-E5D6-7FD2-AD599CADDB15}" - ProjectSection(ProjectDependencies) = postProject - {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssl_cert_test", "ssl_cert_test.vcxproj", "{173A0BC9-FF81-3C36-7887-4FBD6032C9FD}" - ProjectSection(ProjectDependencies) = postProject - {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "benchmark", "benchmark.vcxproj", "{58A8E53D-21CB-5F27-5111-737EBD3F37A0}" - ProjectSection(ProjectDependencies) = postProject - {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "selftest", "selftest.vcxproj", "{4DD758B5-6FC5-66C0-1D26-22C74C88FEF3}" - ProjectSection(ProjectDependencies) = postProject - {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssl_test", "ssl_test.vcxproj", "{0FC4D326-CF64-AB19-B037-3E3D06EA6798}" - ProjectSection(ProjectDependencies) = postProject - {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pem2der", "pem2der.vcxproj", "{ACFFE3C9-3628-9B99-E0C9-36CF95F86B5F}" - ProjectSection(ProjectDependencies) = postProject - {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "strerror", "strerror.vcxproj", "{9D625831-AF31-CFBA-8855-61C024DA2DE0}" - ProjectSection(ProjectDependencies) = postProject - {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cert_app", "cert_app.vcxproj", "{E3172E20-4935-69C7-A398-C13EAA76818F}" - ProjectSection(ProjectDependencies) = postProject - {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "crl_app", "crl_app.vcxproj", "{10F967D6-468F-3BCA-2D58-36A32E376930}" - ProjectSection(ProjectDependencies) = postProject - {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cert_req", "cert_req.vcxproj", "{5ABF68F6-5360-DE1F-74B6-66ED5BF52619}" - ProjectSection(ProjectDependencies) = postProject - {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {46CF2D25-6A36-4189-B59C-E4815388E554}.Debug|Win32.ActiveCfg = Debug|Win32 - {46CF2D25-6A36-4189-B59C-E4815388E554}.Debug|Win32.Build.0 = Debug|Win32 - {46CF2D25-6A36-4189-B59C-E4815388E554}.Debug|x64.ActiveCfg = Debug|x64 - {46CF2D25-6A36-4189-B59C-E4815388E554}.Debug|x64.Build.0 = Debug|x64 - {46CF2D25-6A36-4189-B59C-E4815388E554}.Release|Win32.ActiveCfg = Release|Win32 - {46CF2D25-6A36-4189-B59C-E4815388E554}.Release|Win32.Build.0 = Release|Win32 - {46CF2D25-6A36-4189-B59C-E4815388E554}.Release|x64.ActiveCfg = Release|x64 - {46CF2D25-6A36-4189-B59C-E4815388E554}.Release|x64.Build.0 = Release|x64 - {46298485-CE22-B800-3D95-6D6C821819A1}.Debug|Win32.ActiveCfg = Debug|Win32 - {46298485-CE22-B800-3D95-6D6C821819A1}.Debug|Win32.Build.0 = Debug|Win32 - {46298485-CE22-B800-3D95-6D6C821819A1}.Debug|x64.ActiveCfg = Debug|x64 - {46298485-CE22-B800-3D95-6D6C821819A1}.Debug|x64.Build.0 = Debug|x64 - {46298485-CE22-B800-3D95-6D6C821819A1}.Release|Win32.ActiveCfg = Release|Win32 - {46298485-CE22-B800-3D95-6D6C821819A1}.Release|Win32.Build.0 = Release|Win32 - {46298485-CE22-B800-3D95-6D6C821819A1}.Release|x64.ActiveCfg = Release|x64 - {46298485-CE22-B800-3D95-6D6C821819A1}.Release|x64.Build.0 = Release|x64 - {84F76F01-FA6C-7C48-1979-06FD24B476C1}.Debug|Win32.ActiveCfg = Debug|Win32 - {84F76F01-FA6C-7C48-1979-06FD24B476C1}.Debug|Win32.Build.0 = Debug|Win32 - {84F76F01-FA6C-7C48-1979-06FD24B476C1}.Debug|x64.ActiveCfg = Debug|x64 - {84F76F01-FA6C-7C48-1979-06FD24B476C1}.Debug|x64.Build.0 = Debug|x64 - {84F76F01-FA6C-7C48-1979-06FD24B476C1}.Release|Win32.ActiveCfg = Release|Win32 - {84F76F01-FA6C-7C48-1979-06FD24B476C1}.Release|Win32.Build.0 = Release|Win32 - {84F76F01-FA6C-7C48-1979-06FD24B476C1}.Release|x64.ActiveCfg = Release|x64 - {84F76F01-FA6C-7C48-1979-06FD24B476C1}.Release|x64.Build.0 = Release|x64 - {7076F38E-EDC4-1A0C-8D9B-CFB0A3E9724F}.Debug|Win32.ActiveCfg = Debug|Win32 - {7076F38E-EDC4-1A0C-8D9B-CFB0A3E9724F}.Debug|Win32.Build.0 = Debug|Win32 - {7076F38E-EDC4-1A0C-8D9B-CFB0A3E9724F}.Debug|x64.ActiveCfg = Debug|x64 - {7076F38E-EDC4-1A0C-8D9B-CFB0A3E9724F}.Debug|x64.Build.0 = Debug|x64 - {7076F38E-EDC4-1A0C-8D9B-CFB0A3E9724F}.Release|Win32.ActiveCfg = Release|Win32 - {7076F38E-EDC4-1A0C-8D9B-CFB0A3E9724F}.Release|Win32.Build.0 = Release|Win32 - {7076F38E-EDC4-1A0C-8D9B-CFB0A3E9724F}.Release|x64.ActiveCfg = Release|x64 - {7076F38E-EDC4-1A0C-8D9B-CFB0A3E9724F}.Release|x64.Build.0 = Release|x64 - {7036A174-35D6-54AE-7613-A50F5FD8AF86}.Debug|Win32.ActiveCfg = Debug|Win32 - {7036A174-35D6-54AE-7613-A50F5FD8AF86}.Debug|Win32.Build.0 = Debug|Win32 - {7036A174-35D6-54AE-7613-A50F5FD8AF86}.Debug|x64.ActiveCfg = Debug|x64 - {7036A174-35D6-54AE-7613-A50F5FD8AF86}.Debug|x64.Build.0 = Debug|x64 - {7036A174-35D6-54AE-7613-A50F5FD8AF86}.Release|Win32.ActiveCfg = Release|Win32 - {7036A174-35D6-54AE-7613-A50F5FD8AF86}.Release|Win32.Build.0 = Release|Win32 - {7036A174-35D6-54AE-7613-A50F5FD8AF86}.Release|x64.ActiveCfg = Release|x64 - {7036A174-35D6-54AE-7613-A50F5FD8AF86}.Release|x64.Build.0 = Release|x64 - {D4F79297-4960-6D63-D50E-5823C50ED124}.Debug|Win32.ActiveCfg = Debug|Win32 - {D4F79297-4960-6D63-D50E-5823C50ED124}.Debug|Win32.Build.0 = Debug|Win32 - {D4F79297-4960-6D63-D50E-5823C50ED124}.Debug|x64.ActiveCfg = Debug|x64 - {D4F79297-4960-6D63-D50E-5823C50ED124}.Debug|x64.Build.0 = Debug|x64 - {D4F79297-4960-6D63-D50E-5823C50ED124}.Release|Win32.ActiveCfg = Release|Win32 - {D4F79297-4960-6D63-D50E-5823C50ED124}.Release|Win32.Build.0 = Release|Win32 - {D4F79297-4960-6D63-D50E-5823C50ED124}.Release|x64.ActiveCfg = Release|x64 - {D4F79297-4960-6D63-D50E-5823C50ED124}.Release|x64.Build.0 = Release|x64 - {A0278E64-D98F-842D-438A-6747411CE76F}.Debug|Win32.ActiveCfg = Debug|Win32 - {A0278E64-D98F-842D-438A-6747411CE76F}.Debug|Win32.Build.0 = Debug|Win32 - {A0278E64-D98F-842D-438A-6747411CE76F}.Debug|x64.ActiveCfg = Debug|x64 - {A0278E64-D98F-842D-438A-6747411CE76F}.Debug|x64.Build.0 = Debug|x64 - {A0278E64-D98F-842D-438A-6747411CE76F}.Release|Win32.ActiveCfg = Release|Win32 - {A0278E64-D98F-842D-438A-6747411CE76F}.Release|Win32.Build.0 = Release|Win32 - {A0278E64-D98F-842D-438A-6747411CE76F}.Release|x64.ActiveCfg = Release|x64 - {A0278E64-D98F-842D-438A-6747411CE76F}.Release|x64.Build.0 = Release|x64 - {BAF92F6C-E5BE-95B7-6E36-823A1779A818}.Debug|Win32.ActiveCfg = Debug|Win32 - {BAF92F6C-E5BE-95B7-6E36-823A1779A818}.Debug|Win32.Build.0 = Debug|Win32 - {BAF92F6C-E5BE-95B7-6E36-823A1779A818}.Debug|x64.ActiveCfg = Debug|x64 - {BAF92F6C-E5BE-95B7-6E36-823A1779A818}.Debug|x64.Build.0 = Debug|x64 - {BAF92F6C-E5BE-95B7-6E36-823A1779A818}.Release|Win32.ActiveCfg = Release|Win32 - {BAF92F6C-E5BE-95B7-6E36-823A1779A818}.Release|Win32.Build.0 = Release|Win32 - {BAF92F6C-E5BE-95B7-6E36-823A1779A818}.Release|x64.ActiveCfg = Release|x64 - {BAF92F6C-E5BE-95B7-6E36-823A1779A818}.Release|x64.Build.0 = Release|x64 - {92253FCF-72E1-7AF6-EAD1-E9037A194C9F}.Debug|Win32.ActiveCfg = Debug|Win32 - {92253FCF-72E1-7AF6-EAD1-E9037A194C9F}.Debug|Win32.Build.0 = Debug|Win32 - {92253FCF-72E1-7AF6-EAD1-E9037A194C9F}.Debug|x64.ActiveCfg = Debug|x64 - {92253FCF-72E1-7AF6-EAD1-E9037A194C9F}.Debug|x64.Build.0 = Debug|x64 - {92253FCF-72E1-7AF6-EAD1-E9037A194C9F}.Release|Win32.ActiveCfg = Release|Win32 - {92253FCF-72E1-7AF6-EAD1-E9037A194C9F}.Release|Win32.Build.0 = Release|Win32 - {92253FCF-72E1-7AF6-EAD1-E9037A194C9F}.Release|x64.ActiveCfg = Release|x64 - {92253FCF-72E1-7AF6-EAD1-E9037A194C9F}.Release|x64.Build.0 = Release|x64 - {8972AF2C-6333-2827-F75D-3BAC5E07915A}.Debug|Win32.ActiveCfg = Debug|Win32 - {8972AF2C-6333-2827-F75D-3BAC5E07915A}.Debug|Win32.Build.0 = Debug|Win32 - {8972AF2C-6333-2827-F75D-3BAC5E07915A}.Debug|x64.ActiveCfg = Debug|x64 - {8972AF2C-6333-2827-F75D-3BAC5E07915A}.Debug|x64.Build.0 = Debug|x64 - {8972AF2C-6333-2827-F75D-3BAC5E07915A}.Release|Win32.ActiveCfg = Release|Win32 - {8972AF2C-6333-2827-F75D-3BAC5E07915A}.Release|Win32.Build.0 = Release|Win32 - {8972AF2C-6333-2827-F75D-3BAC5E07915A}.Release|x64.ActiveCfg = Release|x64 - {8972AF2C-6333-2827-F75D-3BAC5E07915A}.Release|x64.Build.0 = Release|x64 - {9BB33B8B-A1D3-ABEF-9071-D92289A4CEED}.Debug|Win32.ActiveCfg = Debug|Win32 - {9BB33B8B-A1D3-ABEF-9071-D92289A4CEED}.Debug|Win32.Build.0 = Debug|Win32 - {9BB33B8B-A1D3-ABEF-9071-D92289A4CEED}.Debug|x64.ActiveCfg = Debug|x64 - {9BB33B8B-A1D3-ABEF-9071-D92289A4CEED}.Debug|x64.Build.0 = Debug|x64 - {9BB33B8B-A1D3-ABEF-9071-D92289A4CEED}.Release|Win32.ActiveCfg = Release|Win32 - {9BB33B8B-A1D3-ABEF-9071-D92289A4CEED}.Release|Win32.Build.0 = Release|Win32 - {9BB33B8B-A1D3-ABEF-9071-D92289A4CEED}.Release|x64.ActiveCfg = Release|x64 - {9BB33B8B-A1D3-ABEF-9071-D92289A4CEED}.Release|x64.Build.0 = Release|x64 - {7721EBA2-C892-AD9B-4994-A0E988BA4BF8}.Debug|Win32.ActiveCfg = Debug|Win32 - {7721EBA2-C892-AD9B-4994-A0E988BA4BF8}.Debug|Win32.Build.0 = Debug|Win32 - {7721EBA2-C892-AD9B-4994-A0E988BA4BF8}.Debug|x64.ActiveCfg = Debug|x64 - {7721EBA2-C892-AD9B-4994-A0E988BA4BF8}.Debug|x64.Build.0 = Debug|x64 - {7721EBA2-C892-AD9B-4994-A0E988BA4BF8}.Release|Win32.ActiveCfg = Release|Win32 - {7721EBA2-C892-AD9B-4994-A0E988BA4BF8}.Release|Win32.Build.0 = Release|Win32 - {7721EBA2-C892-AD9B-4994-A0E988BA4BF8}.Release|x64.ActiveCfg = Release|x64 - {7721EBA2-C892-AD9B-4994-A0E988BA4BF8}.Release|x64.Build.0 = Release|x64 - {5129B724-3FB6-CE34-FF51-57031A33C50B}.Debug|Win32.ActiveCfg = Debug|Win32 - {5129B724-3FB6-CE34-FF51-57031A33C50B}.Debug|Win32.Build.0 = Debug|Win32 - {5129B724-3FB6-CE34-FF51-57031A33C50B}.Debug|x64.ActiveCfg = Debug|x64 - {5129B724-3FB6-CE34-FF51-57031A33C50B}.Debug|x64.Build.0 = Debug|x64 - {5129B724-3FB6-CE34-FF51-57031A33C50B}.Release|Win32.ActiveCfg = Release|Win32 - {5129B724-3FB6-CE34-FF51-57031A33C50B}.Release|Win32.Build.0 = Release|Win32 - {5129B724-3FB6-CE34-FF51-57031A33C50B}.Release|x64.ActiveCfg = Release|x64 - {5129B724-3FB6-CE34-FF51-57031A33C50B}.Release|x64.Build.0 = Release|x64 - {090B665D-0F4C-4D77-D1B1-A6D882842AA3}.Debug|Win32.ActiveCfg = Debug|Win32 - {090B665D-0F4C-4D77-D1B1-A6D882842AA3}.Debug|Win32.Build.0 = Debug|Win32 - {090B665D-0F4C-4D77-D1B1-A6D882842AA3}.Debug|x64.ActiveCfg = Debug|x64 - {090B665D-0F4C-4D77-D1B1-A6D882842AA3}.Debug|x64.Build.0 = Debug|x64 - {090B665D-0F4C-4D77-D1B1-A6D882842AA3}.Release|Win32.ActiveCfg = Release|Win32 - {090B665D-0F4C-4D77-D1B1-A6D882842AA3}.Release|Win32.Build.0 = Release|Win32 - {090B665D-0F4C-4D77-D1B1-A6D882842AA3}.Release|x64.ActiveCfg = Release|x64 - {090B665D-0F4C-4D77-D1B1-A6D882842AA3}.Release|x64.Build.0 = Release|x64 - {08A79AF8-5B8A-4343-D01A-B8AB47F3366C}.Debug|Win32.ActiveCfg = Debug|Win32 - {08A79AF8-5B8A-4343-D01A-B8AB47F3366C}.Debug|Win32.Build.0 = Debug|Win32 - {08A79AF8-5B8A-4343-D01A-B8AB47F3366C}.Debug|x64.ActiveCfg = Debug|x64 - {08A79AF8-5B8A-4343-D01A-B8AB47F3366C}.Debug|x64.Build.0 = Debug|x64 - {08A79AF8-5B8A-4343-D01A-B8AB47F3366C}.Release|Win32.ActiveCfg = Release|Win32 - {08A79AF8-5B8A-4343-D01A-B8AB47F3366C}.Release|Win32.Build.0 = Release|Win32 - {08A79AF8-5B8A-4343-D01A-B8AB47F3366C}.Release|x64.ActiveCfg = Release|x64 - {08A79AF8-5B8A-4343-D01A-B8AB47F3366C}.Release|x64.Build.0 = Release|x64 - {C69CD150-7174-FA91-9E6E-B7DDD56FDE8E}.Debug|Win32.ActiveCfg = Debug|Win32 - {C69CD150-7174-FA91-9E6E-B7DDD56FDE8E}.Debug|Win32.Build.0 = Debug|Win32 - {C69CD150-7174-FA91-9E6E-B7DDD56FDE8E}.Debug|x64.ActiveCfg = Debug|x64 - {C69CD150-7174-FA91-9E6E-B7DDD56FDE8E}.Debug|x64.Build.0 = Debug|x64 - {C69CD150-7174-FA91-9E6E-B7DDD56FDE8E}.Release|Win32.ActiveCfg = Release|Win32 - {C69CD150-7174-FA91-9E6E-B7DDD56FDE8E}.Release|Win32.Build.0 = Release|Win32 - {C69CD150-7174-FA91-9E6E-B7DDD56FDE8E}.Release|x64.ActiveCfg = Release|x64 - {C69CD150-7174-FA91-9E6E-B7DDD56FDE8E}.Release|x64.Build.0 = Release|x64 - {239051A9-0CE6-7730-7BB0-83599DC37AA4}.Debug|Win32.ActiveCfg = Debug|Win32 - {239051A9-0CE6-7730-7BB0-83599DC37AA4}.Debug|Win32.Build.0 = Debug|Win32 - {239051A9-0CE6-7730-7BB0-83599DC37AA4}.Debug|x64.ActiveCfg = Debug|x64 - {239051A9-0CE6-7730-7BB0-83599DC37AA4}.Debug|x64.Build.0 = Debug|x64 - {239051A9-0CE6-7730-7BB0-83599DC37AA4}.Release|Win32.ActiveCfg = Release|Win32 - {239051A9-0CE6-7730-7BB0-83599DC37AA4}.Release|Win32.Build.0 = Release|Win32 - {239051A9-0CE6-7730-7BB0-83599DC37AA4}.Release|x64.ActiveCfg = Release|x64 - {239051A9-0CE6-7730-7BB0-83599DC37AA4}.Release|x64.Build.0 = Release|x64 - {EBDBB632-13A2-45F8-A44E-4837F6467512}.Debug|Win32.ActiveCfg = Debug|Win32 - {EBDBB632-13A2-45F8-A44E-4837F6467512}.Debug|Win32.Build.0 = Debug|Win32 - {EBDBB632-13A2-45F8-A44E-4837F6467512}.Debug|x64.ActiveCfg = Debug|x64 - {EBDBB632-13A2-45F8-A44E-4837F6467512}.Debug|x64.Build.0 = Debug|x64 - {EBDBB632-13A2-45F8-A44E-4837F6467512}.Release|Win32.ActiveCfg = Release|Win32 - {EBDBB632-13A2-45F8-A44E-4837F6467512}.Release|Win32.Build.0 = Release|Win32 - {EBDBB632-13A2-45F8-A44E-4837F6467512}.Release|x64.ActiveCfg = Release|x64 - {EBDBB632-13A2-45F8-A44E-4837F6467512}.Release|x64.Build.0 = Release|x64 - {CA8D1EDA-2881-55E0-8F1C-B379B5AA7B56}.Debug|Win32.ActiveCfg = Debug|Win32 - {CA8D1EDA-2881-55E0-8F1C-B379B5AA7B56}.Debug|Win32.Build.0 = Debug|Win32 - {CA8D1EDA-2881-55E0-8F1C-B379B5AA7B56}.Debug|x64.ActiveCfg = Debug|x64 - {CA8D1EDA-2881-55E0-8F1C-B379B5AA7B56}.Debug|x64.Build.0 = Debug|x64 - {CA8D1EDA-2881-55E0-8F1C-B379B5AA7B56}.Release|Win32.ActiveCfg = Release|Win32 - {CA8D1EDA-2881-55E0-8F1C-B379B5AA7B56}.Release|Win32.Build.0 = Release|Win32 - {CA8D1EDA-2881-55E0-8F1C-B379B5AA7B56}.Release|x64.ActiveCfg = Release|x64 - {CA8D1EDA-2881-55E0-8F1C-B379B5AA7B56}.Release|x64.Build.0 = Release|x64 - {AD5B2F84-44A2-8D21-D47D-07E0ED7E0AAD}.Debug|Win32.ActiveCfg = Debug|Win32 - {AD5B2F84-44A2-8D21-D47D-07E0ED7E0AAD}.Debug|Win32.Build.0 = Debug|Win32 - {AD5B2F84-44A2-8D21-D47D-07E0ED7E0AAD}.Debug|x64.ActiveCfg = Debug|x64 - {AD5B2F84-44A2-8D21-D47D-07E0ED7E0AAD}.Debug|x64.Build.0 = Debug|x64 - {AD5B2F84-44A2-8D21-D47D-07E0ED7E0AAD}.Release|Win32.ActiveCfg = Release|Win32 - {AD5B2F84-44A2-8D21-D47D-07E0ED7E0AAD}.Release|Win32.Build.0 = Release|Win32 - {AD5B2F84-44A2-8D21-D47D-07E0ED7E0AAD}.Release|x64.ActiveCfg = Release|x64 - {AD5B2F84-44A2-8D21-D47D-07E0ED7E0AAD}.Release|x64.Build.0 = Release|x64 - {7E3D99BD-3D9E-762A-E235-9C8275E7010F}.Debug|Win32.ActiveCfg = Debug|Win32 - {7E3D99BD-3D9E-762A-E235-9C8275E7010F}.Debug|Win32.Build.0 = Debug|Win32 - {7E3D99BD-3D9E-762A-E235-9C8275E7010F}.Debug|x64.ActiveCfg = Debug|x64 - {7E3D99BD-3D9E-762A-E235-9C8275E7010F}.Debug|x64.Build.0 = Debug|x64 - {7E3D99BD-3D9E-762A-E235-9C8275E7010F}.Release|Win32.ActiveCfg = Release|Win32 - {7E3D99BD-3D9E-762A-E235-9C8275E7010F}.Release|Win32.Build.0 = Release|Win32 - {7E3D99BD-3D9E-762A-E235-9C8275E7010F}.Release|x64.ActiveCfg = Release|x64 - {7E3D99BD-3D9E-762A-E235-9C8275E7010F}.Release|x64.Build.0 = Release|x64 - {DA85604D-9ED1-FD08-4F37-FBD33E5E3642}.Debug|Win32.ActiveCfg = Debug|Win32 - {DA85604D-9ED1-FD08-4F37-FBD33E5E3642}.Debug|Win32.Build.0 = Debug|Win32 - {DA85604D-9ED1-FD08-4F37-FBD33E5E3642}.Debug|x64.ActiveCfg = Debug|x64 - {DA85604D-9ED1-FD08-4F37-FBD33E5E3642}.Debug|x64.Build.0 = Debug|x64 - {DA85604D-9ED1-FD08-4F37-FBD33E5E3642}.Release|Win32.ActiveCfg = Release|Win32 - {DA85604D-9ED1-FD08-4F37-FBD33E5E3642}.Release|Win32.Build.0 = Release|Win32 - {DA85604D-9ED1-FD08-4F37-FBD33E5E3642}.Release|x64.ActiveCfg = Release|x64 - {DA85604D-9ED1-FD08-4F37-FBD33E5E3642}.Release|x64.Build.0 = Release|x64 - {CFC883CE-9BAE-B26F-B08B-7F194AD35929}.Debug|Win32.ActiveCfg = Debug|Win32 - {CFC883CE-9BAE-B26F-B08B-7F194AD35929}.Debug|Win32.Build.0 = Debug|Win32 - {CFC883CE-9BAE-B26F-B08B-7F194AD35929}.Debug|x64.ActiveCfg = Debug|x64 - {CFC883CE-9BAE-B26F-B08B-7F194AD35929}.Debug|x64.Build.0 = Debug|x64 - {CFC883CE-9BAE-B26F-B08B-7F194AD35929}.Release|Win32.ActiveCfg = Release|Win32 - {CFC883CE-9BAE-B26F-B08B-7F194AD35929}.Release|Win32.Build.0 = Release|Win32 - {CFC883CE-9BAE-B26F-B08B-7F194AD35929}.Release|x64.ActiveCfg = Release|x64 - {CFC883CE-9BAE-B26F-B08B-7F194AD35929}.Release|x64.Build.0 = Release|x64 - {77834257-2878-A38D-AEBE-79423968B6DB}.Debug|Win32.ActiveCfg = Debug|Win32 - {77834257-2878-A38D-AEBE-79423968B6DB}.Debug|Win32.Build.0 = Debug|Win32 - {77834257-2878-A38D-AEBE-79423968B6DB}.Debug|x64.ActiveCfg = Debug|x64 - {77834257-2878-A38D-AEBE-79423968B6DB}.Debug|x64.Build.0 = Debug|x64 - {77834257-2878-A38D-AEBE-79423968B6DB}.Release|Win32.ActiveCfg = Release|Win32 - {77834257-2878-A38D-AEBE-79423968B6DB}.Release|Win32.Build.0 = Release|Win32 - {77834257-2878-A38D-AEBE-79423968B6DB}.Release|x64.ActiveCfg = Release|x64 - {77834257-2878-A38D-AEBE-79423968B6DB}.Release|x64.Build.0 = Release|x64 - {34A00BC1-32A6-5145-606F-F081D31CC1D1}.Debug|Win32.ActiveCfg = Debug|Win32 - {34A00BC1-32A6-5145-606F-F081D31CC1D1}.Debug|Win32.Build.0 = Debug|Win32 - {34A00BC1-32A6-5145-606F-F081D31CC1D1}.Debug|x64.ActiveCfg = Debug|x64 - {34A00BC1-32A6-5145-606F-F081D31CC1D1}.Debug|x64.Build.0 = Debug|x64 - {34A00BC1-32A6-5145-606F-F081D31CC1D1}.Release|Win32.ActiveCfg = Release|Win32 - {34A00BC1-32A6-5145-606F-F081D31CC1D1}.Release|Win32.Build.0 = Release|Win32 - {34A00BC1-32A6-5145-606F-F081D31CC1D1}.Release|x64.ActiveCfg = Release|x64 - {34A00BC1-32A6-5145-606F-F081D31CC1D1}.Release|x64.Build.0 = Release|x64 - {DAD91B2F-DEC8-E94F-8D9A-66B6E237AF07}.Debug|Win32.ActiveCfg = Debug|Win32 - {DAD91B2F-DEC8-E94F-8D9A-66B6E237AF07}.Debug|Win32.Build.0 = Debug|Win32 - {DAD91B2F-DEC8-E94F-8D9A-66B6E237AF07}.Debug|x64.ActiveCfg = Debug|x64 - {DAD91B2F-DEC8-E94F-8D9A-66B6E237AF07}.Debug|x64.Build.0 = Debug|x64 - {DAD91B2F-DEC8-E94F-8D9A-66B6E237AF07}.Release|Win32.ActiveCfg = Release|Win32 - {DAD91B2F-DEC8-E94F-8D9A-66B6E237AF07}.Release|Win32.Build.0 = Release|Win32 - {DAD91B2F-DEC8-E94F-8D9A-66B6E237AF07}.Release|x64.ActiveCfg = Release|x64 - {DAD91B2F-DEC8-E94F-8D9A-66B6E237AF07}.Release|x64.Build.0 = Release|x64 - {CE90D346-EBC0-D292-6D68-24717DB3F510}.Debug|Win32.ActiveCfg = Debug|Win32 - {CE90D346-EBC0-D292-6D68-24717DB3F510}.Debug|Win32.Build.0 = Debug|Win32 - {CE90D346-EBC0-D292-6D68-24717DB3F510}.Debug|x64.ActiveCfg = Debug|x64 - {CE90D346-EBC0-D292-6D68-24717DB3F510}.Debug|x64.Build.0 = Debug|x64 - {CE90D346-EBC0-D292-6D68-24717DB3F510}.Release|Win32.ActiveCfg = Release|Win32 - {CE90D346-EBC0-D292-6D68-24717DB3F510}.Release|Win32.Build.0 = Release|Win32 - {CE90D346-EBC0-D292-6D68-24717DB3F510}.Release|x64.ActiveCfg = Release|x64 - {CE90D346-EBC0-D292-6D68-24717DB3F510}.Release|x64.Build.0 = Release|x64 - {436AF1C2-99E7-32FA-5BFA-641F1FF2C57D}.Debug|Win32.ActiveCfg = Debug|Win32 - {436AF1C2-99E7-32FA-5BFA-641F1FF2C57D}.Debug|Win32.Build.0 = Debug|Win32 - {436AF1C2-99E7-32FA-5BFA-641F1FF2C57D}.Debug|x64.ActiveCfg = Debug|x64 - {436AF1C2-99E7-32FA-5BFA-641F1FF2C57D}.Debug|x64.Build.0 = Debug|x64 - {436AF1C2-99E7-32FA-5BFA-641F1FF2C57D}.Release|Win32.ActiveCfg = Release|Win32 - {436AF1C2-99E7-32FA-5BFA-641F1FF2C57D}.Release|Win32.Build.0 = Release|Win32 - {436AF1C2-99E7-32FA-5BFA-641F1FF2C57D}.Release|x64.ActiveCfg = Release|x64 - {436AF1C2-99E7-32FA-5BFA-641F1FF2C57D}.Release|x64.Build.0 = Release|x64 - {C49B1EF8-D169-70C5-2FA4-837A900267A7}.Debug|Win32.ActiveCfg = Debug|Win32 - {C49B1EF8-D169-70C5-2FA4-837A900267A7}.Debug|Win32.Build.0 = Debug|Win32 - {C49B1EF8-D169-70C5-2FA4-837A900267A7}.Debug|x64.ActiveCfg = Debug|x64 - {C49B1EF8-D169-70C5-2FA4-837A900267A7}.Debug|x64.Build.0 = Debug|x64 - {C49B1EF8-D169-70C5-2FA4-837A900267A7}.Release|Win32.ActiveCfg = Release|Win32 - {C49B1EF8-D169-70C5-2FA4-837A900267A7}.Release|Win32.Build.0 = Release|Win32 - {C49B1EF8-D169-70C5-2FA4-837A900267A7}.Release|x64.ActiveCfg = Release|x64 - {C49B1EF8-D169-70C5-2FA4-837A900267A7}.Release|x64.Build.0 = Release|x64 - {870B39B9-8F38-D9A4-8A07-87047C565061}.Debug|Win32.ActiveCfg = Debug|Win32 - {870B39B9-8F38-D9A4-8A07-87047C565061}.Debug|Win32.Build.0 = Debug|Win32 - {870B39B9-8F38-D9A4-8A07-87047C565061}.Debug|x64.ActiveCfg = Debug|x64 - {870B39B9-8F38-D9A4-8A07-87047C565061}.Debug|x64.Build.0 = Debug|x64 - {870B39B9-8F38-D9A4-8A07-87047C565061}.Release|Win32.ActiveCfg = Release|Win32 - {870B39B9-8F38-D9A4-8A07-87047C565061}.Release|Win32.Build.0 = Release|Win32 - {870B39B9-8F38-D9A4-8A07-87047C565061}.Release|x64.ActiveCfg = Release|x64 - {870B39B9-8F38-D9A4-8A07-87047C565061}.Release|x64.Build.0 = Release|x64 - {D8295912-D341-F4E4-DC8E-98A2A0604221}.Debug|Win32.ActiveCfg = Debug|Win32 - {D8295912-D341-F4E4-DC8E-98A2A0604221}.Debug|Win32.Build.0 = Debug|Win32 - {D8295912-D341-F4E4-DC8E-98A2A0604221}.Debug|x64.ActiveCfg = Debug|x64 - {D8295912-D341-F4E4-DC8E-98A2A0604221}.Debug|x64.Build.0 = Debug|x64 - {D8295912-D341-F4E4-DC8E-98A2A0604221}.Release|Win32.ActiveCfg = Release|Win32 - {D8295912-D341-F4E4-DC8E-98A2A0604221}.Release|Win32.Build.0 = Release|Win32 - {D8295912-D341-F4E4-DC8E-98A2A0604221}.Release|x64.ActiveCfg = Release|x64 - {D8295912-D341-F4E4-DC8E-98A2A0604221}.Release|x64.Build.0 = Release|x64 - {68EFA4E3-08B0-2925-0EF6-177996B08B24}.Debug|Win32.ActiveCfg = Debug|Win32 - {68EFA4E3-08B0-2925-0EF6-177996B08B24}.Debug|Win32.Build.0 = Debug|Win32 - {68EFA4E3-08B0-2925-0EF6-177996B08B24}.Debug|x64.ActiveCfg = Debug|x64 - {68EFA4E3-08B0-2925-0EF6-177996B08B24}.Debug|x64.Build.0 = Debug|x64 - {68EFA4E3-08B0-2925-0EF6-177996B08B24}.Release|Win32.ActiveCfg = Release|Win32 - {68EFA4E3-08B0-2925-0EF6-177996B08B24}.Release|Win32.Build.0 = Release|Win32 - {68EFA4E3-08B0-2925-0EF6-177996B08B24}.Release|x64.ActiveCfg = Release|x64 - {68EFA4E3-08B0-2925-0EF6-177996B08B24}.Release|x64.Build.0 = Release|x64 - {2E5B8634-26AC-5819-5AF7-16F996A7F529}.Debug|Win32.ActiveCfg = Debug|Win32 - {2E5B8634-26AC-5819-5AF7-16F996A7F529}.Debug|Win32.Build.0 = Debug|Win32 - {2E5B8634-26AC-5819-5AF7-16F996A7F529}.Debug|x64.ActiveCfg = Debug|x64 - {2E5B8634-26AC-5819-5AF7-16F996A7F529}.Debug|x64.Build.0 = Debug|x64 - {2E5B8634-26AC-5819-5AF7-16F996A7F529}.Release|Win32.ActiveCfg = Release|Win32 - {2E5B8634-26AC-5819-5AF7-16F996A7F529}.Release|Win32.Build.0 = Release|Win32 - {2E5B8634-26AC-5819-5AF7-16F996A7F529}.Release|x64.ActiveCfg = Release|x64 - {2E5B8634-26AC-5819-5AF7-16F996A7F529}.Release|x64.Build.0 = Release|x64 - {D93D1FF0-5E83-2247-31A0-017D20F8011F}.Debug|Win32.ActiveCfg = Debug|Win32 - {D93D1FF0-5E83-2247-31A0-017D20F8011F}.Debug|Win32.Build.0 = Debug|Win32 - {D93D1FF0-5E83-2247-31A0-017D20F8011F}.Debug|x64.ActiveCfg = Debug|x64 - {D93D1FF0-5E83-2247-31A0-017D20F8011F}.Debug|x64.Build.0 = Debug|x64 - {D93D1FF0-5E83-2247-31A0-017D20F8011F}.Release|Win32.ActiveCfg = Release|Win32 - {D93D1FF0-5E83-2247-31A0-017D20F8011F}.Release|Win32.Build.0 = Release|Win32 - {D93D1FF0-5E83-2247-31A0-017D20F8011F}.Release|x64.ActiveCfg = Release|x64 - {D93D1FF0-5E83-2247-31A0-017D20F8011F}.Release|x64.Build.0 = Release|x64 - {C5DF2F0C-3EFC-E5D6-7FD2-AD599CADDB15}.Debug|Win32.ActiveCfg = Debug|Win32 - {C5DF2F0C-3EFC-E5D6-7FD2-AD599CADDB15}.Debug|Win32.Build.0 = Debug|Win32 - {C5DF2F0C-3EFC-E5D6-7FD2-AD599CADDB15}.Debug|x64.ActiveCfg = Debug|x64 - {C5DF2F0C-3EFC-E5D6-7FD2-AD599CADDB15}.Debug|x64.Build.0 = Debug|x64 - {C5DF2F0C-3EFC-E5D6-7FD2-AD599CADDB15}.Release|Win32.ActiveCfg = Release|Win32 - {C5DF2F0C-3EFC-E5D6-7FD2-AD599CADDB15}.Release|Win32.Build.0 = Release|Win32 - {C5DF2F0C-3EFC-E5D6-7FD2-AD599CADDB15}.Release|x64.ActiveCfg = Release|x64 - {C5DF2F0C-3EFC-E5D6-7FD2-AD599CADDB15}.Release|x64.Build.0 = Release|x64 - {173A0BC9-FF81-3C36-7887-4FBD6032C9FD}.Debug|Win32.ActiveCfg = Debug|Win32 - {173A0BC9-FF81-3C36-7887-4FBD6032C9FD}.Debug|Win32.Build.0 = Debug|Win32 - {173A0BC9-FF81-3C36-7887-4FBD6032C9FD}.Debug|x64.ActiveCfg = Debug|x64 - {173A0BC9-FF81-3C36-7887-4FBD6032C9FD}.Debug|x64.Build.0 = Debug|x64 - {173A0BC9-FF81-3C36-7887-4FBD6032C9FD}.Release|Win32.ActiveCfg = Release|Win32 - {173A0BC9-FF81-3C36-7887-4FBD6032C9FD}.Release|Win32.Build.0 = Release|Win32 - {173A0BC9-FF81-3C36-7887-4FBD6032C9FD}.Release|x64.ActiveCfg = Release|x64 - {173A0BC9-FF81-3C36-7887-4FBD6032C9FD}.Release|x64.Build.0 = Release|x64 - {58A8E53D-21CB-5F27-5111-737EBD3F37A0}.Debug|Win32.ActiveCfg = Debug|Win32 - {58A8E53D-21CB-5F27-5111-737EBD3F37A0}.Debug|Win32.Build.0 = Debug|Win32 - {58A8E53D-21CB-5F27-5111-737EBD3F37A0}.Debug|x64.ActiveCfg = Debug|x64 - {58A8E53D-21CB-5F27-5111-737EBD3F37A0}.Debug|x64.Build.0 = Debug|x64 - {58A8E53D-21CB-5F27-5111-737EBD3F37A0}.Release|Win32.ActiveCfg = Release|Win32 - {58A8E53D-21CB-5F27-5111-737EBD3F37A0}.Release|Win32.Build.0 = Release|Win32 - {58A8E53D-21CB-5F27-5111-737EBD3F37A0}.Release|x64.ActiveCfg = Release|x64 - {58A8E53D-21CB-5F27-5111-737EBD3F37A0}.Release|x64.Build.0 = Release|x64 - {4DD758B5-6FC5-66C0-1D26-22C74C88FEF3}.Debug|Win32.ActiveCfg = Debug|Win32 - {4DD758B5-6FC5-66C0-1D26-22C74C88FEF3}.Debug|Win32.Build.0 = Debug|Win32 - {4DD758B5-6FC5-66C0-1D26-22C74C88FEF3}.Debug|x64.ActiveCfg = Debug|x64 - {4DD758B5-6FC5-66C0-1D26-22C74C88FEF3}.Debug|x64.Build.0 = Debug|x64 - {4DD758B5-6FC5-66C0-1D26-22C74C88FEF3}.Release|Win32.ActiveCfg = Release|Win32 - {4DD758B5-6FC5-66C0-1D26-22C74C88FEF3}.Release|Win32.Build.0 = Release|Win32 - {4DD758B5-6FC5-66C0-1D26-22C74C88FEF3}.Release|x64.ActiveCfg = Release|x64 - {4DD758B5-6FC5-66C0-1D26-22C74C88FEF3}.Release|x64.Build.0 = Release|x64 - {0FC4D326-CF64-AB19-B037-3E3D06EA6798}.Debug|Win32.ActiveCfg = Debug|Win32 - {0FC4D326-CF64-AB19-B037-3E3D06EA6798}.Debug|Win32.Build.0 = Debug|Win32 - {0FC4D326-CF64-AB19-B037-3E3D06EA6798}.Debug|x64.ActiveCfg = Debug|x64 - {0FC4D326-CF64-AB19-B037-3E3D06EA6798}.Debug|x64.Build.0 = Debug|x64 - {0FC4D326-CF64-AB19-B037-3E3D06EA6798}.Release|Win32.ActiveCfg = Release|Win32 - {0FC4D326-CF64-AB19-B037-3E3D06EA6798}.Release|Win32.Build.0 = Release|Win32 - {0FC4D326-CF64-AB19-B037-3E3D06EA6798}.Release|x64.ActiveCfg = Release|x64 - {0FC4D326-CF64-AB19-B037-3E3D06EA6798}.Release|x64.Build.0 = Release|x64 - {ACFFE3C9-3628-9B99-E0C9-36CF95F86B5F}.Debug|Win32.ActiveCfg = Debug|Win32 - {ACFFE3C9-3628-9B99-E0C9-36CF95F86B5F}.Debug|Win32.Build.0 = Debug|Win32 - {ACFFE3C9-3628-9B99-E0C9-36CF95F86B5F}.Debug|x64.ActiveCfg = Debug|x64 - {ACFFE3C9-3628-9B99-E0C9-36CF95F86B5F}.Debug|x64.Build.0 = Debug|x64 - {ACFFE3C9-3628-9B99-E0C9-36CF95F86B5F}.Release|Win32.ActiveCfg = Release|Win32 - {ACFFE3C9-3628-9B99-E0C9-36CF95F86B5F}.Release|Win32.Build.0 = Release|Win32 - {ACFFE3C9-3628-9B99-E0C9-36CF95F86B5F}.Release|x64.ActiveCfg = Release|x64 - {ACFFE3C9-3628-9B99-E0C9-36CF95F86B5F}.Release|x64.Build.0 = Release|x64 - {9D625831-AF31-CFBA-8855-61C024DA2DE0}.Debug|Win32.ActiveCfg = Debug|Win32 - {9D625831-AF31-CFBA-8855-61C024DA2DE0}.Debug|Win32.Build.0 = Debug|Win32 - {9D625831-AF31-CFBA-8855-61C024DA2DE0}.Debug|x64.ActiveCfg = Debug|x64 - {9D625831-AF31-CFBA-8855-61C024DA2DE0}.Debug|x64.Build.0 = Debug|x64 - {9D625831-AF31-CFBA-8855-61C024DA2DE0}.Release|Win32.ActiveCfg = Release|Win32 - {9D625831-AF31-CFBA-8855-61C024DA2DE0}.Release|Win32.Build.0 = Release|Win32 - {9D625831-AF31-CFBA-8855-61C024DA2DE0}.Release|x64.ActiveCfg = Release|x64 - {9D625831-AF31-CFBA-8855-61C024DA2DE0}.Release|x64.Build.0 = Release|x64 - {E3172E20-4935-69C7-A398-C13EAA76818F}.Debug|Win32.ActiveCfg = Debug|Win32 - {E3172E20-4935-69C7-A398-C13EAA76818F}.Debug|Win32.Build.0 = Debug|Win32 - {E3172E20-4935-69C7-A398-C13EAA76818F}.Debug|x64.ActiveCfg = Debug|x64 - {E3172E20-4935-69C7-A398-C13EAA76818F}.Debug|x64.Build.0 = Debug|x64 - {E3172E20-4935-69C7-A398-C13EAA76818F}.Release|Win32.ActiveCfg = Release|Win32 - {E3172E20-4935-69C7-A398-C13EAA76818F}.Release|Win32.Build.0 = Release|Win32 - {E3172E20-4935-69C7-A398-C13EAA76818F}.Release|x64.ActiveCfg = Release|x64 - {E3172E20-4935-69C7-A398-C13EAA76818F}.Release|x64.Build.0 = Release|x64 - {10F967D6-468F-3BCA-2D58-36A32E376930}.Debug|Win32.ActiveCfg = Debug|Win32 - {10F967D6-468F-3BCA-2D58-36A32E376930}.Debug|Win32.Build.0 = Debug|Win32 - {10F967D6-468F-3BCA-2D58-36A32E376930}.Debug|x64.ActiveCfg = Debug|x64 - {10F967D6-468F-3BCA-2D58-36A32E376930}.Debug|x64.Build.0 = Debug|x64 - {10F967D6-468F-3BCA-2D58-36A32E376930}.Release|Win32.ActiveCfg = Release|Win32 - {10F967D6-468F-3BCA-2D58-36A32E376930}.Release|Win32.Build.0 = Release|Win32 - {10F967D6-468F-3BCA-2D58-36A32E376930}.Release|x64.ActiveCfg = Release|x64 - {10F967D6-468F-3BCA-2D58-36A32E376930}.Release|x64.Build.0 = Release|x64 - {5ABF68F6-5360-DE1F-74B6-66ED5BF52619}.Debug|Win32.ActiveCfg = Debug|Win32 - {5ABF68F6-5360-DE1F-74B6-66ED5BF52619}.Debug|Win32.Build.0 = Debug|Win32 - {5ABF68F6-5360-DE1F-74B6-66ED5BF52619}.Debug|x64.ActiveCfg = Debug|x64 - {5ABF68F6-5360-DE1F-74B6-66ED5BF52619}.Debug|x64.Build.0 = Debug|x64 - {5ABF68F6-5360-DE1F-74B6-66ED5BF52619}.Release|Win32.ActiveCfg = Release|Win32 - {5ABF68F6-5360-DE1F-74B6-66ED5BF52619}.Release|Win32.Build.0 = Release|Win32 - {5ABF68F6-5360-DE1F-74B6-66ED5BF52619}.Release|x64.ActiveCfg = Release|x64 - {5ABF68F6-5360-DE1F-74B6-66ED5BF52619}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/visualc/VS2010/aescrypt2.vcxproj b/visualc/VS2010/aescrypt2.vcxproj index 2e2727cae..3475fa65b 100644 --- a/visualc/VS2010/aescrypt2.vcxproj +++ b/visualc/VS2010/aescrypt2.vcxproj @@ -22,12 +22,12 @@ - + {46cf2d25-6a36-4189-b59c-e4815388e554} - {46298485-CE22-B800-3D95-6D6C821819A1} + {7A851DBD-7D57-E8F4-85E5-CCA72AEA7DF8} Win32Proj aescrypt2 @@ -96,7 +96,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -116,7 +116,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -140,7 +140,7 @@ true true Release - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib diff --git a/visualc/VS2010/benchmark.vcxproj b/visualc/VS2010/benchmark.vcxproj index 303f5ec5e..a03af6a33 100644 --- a/visualc/VS2010/benchmark.vcxproj +++ b/visualc/VS2010/benchmark.vcxproj @@ -22,12 +22,12 @@ - + {46cf2d25-6a36-4189-b59c-e4815388e554} - {58A8E53D-21CB-5F27-5111-737EBD3F37A0} + {90EFD9A4-C6B0-3EE8-1F06-0A0E0D55AEDA} Win32Proj benchmark @@ -96,7 +96,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -116,7 +116,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -140,7 +140,7 @@ true true Release - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib diff --git a/visualc/VS2010/cert_app.vcxproj b/visualc/VS2010/cert_app.vcxproj index 095ec0066..f79e4fe0a 100644 --- a/visualc/VS2010/cert_app.vcxproj +++ b/visualc/VS2010/cert_app.vcxproj @@ -22,12 +22,12 @@ - + {46cf2d25-6a36-4189-b59c-e4815388e554} - {E3172E20-4935-69C7-A398-C13EAA76818F} + {D4D691D4-137C-CBFA-735B-D46636D7E4D8} Win32Proj cert_app @@ -96,7 +96,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -116,7 +116,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -140,7 +140,7 @@ true true Release - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib diff --git a/visualc/VS2010/cert_req.vcxproj b/visualc/VS2010/cert_req.vcxproj index 344aba864..7e1e69b36 100644 --- a/visualc/VS2010/cert_req.vcxproj +++ b/visualc/VS2010/cert_req.vcxproj @@ -22,12 +22,12 @@ - + {46cf2d25-6a36-4189-b59c-e4815388e554} - {5ABF68F6-5360-DE1F-74B6-66ED5BF52619} + {C9E2AB15-8AEF-DD48-60C3-557ECC5215BE} Win32Proj cert_req @@ -96,7 +96,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -116,7 +116,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -140,7 +140,7 @@ true true Release - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib diff --git a/visualc/VS2010/crl_app.vcxproj b/visualc/VS2010/crl_app.vcxproj index e0833feac..6d523f2b6 100644 --- a/visualc/VS2010/crl_app.vcxproj +++ b/visualc/VS2010/crl_app.vcxproj @@ -22,12 +22,12 @@ - + {46cf2d25-6a36-4189-b59c-e4815388e554} - {10F967D6-468F-3BCA-2D58-36A32E376930} + {DB904B85-AD31-B7FB-114F-88760CC485F2} Win32Proj crl_app @@ -96,7 +96,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -116,7 +116,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -140,7 +140,7 @@ true true Release - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib diff --git a/visualc/VS2010/crypt_and_hash.vcxproj b/visualc/VS2010/crypt_and_hash.vcxproj index ebab22117..4a5670f61 100644 --- a/visualc/VS2010/crypt_and_hash.vcxproj +++ b/visualc/VS2010/crypt_and_hash.vcxproj @@ -22,12 +22,12 @@ - + {46cf2d25-6a36-4189-b59c-e4815388e554} - {84F76F01-FA6C-7C48-1979-06FD24B476C1} + {5DBB9FC3-6FD6-CA8D-E0FA-35F1E75EFAE7} Win32Proj crypt_and_hash @@ -96,7 +96,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -116,7 +116,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -140,7 +140,7 @@ true true Release - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib diff --git a/visualc/VS2010/dh_client.vcxproj b/visualc/VS2010/dh_client.vcxproj index e3aa94ae3..48ab22b07 100644 --- a/visualc/VS2010/dh_client.vcxproj +++ b/visualc/VS2010/dh_client.vcxproj @@ -22,12 +22,12 @@ - + {46cf2d25-6a36-4189-b59c-e4815388e554} - {92253FCF-72E1-7AF6-EAD1-E9037A194C9F} + {4D29BE4A-979C-C5AE-44B5-30FB37D8D4EE} Win32Proj dh_client @@ -96,7 +96,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -116,7 +116,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -140,7 +140,7 @@ true true Release - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib diff --git a/visualc/VS2010/dh_genprime.vcxproj b/visualc/VS2010/dh_genprime.vcxproj index b052b3ac2..037666ae8 100644 --- a/visualc/VS2010/dh_genprime.vcxproj +++ b/visualc/VS2010/dh_genprime.vcxproj @@ -22,12 +22,12 @@ - + {46cf2d25-6a36-4189-b59c-e4815388e554} - {8972AF2C-6333-2827-F75D-3BAC5E07915A} + {718960D9-5DA6-7B56-39AD-637E81076C71} Win32Proj dh_genprime @@ -96,7 +96,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -116,7 +116,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -140,7 +140,7 @@ true true Release - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib diff --git a/visualc/VS2010/dh_server.vcxproj b/visualc/VS2010/dh_server.vcxproj index 44b0a4e9e..43b08beb9 100644 --- a/visualc/VS2010/dh_server.vcxproj +++ b/visualc/VS2010/dh_server.vcxproj @@ -22,12 +22,12 @@ - + {46cf2d25-6a36-4189-b59c-e4815388e554} - {9BB33B8B-A1D3-ABEF-9071-D92289A4CEED} + {8D91B804-E2CE-142D-8E06-FBB037ED1F65} Win32Proj dh_server @@ -96,7 +96,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -116,7 +116,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -140,7 +140,7 @@ true true Release - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib diff --git a/visualc/VS2010/gen_entropy.vcxproj b/visualc/VS2010/gen_entropy.vcxproj index 8bc529423..a1799dccd 100644 --- a/visualc/VS2010/gen_entropy.vcxproj +++ b/visualc/VS2010/gen_entropy.vcxproj @@ -22,12 +22,12 @@ - + {46cf2d25-6a36-4189-b59c-e4815388e554} - {2E5B8634-26AC-5819-5AF7-16F996A7F529} + {DE695064-13C3-18B0-378D-8B22672BF3F4} Win32Proj gen_entropy @@ -96,7 +96,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -116,7 +116,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -140,7 +140,7 @@ true true Release - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib diff --git a/visualc/VS2010/gen_key.vcxproj b/visualc/VS2010/gen_key.vcxproj index 896e820fc..07e9742df 100644 --- a/visualc/VS2010/gen_key.vcxproj +++ b/visualc/VS2010/gen_key.vcxproj @@ -22,12 +22,12 @@ - + {46cf2d25-6a36-4189-b59c-e4815388e554} - {7721EBA2-C892-AD9B-4994-A0E988BA4BF8} + {BF782A50-E9AE-00CC-C28A-C9DA8AAB4D52} Win32Proj gen_key @@ -96,7 +96,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -116,7 +116,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -140,7 +140,7 @@ true true Release - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib diff --git a/visualc/VS2010/gen_random_ctr_drbg.vcxproj b/visualc/VS2010/gen_random_ctr_drbg.vcxproj index 0798aff53..ae9b4f12a 100644 --- a/visualc/VS2010/gen_random_ctr_drbg.vcxproj +++ b/visualc/VS2010/gen_random_ctr_drbg.vcxproj @@ -22,12 +22,12 @@ - + {46cf2d25-6a36-4189-b59c-e4815388e554} - {C5DF2F0C-3EFC-E5D6-7FD2-AD599CADDB15} + {5FCC71F6-FF33-EBCF-FBA2-8FC783D5318E} Win32Proj gen_random_ctr_drbg @@ -96,7 +96,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -116,7 +116,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -140,7 +140,7 @@ true true Release - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib diff --git a/visualc/VS2010/gen_random_havege.vcxproj b/visualc/VS2010/gen_random_havege.vcxproj index 58126def2..223b63f68 100644 --- a/visualc/VS2010/gen_random_havege.vcxproj +++ b/visualc/VS2010/gen_random_havege.vcxproj @@ -22,12 +22,12 @@ - + {46cf2d25-6a36-4189-b59c-e4815388e554} - {D93D1FF0-5E83-2247-31A0-017D20F8011F} + {71257802-BBCA-99F5-E9D2-905738F30893} Win32Proj gen_random_havege @@ -96,7 +96,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -116,7 +116,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -140,7 +140,7 @@ true true Release - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib diff --git a/visualc/VS2010/generic_sum.vcxproj b/visualc/VS2010/generic_sum.vcxproj index 441c9cbc1..360bfc749 100644 --- a/visualc/VS2010/generic_sum.vcxproj +++ b/visualc/VS2010/generic_sum.vcxproj @@ -22,12 +22,12 @@ - + {46cf2d25-6a36-4189-b59c-e4815388e554} - {7036A174-35D6-54AE-7613-A50F5FD8AF86} + {D071CCF7-ACA0-21F8-D382-52A759AEA261} Win32Proj generic_sum @@ -96,7 +96,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -116,7 +116,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -140,7 +140,7 @@ true true Release - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib diff --git a/visualc/VS2010/hello.vcxproj b/visualc/VS2010/hello.vcxproj index 83c055905..eb323d827 100644 --- a/visualc/VS2010/hello.vcxproj +++ b/visualc/VS2010/hello.vcxproj @@ -22,12 +22,12 @@ - + {46cf2d25-6a36-4189-b59c-e4815388e554} - {7076F38E-EDC4-1A0C-8D9B-CFB0A3E9724F} + {B02D4AE1-0218-1CD4-F44E-EFAE19B01B8D} Win32Proj hello @@ -96,7 +96,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -116,7 +116,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -140,7 +140,7 @@ true true Release - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib diff --git a/visualc/VS2010/key_app.vcxproj b/visualc/VS2010/key_app.vcxproj index d06157418..590d3788d 100644 --- a/visualc/VS2010/key_app.vcxproj +++ b/visualc/VS2010/key_app.vcxproj @@ -22,12 +22,12 @@ - + {46cf2d25-6a36-4189-b59c-e4815388e554} - {5129B724-3FB6-CE34-FF51-57031A33C50B} + {10AE376F-1A70-0297-0216-1FD01AD15D19} Win32Proj key_app @@ -96,7 +96,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -116,7 +116,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -140,7 +140,7 @@ true true Release - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib diff --git a/visualc/VS2010/key_app_writer.vcxproj b/visualc/VS2010/key_app_writer.vcxproj index a7c4e4fab..098e7ca3c 100644 --- a/visualc/VS2010/key_app_writer.vcxproj +++ b/visualc/VS2010/key_app_writer.vcxproj @@ -22,12 +22,12 @@ - + {46cf2d25-6a36-4189-b59c-e4815388e554} - {090B665D-0F4C-4D77-D1B1-A6D882842AA3} + {E8ED79F9-8034-1B09-263E-D3F8C4C5C4A8} Win32Proj key_app_writer @@ -96,7 +96,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -116,7 +116,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -140,7 +140,7 @@ true true Release - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib diff --git a/visualc/VS2010/mbedTLS.sln b/visualc/VS2010/mbedTLS.sln new file mode 100644 index 000000000..1b1fba2e5 --- /dev/null +++ b/visualc/VS2010/mbedTLS.sln @@ -0,0 +1,585 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual C++ Express 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mbedTLS", "mbedTLS.vcxproj", "{46CF2D25-6A36-4189-B59C-E4815388E554}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "aescrypt2", "aescrypt2.vcxproj", "{7A851DBD-7D57-E8F4-85E5-CCA72AEA7DF8}" + ProjectSection(ProjectDependencies) = postProject + {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "crypt_and_hash", "crypt_and_hash.vcxproj", "{5DBB9FC3-6FD6-CA8D-E0FA-35F1E75EFAE7}" + ProjectSection(ProjectDependencies) = postProject + {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hello", "hello.vcxproj", "{B02D4AE1-0218-1CD4-F44E-EFAE19B01B8D}" + ProjectSection(ProjectDependencies) = postProject + {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "generic_sum", "generic_sum.vcxproj", "{D071CCF7-ACA0-21F8-D382-52A759AEA261}" + ProjectSection(ProjectDependencies) = postProject + {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "md5sum", "md5sum.vcxproj", "{80FE1ECF-6992-A275-7973-E2976718D128}" + ProjectSection(ProjectDependencies) = postProject + {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sha1sum", "sha1sum.vcxproj", "{E91D12D7-01C0-357F-CAB1-8478B096743C}" + ProjectSection(ProjectDependencies) = postProject + {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sha2sum", "sha2sum.vcxproj", "{8C5CF095-A0A4-54FB-0D48-8DF2B7FE4CA5}" + ProjectSection(ProjectDependencies) = postProject + {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dh_client", "dh_client.vcxproj", "{4D29BE4A-979C-C5AE-44B5-30FB37D8D4EE}" + ProjectSection(ProjectDependencies) = postProject + {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dh_genprime", "dh_genprime.vcxproj", "{718960D9-5DA6-7B56-39AD-637E81076C71}" + ProjectSection(ProjectDependencies) = postProject + {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dh_server", "dh_server.vcxproj", "{8D91B804-E2CE-142D-8E06-FBB037ED1F65}" + ProjectSection(ProjectDependencies) = postProject + {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gen_key", "gen_key.vcxproj", "{BF782A50-E9AE-00CC-C28A-C9DA8AAB4D52}" + ProjectSection(ProjectDependencies) = postProject + {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "key_app", "key_app.vcxproj", "{10AE376F-1A70-0297-0216-1FD01AD15D19}" + ProjectSection(ProjectDependencies) = postProject + {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "key_app_writer", "key_app_writer.vcxproj", "{E8ED79F9-8034-1B09-263E-D3F8C4C5C4A8}" + ProjectSection(ProjectDependencies) = postProject + {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mpi_demo", "mpi_demo.vcxproj", "{A59FAA0B-9C34-1F99-794D-A365A3AA8CCE}" + ProjectSection(ProjectDependencies) = postProject + {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pk_decrypt", "pk_decrypt.vcxproj", "{1EC6CBA3-6187-D456-D9B7-A35399395D71}" + ProjectSection(ProjectDependencies) = postProject + {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pk_encrypt", "pk_encrypt.vcxproj", "{55007179-7746-9CFB-97EC-65102FB272C8}" + ProjectSection(ProjectDependencies) = postProject + {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pk_sign", "pk_sign.vcxproj", "{F2E8CA55-597F-7FDC-6456-D8650FB970A3}" + ProjectSection(ProjectDependencies) = postProject + {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pk_verify", "pk_verify.vcxproj", "{C429B336-1B30-119C-3B34-21A186D6744F}" + ProjectSection(ProjectDependencies) = postProject + {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rsa_genkey", "rsa_genkey.vcxproj", "{F472475C-F677-0E7F-F127-45BF5B64F622}" + ProjectSection(ProjectDependencies) = postProject + {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rsa_decrypt", "rsa_decrypt.vcxproj", "{E0D71D72-8DF4-CCFC-EF60-741EADAB8BF9}" + ProjectSection(ProjectDependencies) = postProject + {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rsa_encrypt", "rsa_encrypt.vcxproj", "{D06CF12E-F222-9273-41BF-B8A052FA5527}" + ProjectSection(ProjectDependencies) = postProject + {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rsa_sign", "rsa_sign.vcxproj", "{10790F49-6887-AAB6-2D86-BCBD516F8D26}" + ProjectSection(ProjectDependencies) = postProject + {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rsa_verify", "rsa_verify.vcxproj", "{689E28CF-89ED-BA38-3A14-78A75D891D46}" + ProjectSection(ProjectDependencies) = postProject + {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rsa_sign_pss", "rsa_sign_pss.vcxproj", "{DCD3A1B6-5EC1-8266-93EF-BD2B9BEFE12D}" + ProjectSection(ProjectDependencies) = postProject + {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rsa_verify_pss", "rsa_verify_pss.vcxproj", "{95C50864-854C-2A11-4C91-BCE654E344FB}" + ProjectSection(ProjectDependencies) = postProject + {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssl_client1", "ssl_client1.vcxproj", "{487A2F80-3CA3-678D-88D5-82194872CF08}" + ProjectSection(ProjectDependencies) = postProject + {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssl_client2", "ssl_client2.vcxproj", "{4E590E9D-E28F-87FF-385B-D58736388231}" + ProjectSection(ProjectDependencies) = postProject + {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssl_server", "ssl_server.vcxproj", "{E08E0065-896A-7487-DEA5-D3B80B71F975}" + ProjectSection(ProjectDependencies) = postProject + {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssl_server2", "ssl_server2.vcxproj", "{A4DA7463-1047-BDF5-E1B3-5632CB573F41}" + ProjectSection(ProjectDependencies) = postProject + {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssl_fork_server", "ssl_fork_server.vcxproj", "{918CD402-047D-8467-E11C-E1132053F916}" + ProjectSection(ProjectDependencies) = postProject + {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssl_mail_client", "ssl_mail_client.vcxproj", "{7C4863A1-941A-C5AE-E1F9-30F062E4B2FD}" + ProjectSection(ProjectDependencies) = postProject + {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gen_entropy", "gen_entropy.vcxproj", "{DE695064-13C3-18B0-378D-8B22672BF3F4}" + ProjectSection(ProjectDependencies) = postProject + {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gen_random_havege", "gen_random_havege.vcxproj", "{71257802-BBCA-99F5-E9D2-905738F30893}" + ProjectSection(ProjectDependencies) = postProject + {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gen_random_ctr_drbg", "gen_random_ctr_drbg.vcxproj", "{5FCC71F6-FF33-EBCF-FBA2-8FC783D5318E}" + ProjectSection(ProjectDependencies) = postProject + {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssl_cert_test", "ssl_cert_test.vcxproj", "{3FE0C0E1-D9BA-6A26-380C-F293E543B914}" + ProjectSection(ProjectDependencies) = postProject + {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "benchmark", "benchmark.vcxproj", "{90EFD9A4-C6B0-3EE8-1F06-0A0E0D55AEDA}" + ProjectSection(ProjectDependencies) = postProject + {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "selftest", "selftest.vcxproj", "{7DBC5F77-3DA1-5F73-8421-E693D95FC66A}" + ProjectSection(ProjectDependencies) = postProject + {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssl_test", "ssl_test.vcxproj", "{DDD0BF0A-779A-DEFD-6A1C-FA2164AE9A34}" + ProjectSection(ProjectDependencies) = postProject + {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pem2der", "pem2der.vcxproj", "{D3C6FBD6-D78E-7180-8345-5E09B492DBEC}" + ProjectSection(ProjectDependencies) = postProject + {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "strerror", "strerror.vcxproj", "{23EF735C-CC4C-3EC4-A75E-903DB340F04A}" + ProjectSection(ProjectDependencies) = postProject + {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cert_app", "cert_app.vcxproj", "{D4D691D4-137C-CBFA-735B-D46636D7E4D8}" + ProjectSection(ProjectDependencies) = postProject + {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "crl_app", "crl_app.vcxproj", "{DB904B85-AD31-B7FB-114F-88760CC485F2}" + ProjectSection(ProjectDependencies) = postProject + {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cert_req", "cert_req.vcxproj", "{C9E2AB15-8AEF-DD48-60C3-557ECC5215BE}" + ProjectSection(ProjectDependencies) = postProject + {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {46CF2D25-6A36-4189-B59C-E4815388E554}.Debug|Win32.ActiveCfg = Debug|Win32 + {46CF2D25-6A36-4189-B59C-E4815388E554}.Debug|Win32.Build.0 = Debug|Win32 + {46CF2D25-6A36-4189-B59C-E4815388E554}.Debug|x64.ActiveCfg = Debug|x64 + {46CF2D25-6A36-4189-B59C-E4815388E554}.Debug|x64.Build.0 = Debug|x64 + {46CF2D25-6A36-4189-B59C-E4815388E554}.Release|Win32.ActiveCfg = Release|Win32 + {46CF2D25-6A36-4189-B59C-E4815388E554}.Release|Win32.Build.0 = Release|Win32 + {46CF2D25-6A36-4189-B59C-E4815388E554}.Release|x64.ActiveCfg = Release|x64 + {46CF2D25-6A36-4189-B59C-E4815388E554}.Release|x64.Build.0 = Release|x64 + {7A851DBD-7D57-E8F4-85E5-CCA72AEA7DF8}.Debug|Win32.ActiveCfg = Debug|Win32 + {7A851DBD-7D57-E8F4-85E5-CCA72AEA7DF8}.Debug|Win32.Build.0 = Debug|Win32 + {7A851DBD-7D57-E8F4-85E5-CCA72AEA7DF8}.Debug|x64.ActiveCfg = Debug|x64 + {7A851DBD-7D57-E8F4-85E5-CCA72AEA7DF8}.Debug|x64.Build.0 = Debug|x64 + {7A851DBD-7D57-E8F4-85E5-CCA72AEA7DF8}.Release|Win32.ActiveCfg = Release|Win32 + {7A851DBD-7D57-E8F4-85E5-CCA72AEA7DF8}.Release|Win32.Build.0 = Release|Win32 + {7A851DBD-7D57-E8F4-85E5-CCA72AEA7DF8}.Release|x64.ActiveCfg = Release|x64 + {7A851DBD-7D57-E8F4-85E5-CCA72AEA7DF8}.Release|x64.Build.0 = Release|x64 + {5DBB9FC3-6FD6-CA8D-E0FA-35F1E75EFAE7}.Debug|Win32.ActiveCfg = Debug|Win32 + {5DBB9FC3-6FD6-CA8D-E0FA-35F1E75EFAE7}.Debug|Win32.Build.0 = Debug|Win32 + {5DBB9FC3-6FD6-CA8D-E0FA-35F1E75EFAE7}.Debug|x64.ActiveCfg = Debug|x64 + {5DBB9FC3-6FD6-CA8D-E0FA-35F1E75EFAE7}.Debug|x64.Build.0 = Debug|x64 + {5DBB9FC3-6FD6-CA8D-E0FA-35F1E75EFAE7}.Release|Win32.ActiveCfg = Release|Win32 + {5DBB9FC3-6FD6-CA8D-E0FA-35F1E75EFAE7}.Release|Win32.Build.0 = Release|Win32 + {5DBB9FC3-6FD6-CA8D-E0FA-35F1E75EFAE7}.Release|x64.ActiveCfg = Release|x64 + {5DBB9FC3-6FD6-CA8D-E0FA-35F1E75EFAE7}.Release|x64.Build.0 = Release|x64 + {B02D4AE1-0218-1CD4-F44E-EFAE19B01B8D}.Debug|Win32.ActiveCfg = Debug|Win32 + {B02D4AE1-0218-1CD4-F44E-EFAE19B01B8D}.Debug|Win32.Build.0 = Debug|Win32 + {B02D4AE1-0218-1CD4-F44E-EFAE19B01B8D}.Debug|x64.ActiveCfg = Debug|x64 + {B02D4AE1-0218-1CD4-F44E-EFAE19B01B8D}.Debug|x64.Build.0 = Debug|x64 + {B02D4AE1-0218-1CD4-F44E-EFAE19B01B8D}.Release|Win32.ActiveCfg = Release|Win32 + {B02D4AE1-0218-1CD4-F44E-EFAE19B01B8D}.Release|Win32.Build.0 = Release|Win32 + {B02D4AE1-0218-1CD4-F44E-EFAE19B01B8D}.Release|x64.ActiveCfg = Release|x64 + {B02D4AE1-0218-1CD4-F44E-EFAE19B01B8D}.Release|x64.Build.0 = Release|x64 + {D071CCF7-ACA0-21F8-D382-52A759AEA261}.Debug|Win32.ActiveCfg = Debug|Win32 + {D071CCF7-ACA0-21F8-D382-52A759AEA261}.Debug|Win32.Build.0 = Debug|Win32 + {D071CCF7-ACA0-21F8-D382-52A759AEA261}.Debug|x64.ActiveCfg = Debug|x64 + {D071CCF7-ACA0-21F8-D382-52A759AEA261}.Debug|x64.Build.0 = Debug|x64 + {D071CCF7-ACA0-21F8-D382-52A759AEA261}.Release|Win32.ActiveCfg = Release|Win32 + {D071CCF7-ACA0-21F8-D382-52A759AEA261}.Release|Win32.Build.0 = Release|Win32 + {D071CCF7-ACA0-21F8-D382-52A759AEA261}.Release|x64.ActiveCfg = Release|x64 + {D071CCF7-ACA0-21F8-D382-52A759AEA261}.Release|x64.Build.0 = Release|x64 + {80FE1ECF-6992-A275-7973-E2976718D128}.Debug|Win32.ActiveCfg = Debug|Win32 + {80FE1ECF-6992-A275-7973-E2976718D128}.Debug|Win32.Build.0 = Debug|Win32 + {80FE1ECF-6992-A275-7973-E2976718D128}.Debug|x64.ActiveCfg = Debug|x64 + {80FE1ECF-6992-A275-7973-E2976718D128}.Debug|x64.Build.0 = Debug|x64 + {80FE1ECF-6992-A275-7973-E2976718D128}.Release|Win32.ActiveCfg = Release|Win32 + {80FE1ECF-6992-A275-7973-E2976718D128}.Release|Win32.Build.0 = Release|Win32 + {80FE1ECF-6992-A275-7973-E2976718D128}.Release|x64.ActiveCfg = Release|x64 + {80FE1ECF-6992-A275-7973-E2976718D128}.Release|x64.Build.0 = Release|x64 + {E91D12D7-01C0-357F-CAB1-8478B096743C}.Debug|Win32.ActiveCfg = Debug|Win32 + {E91D12D7-01C0-357F-CAB1-8478B096743C}.Debug|Win32.Build.0 = Debug|Win32 + {E91D12D7-01C0-357F-CAB1-8478B096743C}.Debug|x64.ActiveCfg = Debug|x64 + {E91D12D7-01C0-357F-CAB1-8478B096743C}.Debug|x64.Build.0 = Debug|x64 + {E91D12D7-01C0-357F-CAB1-8478B096743C}.Release|Win32.ActiveCfg = Release|Win32 + {E91D12D7-01C0-357F-CAB1-8478B096743C}.Release|Win32.Build.0 = Release|Win32 + {E91D12D7-01C0-357F-CAB1-8478B096743C}.Release|x64.ActiveCfg = Release|x64 + {E91D12D7-01C0-357F-CAB1-8478B096743C}.Release|x64.Build.0 = Release|x64 + {8C5CF095-A0A4-54FB-0D48-8DF2B7FE4CA5}.Debug|Win32.ActiveCfg = Debug|Win32 + {8C5CF095-A0A4-54FB-0D48-8DF2B7FE4CA5}.Debug|Win32.Build.0 = Debug|Win32 + {8C5CF095-A0A4-54FB-0D48-8DF2B7FE4CA5}.Debug|x64.ActiveCfg = Debug|x64 + {8C5CF095-A0A4-54FB-0D48-8DF2B7FE4CA5}.Debug|x64.Build.0 = Debug|x64 + {8C5CF095-A0A4-54FB-0D48-8DF2B7FE4CA5}.Release|Win32.ActiveCfg = Release|Win32 + {8C5CF095-A0A4-54FB-0D48-8DF2B7FE4CA5}.Release|Win32.Build.0 = Release|Win32 + {8C5CF095-A0A4-54FB-0D48-8DF2B7FE4CA5}.Release|x64.ActiveCfg = Release|x64 + {8C5CF095-A0A4-54FB-0D48-8DF2B7FE4CA5}.Release|x64.Build.0 = Release|x64 + {4D29BE4A-979C-C5AE-44B5-30FB37D8D4EE}.Debug|Win32.ActiveCfg = Debug|Win32 + {4D29BE4A-979C-C5AE-44B5-30FB37D8D4EE}.Debug|Win32.Build.0 = Debug|Win32 + {4D29BE4A-979C-C5AE-44B5-30FB37D8D4EE}.Debug|x64.ActiveCfg = Debug|x64 + {4D29BE4A-979C-C5AE-44B5-30FB37D8D4EE}.Debug|x64.Build.0 = Debug|x64 + {4D29BE4A-979C-C5AE-44B5-30FB37D8D4EE}.Release|Win32.ActiveCfg = Release|Win32 + {4D29BE4A-979C-C5AE-44B5-30FB37D8D4EE}.Release|Win32.Build.0 = Release|Win32 + {4D29BE4A-979C-C5AE-44B5-30FB37D8D4EE}.Release|x64.ActiveCfg = Release|x64 + {4D29BE4A-979C-C5AE-44B5-30FB37D8D4EE}.Release|x64.Build.0 = Release|x64 + {718960D9-5DA6-7B56-39AD-637E81076C71}.Debug|Win32.ActiveCfg = Debug|Win32 + {718960D9-5DA6-7B56-39AD-637E81076C71}.Debug|Win32.Build.0 = Debug|Win32 + {718960D9-5DA6-7B56-39AD-637E81076C71}.Debug|x64.ActiveCfg = Debug|x64 + {718960D9-5DA6-7B56-39AD-637E81076C71}.Debug|x64.Build.0 = Debug|x64 + {718960D9-5DA6-7B56-39AD-637E81076C71}.Release|Win32.ActiveCfg = Release|Win32 + {718960D9-5DA6-7B56-39AD-637E81076C71}.Release|Win32.Build.0 = Release|Win32 + {718960D9-5DA6-7B56-39AD-637E81076C71}.Release|x64.ActiveCfg = Release|x64 + {718960D9-5DA6-7B56-39AD-637E81076C71}.Release|x64.Build.0 = Release|x64 + {8D91B804-E2CE-142D-8E06-FBB037ED1F65}.Debug|Win32.ActiveCfg = Debug|Win32 + {8D91B804-E2CE-142D-8E06-FBB037ED1F65}.Debug|Win32.Build.0 = Debug|Win32 + {8D91B804-E2CE-142D-8E06-FBB037ED1F65}.Debug|x64.ActiveCfg = Debug|x64 + {8D91B804-E2CE-142D-8E06-FBB037ED1F65}.Debug|x64.Build.0 = Debug|x64 + {8D91B804-E2CE-142D-8E06-FBB037ED1F65}.Release|Win32.ActiveCfg = Release|Win32 + {8D91B804-E2CE-142D-8E06-FBB037ED1F65}.Release|Win32.Build.0 = Release|Win32 + {8D91B804-E2CE-142D-8E06-FBB037ED1F65}.Release|x64.ActiveCfg = Release|x64 + {8D91B804-E2CE-142D-8E06-FBB037ED1F65}.Release|x64.Build.0 = Release|x64 + {BF782A50-E9AE-00CC-C28A-C9DA8AAB4D52}.Debug|Win32.ActiveCfg = Debug|Win32 + {BF782A50-E9AE-00CC-C28A-C9DA8AAB4D52}.Debug|Win32.Build.0 = Debug|Win32 + {BF782A50-E9AE-00CC-C28A-C9DA8AAB4D52}.Debug|x64.ActiveCfg = Debug|x64 + {BF782A50-E9AE-00CC-C28A-C9DA8AAB4D52}.Debug|x64.Build.0 = Debug|x64 + {BF782A50-E9AE-00CC-C28A-C9DA8AAB4D52}.Release|Win32.ActiveCfg = Release|Win32 + {BF782A50-E9AE-00CC-C28A-C9DA8AAB4D52}.Release|Win32.Build.0 = Release|Win32 + {BF782A50-E9AE-00CC-C28A-C9DA8AAB4D52}.Release|x64.ActiveCfg = Release|x64 + {BF782A50-E9AE-00CC-C28A-C9DA8AAB4D52}.Release|x64.Build.0 = Release|x64 + {10AE376F-1A70-0297-0216-1FD01AD15D19}.Debug|Win32.ActiveCfg = Debug|Win32 + {10AE376F-1A70-0297-0216-1FD01AD15D19}.Debug|Win32.Build.0 = Debug|Win32 + {10AE376F-1A70-0297-0216-1FD01AD15D19}.Debug|x64.ActiveCfg = Debug|x64 + {10AE376F-1A70-0297-0216-1FD01AD15D19}.Debug|x64.Build.0 = Debug|x64 + {10AE376F-1A70-0297-0216-1FD01AD15D19}.Release|Win32.ActiveCfg = Release|Win32 + {10AE376F-1A70-0297-0216-1FD01AD15D19}.Release|Win32.Build.0 = Release|Win32 + {10AE376F-1A70-0297-0216-1FD01AD15D19}.Release|x64.ActiveCfg = Release|x64 + {10AE376F-1A70-0297-0216-1FD01AD15D19}.Release|x64.Build.0 = Release|x64 + {E8ED79F9-8034-1B09-263E-D3F8C4C5C4A8}.Debug|Win32.ActiveCfg = Debug|Win32 + {E8ED79F9-8034-1B09-263E-D3F8C4C5C4A8}.Debug|Win32.Build.0 = Debug|Win32 + {E8ED79F9-8034-1B09-263E-D3F8C4C5C4A8}.Debug|x64.ActiveCfg = Debug|x64 + {E8ED79F9-8034-1B09-263E-D3F8C4C5C4A8}.Debug|x64.Build.0 = Debug|x64 + {E8ED79F9-8034-1B09-263E-D3F8C4C5C4A8}.Release|Win32.ActiveCfg = Release|Win32 + {E8ED79F9-8034-1B09-263E-D3F8C4C5C4A8}.Release|Win32.Build.0 = Release|Win32 + {E8ED79F9-8034-1B09-263E-D3F8C4C5C4A8}.Release|x64.ActiveCfg = Release|x64 + {E8ED79F9-8034-1B09-263E-D3F8C4C5C4A8}.Release|x64.Build.0 = Release|x64 + {A59FAA0B-9C34-1F99-794D-A365A3AA8CCE}.Debug|Win32.ActiveCfg = Debug|Win32 + {A59FAA0B-9C34-1F99-794D-A365A3AA8CCE}.Debug|Win32.Build.0 = Debug|Win32 + {A59FAA0B-9C34-1F99-794D-A365A3AA8CCE}.Debug|x64.ActiveCfg = Debug|x64 + {A59FAA0B-9C34-1F99-794D-A365A3AA8CCE}.Debug|x64.Build.0 = Debug|x64 + {A59FAA0B-9C34-1F99-794D-A365A3AA8CCE}.Release|Win32.ActiveCfg = Release|Win32 + {A59FAA0B-9C34-1F99-794D-A365A3AA8CCE}.Release|Win32.Build.0 = Release|Win32 + {A59FAA0B-9C34-1F99-794D-A365A3AA8CCE}.Release|x64.ActiveCfg = Release|x64 + {A59FAA0B-9C34-1F99-794D-A365A3AA8CCE}.Release|x64.Build.0 = Release|x64 + {1EC6CBA3-6187-D456-D9B7-A35399395D71}.Debug|Win32.ActiveCfg = Debug|Win32 + {1EC6CBA3-6187-D456-D9B7-A35399395D71}.Debug|Win32.Build.0 = Debug|Win32 + {1EC6CBA3-6187-D456-D9B7-A35399395D71}.Debug|x64.ActiveCfg = Debug|x64 + {1EC6CBA3-6187-D456-D9B7-A35399395D71}.Debug|x64.Build.0 = Debug|x64 + {1EC6CBA3-6187-D456-D9B7-A35399395D71}.Release|Win32.ActiveCfg = Release|Win32 + {1EC6CBA3-6187-D456-D9B7-A35399395D71}.Release|Win32.Build.0 = Release|Win32 + {1EC6CBA3-6187-D456-D9B7-A35399395D71}.Release|x64.ActiveCfg = Release|x64 + {1EC6CBA3-6187-D456-D9B7-A35399395D71}.Release|x64.Build.0 = Release|x64 + {55007179-7746-9CFB-97EC-65102FB272C8}.Debug|Win32.ActiveCfg = Debug|Win32 + {55007179-7746-9CFB-97EC-65102FB272C8}.Debug|Win32.Build.0 = Debug|Win32 + {55007179-7746-9CFB-97EC-65102FB272C8}.Debug|x64.ActiveCfg = Debug|x64 + {55007179-7746-9CFB-97EC-65102FB272C8}.Debug|x64.Build.0 = Debug|x64 + {55007179-7746-9CFB-97EC-65102FB272C8}.Release|Win32.ActiveCfg = Release|Win32 + {55007179-7746-9CFB-97EC-65102FB272C8}.Release|Win32.Build.0 = Release|Win32 + {55007179-7746-9CFB-97EC-65102FB272C8}.Release|x64.ActiveCfg = Release|x64 + {55007179-7746-9CFB-97EC-65102FB272C8}.Release|x64.Build.0 = Release|x64 + {F2E8CA55-597F-7FDC-6456-D8650FB970A3}.Debug|Win32.ActiveCfg = Debug|Win32 + {F2E8CA55-597F-7FDC-6456-D8650FB970A3}.Debug|Win32.Build.0 = Debug|Win32 + {F2E8CA55-597F-7FDC-6456-D8650FB970A3}.Debug|x64.ActiveCfg = Debug|x64 + {F2E8CA55-597F-7FDC-6456-D8650FB970A3}.Debug|x64.Build.0 = Debug|x64 + {F2E8CA55-597F-7FDC-6456-D8650FB970A3}.Release|Win32.ActiveCfg = Release|Win32 + {F2E8CA55-597F-7FDC-6456-D8650FB970A3}.Release|Win32.Build.0 = Release|Win32 + {F2E8CA55-597F-7FDC-6456-D8650FB970A3}.Release|x64.ActiveCfg = Release|x64 + {F2E8CA55-597F-7FDC-6456-D8650FB970A3}.Release|x64.Build.0 = Release|x64 + {C429B336-1B30-119C-3B34-21A186D6744F}.Debug|Win32.ActiveCfg = Debug|Win32 + {C429B336-1B30-119C-3B34-21A186D6744F}.Debug|Win32.Build.0 = Debug|Win32 + {C429B336-1B30-119C-3B34-21A186D6744F}.Debug|x64.ActiveCfg = Debug|x64 + {C429B336-1B30-119C-3B34-21A186D6744F}.Debug|x64.Build.0 = Debug|x64 + {C429B336-1B30-119C-3B34-21A186D6744F}.Release|Win32.ActiveCfg = Release|Win32 + {C429B336-1B30-119C-3B34-21A186D6744F}.Release|Win32.Build.0 = Release|Win32 + {C429B336-1B30-119C-3B34-21A186D6744F}.Release|x64.ActiveCfg = Release|x64 + {C429B336-1B30-119C-3B34-21A186D6744F}.Release|x64.Build.0 = Release|x64 + {F472475C-F677-0E7F-F127-45BF5B64F622}.Debug|Win32.ActiveCfg = Debug|Win32 + {F472475C-F677-0E7F-F127-45BF5B64F622}.Debug|Win32.Build.0 = Debug|Win32 + {F472475C-F677-0E7F-F127-45BF5B64F622}.Debug|x64.ActiveCfg = Debug|x64 + {F472475C-F677-0E7F-F127-45BF5B64F622}.Debug|x64.Build.0 = Debug|x64 + {F472475C-F677-0E7F-F127-45BF5B64F622}.Release|Win32.ActiveCfg = Release|Win32 + {F472475C-F677-0E7F-F127-45BF5B64F622}.Release|Win32.Build.0 = Release|Win32 + {F472475C-F677-0E7F-F127-45BF5B64F622}.Release|x64.ActiveCfg = Release|x64 + {F472475C-F677-0E7F-F127-45BF5B64F622}.Release|x64.Build.0 = Release|x64 + {E0D71D72-8DF4-CCFC-EF60-741EADAB8BF9}.Debug|Win32.ActiveCfg = Debug|Win32 + {E0D71D72-8DF4-CCFC-EF60-741EADAB8BF9}.Debug|Win32.Build.0 = Debug|Win32 + {E0D71D72-8DF4-CCFC-EF60-741EADAB8BF9}.Debug|x64.ActiveCfg = Debug|x64 + {E0D71D72-8DF4-CCFC-EF60-741EADAB8BF9}.Debug|x64.Build.0 = Debug|x64 + {E0D71D72-8DF4-CCFC-EF60-741EADAB8BF9}.Release|Win32.ActiveCfg = Release|Win32 + {E0D71D72-8DF4-CCFC-EF60-741EADAB8BF9}.Release|Win32.Build.0 = Release|Win32 + {E0D71D72-8DF4-CCFC-EF60-741EADAB8BF9}.Release|x64.ActiveCfg = Release|x64 + {E0D71D72-8DF4-CCFC-EF60-741EADAB8BF9}.Release|x64.Build.0 = Release|x64 + {D06CF12E-F222-9273-41BF-B8A052FA5527}.Debug|Win32.ActiveCfg = Debug|Win32 + {D06CF12E-F222-9273-41BF-B8A052FA5527}.Debug|Win32.Build.0 = Debug|Win32 + {D06CF12E-F222-9273-41BF-B8A052FA5527}.Debug|x64.ActiveCfg = Debug|x64 + {D06CF12E-F222-9273-41BF-B8A052FA5527}.Debug|x64.Build.0 = Debug|x64 + {D06CF12E-F222-9273-41BF-B8A052FA5527}.Release|Win32.ActiveCfg = Release|Win32 + {D06CF12E-F222-9273-41BF-B8A052FA5527}.Release|Win32.Build.0 = Release|Win32 + {D06CF12E-F222-9273-41BF-B8A052FA5527}.Release|x64.ActiveCfg = Release|x64 + {D06CF12E-F222-9273-41BF-B8A052FA5527}.Release|x64.Build.0 = Release|x64 + {10790F49-6887-AAB6-2D86-BCBD516F8D26}.Debug|Win32.ActiveCfg = Debug|Win32 + {10790F49-6887-AAB6-2D86-BCBD516F8D26}.Debug|Win32.Build.0 = Debug|Win32 + {10790F49-6887-AAB6-2D86-BCBD516F8D26}.Debug|x64.ActiveCfg = Debug|x64 + {10790F49-6887-AAB6-2D86-BCBD516F8D26}.Debug|x64.Build.0 = Debug|x64 + {10790F49-6887-AAB6-2D86-BCBD516F8D26}.Release|Win32.ActiveCfg = Release|Win32 + {10790F49-6887-AAB6-2D86-BCBD516F8D26}.Release|Win32.Build.0 = Release|Win32 + {10790F49-6887-AAB6-2D86-BCBD516F8D26}.Release|x64.ActiveCfg = Release|x64 + {10790F49-6887-AAB6-2D86-BCBD516F8D26}.Release|x64.Build.0 = Release|x64 + {689E28CF-89ED-BA38-3A14-78A75D891D46}.Debug|Win32.ActiveCfg = Debug|Win32 + {689E28CF-89ED-BA38-3A14-78A75D891D46}.Debug|Win32.Build.0 = Debug|Win32 + {689E28CF-89ED-BA38-3A14-78A75D891D46}.Debug|x64.ActiveCfg = Debug|x64 + {689E28CF-89ED-BA38-3A14-78A75D891D46}.Debug|x64.Build.0 = Debug|x64 + {689E28CF-89ED-BA38-3A14-78A75D891D46}.Release|Win32.ActiveCfg = Release|Win32 + {689E28CF-89ED-BA38-3A14-78A75D891D46}.Release|Win32.Build.0 = Release|Win32 + {689E28CF-89ED-BA38-3A14-78A75D891D46}.Release|x64.ActiveCfg = Release|x64 + {689E28CF-89ED-BA38-3A14-78A75D891D46}.Release|x64.Build.0 = Release|x64 + {DCD3A1B6-5EC1-8266-93EF-BD2B9BEFE12D}.Debug|Win32.ActiveCfg = Debug|Win32 + {DCD3A1B6-5EC1-8266-93EF-BD2B9BEFE12D}.Debug|Win32.Build.0 = Debug|Win32 + {DCD3A1B6-5EC1-8266-93EF-BD2B9BEFE12D}.Debug|x64.ActiveCfg = Debug|x64 + {DCD3A1B6-5EC1-8266-93EF-BD2B9BEFE12D}.Debug|x64.Build.0 = Debug|x64 + {DCD3A1B6-5EC1-8266-93EF-BD2B9BEFE12D}.Release|Win32.ActiveCfg = Release|Win32 + {DCD3A1B6-5EC1-8266-93EF-BD2B9BEFE12D}.Release|Win32.Build.0 = Release|Win32 + {DCD3A1B6-5EC1-8266-93EF-BD2B9BEFE12D}.Release|x64.ActiveCfg = Release|x64 + {DCD3A1B6-5EC1-8266-93EF-BD2B9BEFE12D}.Release|x64.Build.0 = Release|x64 + {95C50864-854C-2A11-4C91-BCE654E344FB}.Debug|Win32.ActiveCfg = Debug|Win32 + {95C50864-854C-2A11-4C91-BCE654E344FB}.Debug|Win32.Build.0 = Debug|Win32 + {95C50864-854C-2A11-4C91-BCE654E344FB}.Debug|x64.ActiveCfg = Debug|x64 + {95C50864-854C-2A11-4C91-BCE654E344FB}.Debug|x64.Build.0 = Debug|x64 + {95C50864-854C-2A11-4C91-BCE654E344FB}.Release|Win32.ActiveCfg = Release|Win32 + {95C50864-854C-2A11-4C91-BCE654E344FB}.Release|Win32.Build.0 = Release|Win32 + {95C50864-854C-2A11-4C91-BCE654E344FB}.Release|x64.ActiveCfg = Release|x64 + {95C50864-854C-2A11-4C91-BCE654E344FB}.Release|x64.Build.0 = Release|x64 + {487A2F80-3CA3-678D-88D5-82194872CF08}.Debug|Win32.ActiveCfg = Debug|Win32 + {487A2F80-3CA3-678D-88D5-82194872CF08}.Debug|Win32.Build.0 = Debug|Win32 + {487A2F80-3CA3-678D-88D5-82194872CF08}.Debug|x64.ActiveCfg = Debug|x64 + {487A2F80-3CA3-678D-88D5-82194872CF08}.Debug|x64.Build.0 = Debug|x64 + {487A2F80-3CA3-678D-88D5-82194872CF08}.Release|Win32.ActiveCfg = Release|Win32 + {487A2F80-3CA3-678D-88D5-82194872CF08}.Release|Win32.Build.0 = Release|Win32 + {487A2F80-3CA3-678D-88D5-82194872CF08}.Release|x64.ActiveCfg = Release|x64 + {487A2F80-3CA3-678D-88D5-82194872CF08}.Release|x64.Build.0 = Release|x64 + {4E590E9D-E28F-87FF-385B-D58736388231}.Debug|Win32.ActiveCfg = Debug|Win32 + {4E590E9D-E28F-87FF-385B-D58736388231}.Debug|Win32.Build.0 = Debug|Win32 + {4E590E9D-E28F-87FF-385B-D58736388231}.Debug|x64.ActiveCfg = Debug|x64 + {4E590E9D-E28F-87FF-385B-D58736388231}.Debug|x64.Build.0 = Debug|x64 + {4E590E9D-E28F-87FF-385B-D58736388231}.Release|Win32.ActiveCfg = Release|Win32 + {4E590E9D-E28F-87FF-385B-D58736388231}.Release|Win32.Build.0 = Release|Win32 + {4E590E9D-E28F-87FF-385B-D58736388231}.Release|x64.ActiveCfg = Release|x64 + {4E590E9D-E28F-87FF-385B-D58736388231}.Release|x64.Build.0 = Release|x64 + {E08E0065-896A-7487-DEA5-D3B80B71F975}.Debug|Win32.ActiveCfg = Debug|Win32 + {E08E0065-896A-7487-DEA5-D3B80B71F975}.Debug|Win32.Build.0 = Debug|Win32 + {E08E0065-896A-7487-DEA5-D3B80B71F975}.Debug|x64.ActiveCfg = Debug|x64 + {E08E0065-896A-7487-DEA5-D3B80B71F975}.Debug|x64.Build.0 = Debug|x64 + {E08E0065-896A-7487-DEA5-D3B80B71F975}.Release|Win32.ActiveCfg = Release|Win32 + {E08E0065-896A-7487-DEA5-D3B80B71F975}.Release|Win32.Build.0 = Release|Win32 + {E08E0065-896A-7487-DEA5-D3B80B71F975}.Release|x64.ActiveCfg = Release|x64 + {E08E0065-896A-7487-DEA5-D3B80B71F975}.Release|x64.Build.0 = Release|x64 + {A4DA7463-1047-BDF5-E1B3-5632CB573F41}.Debug|Win32.ActiveCfg = Debug|Win32 + {A4DA7463-1047-BDF5-E1B3-5632CB573F41}.Debug|Win32.Build.0 = Debug|Win32 + {A4DA7463-1047-BDF5-E1B3-5632CB573F41}.Debug|x64.ActiveCfg = Debug|x64 + {A4DA7463-1047-BDF5-E1B3-5632CB573F41}.Debug|x64.Build.0 = Debug|x64 + {A4DA7463-1047-BDF5-E1B3-5632CB573F41}.Release|Win32.ActiveCfg = Release|Win32 + {A4DA7463-1047-BDF5-E1B3-5632CB573F41}.Release|Win32.Build.0 = Release|Win32 + {A4DA7463-1047-BDF5-E1B3-5632CB573F41}.Release|x64.ActiveCfg = Release|x64 + {A4DA7463-1047-BDF5-E1B3-5632CB573F41}.Release|x64.Build.0 = Release|x64 + {918CD402-047D-8467-E11C-E1132053F916}.Debug|Win32.ActiveCfg = Debug|Win32 + {918CD402-047D-8467-E11C-E1132053F916}.Debug|Win32.Build.0 = Debug|Win32 + {918CD402-047D-8467-E11C-E1132053F916}.Debug|x64.ActiveCfg = Debug|x64 + {918CD402-047D-8467-E11C-E1132053F916}.Debug|x64.Build.0 = Debug|x64 + {918CD402-047D-8467-E11C-E1132053F916}.Release|Win32.ActiveCfg = Release|Win32 + {918CD402-047D-8467-E11C-E1132053F916}.Release|Win32.Build.0 = Release|Win32 + {918CD402-047D-8467-E11C-E1132053F916}.Release|x64.ActiveCfg = Release|x64 + {918CD402-047D-8467-E11C-E1132053F916}.Release|x64.Build.0 = Release|x64 + {7C4863A1-941A-C5AE-E1F9-30F062E4B2FD}.Debug|Win32.ActiveCfg = Debug|Win32 + {7C4863A1-941A-C5AE-E1F9-30F062E4B2FD}.Debug|Win32.Build.0 = Debug|Win32 + {7C4863A1-941A-C5AE-E1F9-30F062E4B2FD}.Debug|x64.ActiveCfg = Debug|x64 + {7C4863A1-941A-C5AE-E1F9-30F062E4B2FD}.Debug|x64.Build.0 = Debug|x64 + {7C4863A1-941A-C5AE-E1F9-30F062E4B2FD}.Release|Win32.ActiveCfg = Release|Win32 + {7C4863A1-941A-C5AE-E1F9-30F062E4B2FD}.Release|Win32.Build.0 = Release|Win32 + {7C4863A1-941A-C5AE-E1F9-30F062E4B2FD}.Release|x64.ActiveCfg = Release|x64 + {7C4863A1-941A-C5AE-E1F9-30F062E4B2FD}.Release|x64.Build.0 = Release|x64 + {DE695064-13C3-18B0-378D-8B22672BF3F4}.Debug|Win32.ActiveCfg = Debug|Win32 + {DE695064-13C3-18B0-378D-8B22672BF3F4}.Debug|Win32.Build.0 = Debug|Win32 + {DE695064-13C3-18B0-378D-8B22672BF3F4}.Debug|x64.ActiveCfg = Debug|x64 + {DE695064-13C3-18B0-378D-8B22672BF3F4}.Debug|x64.Build.0 = Debug|x64 + {DE695064-13C3-18B0-378D-8B22672BF3F4}.Release|Win32.ActiveCfg = Release|Win32 + {DE695064-13C3-18B0-378D-8B22672BF3F4}.Release|Win32.Build.0 = Release|Win32 + {DE695064-13C3-18B0-378D-8B22672BF3F4}.Release|x64.ActiveCfg = Release|x64 + {DE695064-13C3-18B0-378D-8B22672BF3F4}.Release|x64.Build.0 = Release|x64 + {71257802-BBCA-99F5-E9D2-905738F30893}.Debug|Win32.ActiveCfg = Debug|Win32 + {71257802-BBCA-99F5-E9D2-905738F30893}.Debug|Win32.Build.0 = Debug|Win32 + {71257802-BBCA-99F5-E9D2-905738F30893}.Debug|x64.ActiveCfg = Debug|x64 + {71257802-BBCA-99F5-E9D2-905738F30893}.Debug|x64.Build.0 = Debug|x64 + {71257802-BBCA-99F5-E9D2-905738F30893}.Release|Win32.ActiveCfg = Release|Win32 + {71257802-BBCA-99F5-E9D2-905738F30893}.Release|Win32.Build.0 = Release|Win32 + {71257802-BBCA-99F5-E9D2-905738F30893}.Release|x64.ActiveCfg = Release|x64 + {71257802-BBCA-99F5-E9D2-905738F30893}.Release|x64.Build.0 = Release|x64 + {5FCC71F6-FF33-EBCF-FBA2-8FC783D5318E}.Debug|Win32.ActiveCfg = Debug|Win32 + {5FCC71F6-FF33-EBCF-FBA2-8FC783D5318E}.Debug|Win32.Build.0 = Debug|Win32 + {5FCC71F6-FF33-EBCF-FBA2-8FC783D5318E}.Debug|x64.ActiveCfg = Debug|x64 + {5FCC71F6-FF33-EBCF-FBA2-8FC783D5318E}.Debug|x64.Build.0 = Debug|x64 + {5FCC71F6-FF33-EBCF-FBA2-8FC783D5318E}.Release|Win32.ActiveCfg = Release|Win32 + {5FCC71F6-FF33-EBCF-FBA2-8FC783D5318E}.Release|Win32.Build.0 = Release|Win32 + {5FCC71F6-FF33-EBCF-FBA2-8FC783D5318E}.Release|x64.ActiveCfg = Release|x64 + {5FCC71F6-FF33-EBCF-FBA2-8FC783D5318E}.Release|x64.Build.0 = Release|x64 + {3FE0C0E1-D9BA-6A26-380C-F293E543B914}.Debug|Win32.ActiveCfg = Debug|Win32 + {3FE0C0E1-D9BA-6A26-380C-F293E543B914}.Debug|Win32.Build.0 = Debug|Win32 + {3FE0C0E1-D9BA-6A26-380C-F293E543B914}.Debug|x64.ActiveCfg = Debug|x64 + {3FE0C0E1-D9BA-6A26-380C-F293E543B914}.Debug|x64.Build.0 = Debug|x64 + {3FE0C0E1-D9BA-6A26-380C-F293E543B914}.Release|Win32.ActiveCfg = Release|Win32 + {3FE0C0E1-D9BA-6A26-380C-F293E543B914}.Release|Win32.Build.0 = Release|Win32 + {3FE0C0E1-D9BA-6A26-380C-F293E543B914}.Release|x64.ActiveCfg = Release|x64 + {3FE0C0E1-D9BA-6A26-380C-F293E543B914}.Release|x64.Build.0 = Release|x64 + {90EFD9A4-C6B0-3EE8-1F06-0A0E0D55AEDA}.Debug|Win32.ActiveCfg = Debug|Win32 + {90EFD9A4-C6B0-3EE8-1F06-0A0E0D55AEDA}.Debug|Win32.Build.0 = Debug|Win32 + {90EFD9A4-C6B0-3EE8-1F06-0A0E0D55AEDA}.Debug|x64.ActiveCfg = Debug|x64 + {90EFD9A4-C6B0-3EE8-1F06-0A0E0D55AEDA}.Debug|x64.Build.0 = Debug|x64 + {90EFD9A4-C6B0-3EE8-1F06-0A0E0D55AEDA}.Release|Win32.ActiveCfg = Release|Win32 + {90EFD9A4-C6B0-3EE8-1F06-0A0E0D55AEDA}.Release|Win32.Build.0 = Release|Win32 + {90EFD9A4-C6B0-3EE8-1F06-0A0E0D55AEDA}.Release|x64.ActiveCfg = Release|x64 + {90EFD9A4-C6B0-3EE8-1F06-0A0E0D55AEDA}.Release|x64.Build.0 = Release|x64 + {7DBC5F77-3DA1-5F73-8421-E693D95FC66A}.Debug|Win32.ActiveCfg = Debug|Win32 + {7DBC5F77-3DA1-5F73-8421-E693D95FC66A}.Debug|Win32.Build.0 = Debug|Win32 + {7DBC5F77-3DA1-5F73-8421-E693D95FC66A}.Debug|x64.ActiveCfg = Debug|x64 + {7DBC5F77-3DA1-5F73-8421-E693D95FC66A}.Debug|x64.Build.0 = Debug|x64 + {7DBC5F77-3DA1-5F73-8421-E693D95FC66A}.Release|Win32.ActiveCfg = Release|Win32 + {7DBC5F77-3DA1-5F73-8421-E693D95FC66A}.Release|Win32.Build.0 = Release|Win32 + {7DBC5F77-3DA1-5F73-8421-E693D95FC66A}.Release|x64.ActiveCfg = Release|x64 + {7DBC5F77-3DA1-5F73-8421-E693D95FC66A}.Release|x64.Build.0 = Release|x64 + {DDD0BF0A-779A-DEFD-6A1C-FA2164AE9A34}.Debug|Win32.ActiveCfg = Debug|Win32 + {DDD0BF0A-779A-DEFD-6A1C-FA2164AE9A34}.Debug|Win32.Build.0 = Debug|Win32 + {DDD0BF0A-779A-DEFD-6A1C-FA2164AE9A34}.Debug|x64.ActiveCfg = Debug|x64 + {DDD0BF0A-779A-DEFD-6A1C-FA2164AE9A34}.Debug|x64.Build.0 = Debug|x64 + {DDD0BF0A-779A-DEFD-6A1C-FA2164AE9A34}.Release|Win32.ActiveCfg = Release|Win32 + {DDD0BF0A-779A-DEFD-6A1C-FA2164AE9A34}.Release|Win32.Build.0 = Release|Win32 + {DDD0BF0A-779A-DEFD-6A1C-FA2164AE9A34}.Release|x64.ActiveCfg = Release|x64 + {DDD0BF0A-779A-DEFD-6A1C-FA2164AE9A34}.Release|x64.Build.0 = Release|x64 + {D3C6FBD6-D78E-7180-8345-5E09B492DBEC}.Debug|Win32.ActiveCfg = Debug|Win32 + {D3C6FBD6-D78E-7180-8345-5E09B492DBEC}.Debug|Win32.Build.0 = Debug|Win32 + {D3C6FBD6-D78E-7180-8345-5E09B492DBEC}.Debug|x64.ActiveCfg = Debug|x64 + {D3C6FBD6-D78E-7180-8345-5E09B492DBEC}.Debug|x64.Build.0 = Debug|x64 + {D3C6FBD6-D78E-7180-8345-5E09B492DBEC}.Release|Win32.ActiveCfg = Release|Win32 + {D3C6FBD6-D78E-7180-8345-5E09B492DBEC}.Release|Win32.Build.0 = Release|Win32 + {D3C6FBD6-D78E-7180-8345-5E09B492DBEC}.Release|x64.ActiveCfg = Release|x64 + {D3C6FBD6-D78E-7180-8345-5E09B492DBEC}.Release|x64.Build.0 = Release|x64 + {23EF735C-CC4C-3EC4-A75E-903DB340F04A}.Debug|Win32.ActiveCfg = Debug|Win32 + {23EF735C-CC4C-3EC4-A75E-903DB340F04A}.Debug|Win32.Build.0 = Debug|Win32 + {23EF735C-CC4C-3EC4-A75E-903DB340F04A}.Debug|x64.ActiveCfg = Debug|x64 + {23EF735C-CC4C-3EC4-A75E-903DB340F04A}.Debug|x64.Build.0 = Debug|x64 + {23EF735C-CC4C-3EC4-A75E-903DB340F04A}.Release|Win32.ActiveCfg = Release|Win32 + {23EF735C-CC4C-3EC4-A75E-903DB340F04A}.Release|Win32.Build.0 = Release|Win32 + {23EF735C-CC4C-3EC4-A75E-903DB340F04A}.Release|x64.ActiveCfg = Release|x64 + {23EF735C-CC4C-3EC4-A75E-903DB340F04A}.Release|x64.Build.0 = Release|x64 + {D4D691D4-137C-CBFA-735B-D46636D7E4D8}.Debug|Win32.ActiveCfg = Debug|Win32 + {D4D691D4-137C-CBFA-735B-D46636D7E4D8}.Debug|Win32.Build.0 = Debug|Win32 + {D4D691D4-137C-CBFA-735B-D46636D7E4D8}.Debug|x64.ActiveCfg = Debug|x64 + {D4D691D4-137C-CBFA-735B-D46636D7E4D8}.Debug|x64.Build.0 = Debug|x64 + {D4D691D4-137C-CBFA-735B-D46636D7E4D8}.Release|Win32.ActiveCfg = Release|Win32 + {D4D691D4-137C-CBFA-735B-D46636D7E4D8}.Release|Win32.Build.0 = Release|Win32 + {D4D691D4-137C-CBFA-735B-D46636D7E4D8}.Release|x64.ActiveCfg = Release|x64 + {D4D691D4-137C-CBFA-735B-D46636D7E4D8}.Release|x64.Build.0 = Release|x64 + {DB904B85-AD31-B7FB-114F-88760CC485F2}.Debug|Win32.ActiveCfg = Debug|Win32 + {DB904B85-AD31-B7FB-114F-88760CC485F2}.Debug|Win32.Build.0 = Debug|Win32 + {DB904B85-AD31-B7FB-114F-88760CC485F2}.Debug|x64.ActiveCfg = Debug|x64 + {DB904B85-AD31-B7FB-114F-88760CC485F2}.Debug|x64.Build.0 = Debug|x64 + {DB904B85-AD31-B7FB-114F-88760CC485F2}.Release|Win32.ActiveCfg = Release|Win32 + {DB904B85-AD31-B7FB-114F-88760CC485F2}.Release|Win32.Build.0 = Release|Win32 + {DB904B85-AD31-B7FB-114F-88760CC485F2}.Release|x64.ActiveCfg = Release|x64 + {DB904B85-AD31-B7FB-114F-88760CC485F2}.Release|x64.Build.0 = Release|x64 + {C9E2AB15-8AEF-DD48-60C3-557ECC5215BE}.Debug|Win32.ActiveCfg = Debug|Win32 + {C9E2AB15-8AEF-DD48-60C3-557ECC5215BE}.Debug|Win32.Build.0 = Debug|Win32 + {C9E2AB15-8AEF-DD48-60C3-557ECC5215BE}.Debug|x64.ActiveCfg = Debug|x64 + {C9E2AB15-8AEF-DD48-60C3-557ECC5215BE}.Debug|x64.Build.0 = Debug|x64 + {C9E2AB15-8AEF-DD48-60C3-557ECC5215BE}.Release|Win32.ActiveCfg = Release|Win32 + {C9E2AB15-8AEF-DD48-60C3-557ECC5215BE}.Release|Win32.Build.0 = Release|Win32 + {C9E2AB15-8AEF-DD48-60C3-557ECC5215BE}.Release|x64.ActiveCfg = Release|x64 + {C9E2AB15-8AEF-DD48-60C3-557ECC5215BE}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/visualc/VS2010/PolarSSL.vcxproj b/visualc/VS2010/mbedTLS.vcxproj similarity index 94% rename from visualc/VS2010/PolarSSL.vcxproj rename to visualc/VS2010/mbedTLS.vcxproj index 5ea5b15ad..7e4b3c965 100644 --- a/visualc/VS2010/PolarSSL.vcxproj +++ b/visualc/VS2010/mbedTLS.vcxproj @@ -1,284 +1,284 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {46CF2D25-6A36-4189-B59C-E4815388E554} - Win32Proj - PolarSSL - - - - StaticLibrary - true - Unicode - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - StaticLibrary - false - true - Unicode - Windows7.1SDK - - - - - - - - - - - - - - - - - - - true - - - true - - - false - - - false - - - - - - Level3 - Disabled - WIN32;_DEBUG;_WINDOWS;_USRDLL;POLARSSL_EXPORTS;%(PreprocessorDefinitions) - ../../include - CompileAsC - - - Windows - true - - - - - - - Level3 - Disabled - WIN32;_DEBUG;_WINDOWS;_USRDLL;POLARSSL_EXPORTS;%(PreprocessorDefinitions) - ../../include - CompileAsC - - - Windows - true - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_WINDOWS;_USRDLL;POLARSSL_EXPORTS;%(PreprocessorDefinitions) - ../../include - - - Windows - true - true - true - - - - - Level3 - - - MaxSpeed - true - true - WIN64;NDEBUG;_WINDOWS;_USRDLL;POLARSSL_EXPORTS;%(PreprocessorDefinitions) - ../../include - - - Windows - true - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {46CF2D25-6A36-4189-B59C-E4815388E554} + Win32Proj + mbedTLS + + + + StaticLibrary + true + Unicode + + + StaticLibrary + true + Unicode + + + StaticLibrary + false + true + Unicode + + + StaticLibrary + false + true + Unicode + Windows7.1SDK + + + + + + + + + + + + + + + + + + + true + + + true + + + false + + + false + + + + + + Level3 + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;MBEDTLS_EXPORTS;%(PreprocessorDefinitions) + ../../include + CompileAsC + + + Windows + true + + + + + + + Level3 + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;MBEDTLS_EXPORTS;%(PreprocessorDefinitions) + ../../include + CompileAsC + + + Windows + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;MBEDTLS_EXPORTS;%(PreprocessorDefinitions) + ../../include + + + Windows + true + true + true + + + + + Level3 + + + MaxSpeed + true + true + WIN64;NDEBUG;_WINDOWS;_USRDLL;MBEDTLS_EXPORTS;%(PreprocessorDefinitions) + ../../include + + + Windows + true + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/visualc/VS2010/md5sum.vcxproj b/visualc/VS2010/md5sum.vcxproj index bb4ee8abe..0b85c73bc 100644 --- a/visualc/VS2010/md5sum.vcxproj +++ b/visualc/VS2010/md5sum.vcxproj @@ -22,12 +22,12 @@ - + {46cf2d25-6a36-4189-b59c-e4815388e554} - {D4F79297-4960-6D63-D50E-5823C50ED124} + {80FE1ECF-6992-A275-7973-E2976718D128} Win32Proj md5sum @@ -96,7 +96,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -116,7 +116,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -140,7 +140,7 @@ true true Release - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib diff --git a/visualc/VS2010/mpi_demo.vcxproj b/visualc/VS2010/mpi_demo.vcxproj index 9c225a611..61641616a 100644 --- a/visualc/VS2010/mpi_demo.vcxproj +++ b/visualc/VS2010/mpi_demo.vcxproj @@ -22,12 +22,12 @@ - + {46cf2d25-6a36-4189-b59c-e4815388e554} - {08A79AF8-5B8A-4343-D01A-B8AB47F3366C} + {A59FAA0B-9C34-1F99-794D-A365A3AA8CCE} Win32Proj mpi_demo @@ -96,7 +96,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -116,7 +116,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -140,7 +140,7 @@ true true Release - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib diff --git a/visualc/VS2010/pem2der.vcxproj b/visualc/VS2010/pem2der.vcxproj index be92d3f7b..57e6318eb 100644 --- a/visualc/VS2010/pem2der.vcxproj +++ b/visualc/VS2010/pem2der.vcxproj @@ -22,12 +22,12 @@ - + {46cf2d25-6a36-4189-b59c-e4815388e554} - {ACFFE3C9-3628-9B99-E0C9-36CF95F86B5F} + {D3C6FBD6-D78E-7180-8345-5E09B492DBEC} Win32Proj pem2der @@ -96,7 +96,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -116,7 +116,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -140,7 +140,7 @@ true true Release - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib diff --git a/visualc/VS2010/pk_decrypt.vcxproj b/visualc/VS2010/pk_decrypt.vcxproj index d3df49be0..1416a9251 100644 --- a/visualc/VS2010/pk_decrypt.vcxproj +++ b/visualc/VS2010/pk_decrypt.vcxproj @@ -22,12 +22,12 @@ - + {46cf2d25-6a36-4189-b59c-e4815388e554} - {C69CD150-7174-FA91-9E6E-B7DDD56FDE8E} + {1EC6CBA3-6187-D456-D9B7-A35399395D71} Win32Proj pk_decrypt @@ -96,7 +96,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -116,7 +116,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -140,7 +140,7 @@ true true Release - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib diff --git a/visualc/VS2010/pk_encrypt.vcxproj b/visualc/VS2010/pk_encrypt.vcxproj index 4cd5e8946..c0746c442 100644 --- a/visualc/VS2010/pk_encrypt.vcxproj +++ b/visualc/VS2010/pk_encrypt.vcxproj @@ -22,12 +22,12 @@ - + {46cf2d25-6a36-4189-b59c-e4815388e554} - {239051A9-0CE6-7730-7BB0-83599DC37AA4} + {55007179-7746-9CFB-97EC-65102FB272C8} Win32Proj pk_encrypt @@ -96,7 +96,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -116,7 +116,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -140,7 +140,7 @@ true true Release - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib diff --git a/visualc/VS2010/pk_sign.vcxproj b/visualc/VS2010/pk_sign.vcxproj index 52501b71c..fd2440129 100644 --- a/visualc/VS2010/pk_sign.vcxproj +++ b/visualc/VS2010/pk_sign.vcxproj @@ -22,12 +22,12 @@ - + {46cf2d25-6a36-4189-b59c-e4815388e554} - {EBDBB632-13A2-45F8-A44E-4837F6467512} + {F2E8CA55-597F-7FDC-6456-D8650FB970A3} Win32Proj pk_sign @@ -96,7 +96,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -116,7 +116,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -140,7 +140,7 @@ true true Release - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib diff --git a/visualc/VS2010/pk_verify.vcxproj b/visualc/VS2010/pk_verify.vcxproj index 00ed98f6b..e46b4f631 100644 --- a/visualc/VS2010/pk_verify.vcxproj +++ b/visualc/VS2010/pk_verify.vcxproj @@ -22,12 +22,12 @@ - + {46cf2d25-6a36-4189-b59c-e4815388e554} - {CA8D1EDA-2881-55E0-8F1C-B379B5AA7B56} + {C429B336-1B30-119C-3B34-21A186D6744F} Win32Proj pk_verify @@ -96,7 +96,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -116,7 +116,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -140,7 +140,7 @@ true true Release - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib diff --git a/visualc/VS2010/rsa_decrypt.vcxproj b/visualc/VS2010/rsa_decrypt.vcxproj index d08083dda..1ba205ee5 100644 --- a/visualc/VS2010/rsa_decrypt.vcxproj +++ b/visualc/VS2010/rsa_decrypt.vcxproj @@ -22,12 +22,12 @@ - + {46cf2d25-6a36-4189-b59c-e4815388e554} - {7E3D99BD-3D9E-762A-E235-9C8275E7010F} + {E0D71D72-8DF4-CCFC-EF60-741EADAB8BF9} Win32Proj rsa_decrypt @@ -96,7 +96,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -116,7 +116,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -140,7 +140,7 @@ true true Release - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib diff --git a/visualc/VS2010/rsa_encrypt.vcxproj b/visualc/VS2010/rsa_encrypt.vcxproj index 8982628cb..5a1225170 100644 --- a/visualc/VS2010/rsa_encrypt.vcxproj +++ b/visualc/VS2010/rsa_encrypt.vcxproj @@ -22,12 +22,12 @@ - + {46cf2d25-6a36-4189-b59c-e4815388e554} - {DA85604D-9ED1-FD08-4F37-FBD33E5E3642} + {D06CF12E-F222-9273-41BF-B8A052FA5527} Win32Proj rsa_encrypt @@ -96,7 +96,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -116,7 +116,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -140,7 +140,7 @@ true true Release - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib diff --git a/visualc/VS2010/rsa_genkey.vcxproj b/visualc/VS2010/rsa_genkey.vcxproj index e39d46dbd..f80371d3e 100644 --- a/visualc/VS2010/rsa_genkey.vcxproj +++ b/visualc/VS2010/rsa_genkey.vcxproj @@ -22,12 +22,12 @@ - + {46cf2d25-6a36-4189-b59c-e4815388e554} - {AD5B2F84-44A2-8D21-D47D-07E0ED7E0AAD} + {F472475C-F677-0E7F-F127-45BF5B64F622} Win32Proj rsa_genkey @@ -96,7 +96,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -116,7 +116,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -140,7 +140,7 @@ true true Release - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib diff --git a/visualc/VS2010/rsa_sign.vcxproj b/visualc/VS2010/rsa_sign.vcxproj index c506f6eff..a96572a59 100644 --- a/visualc/VS2010/rsa_sign.vcxproj +++ b/visualc/VS2010/rsa_sign.vcxproj @@ -22,12 +22,12 @@ - + {46cf2d25-6a36-4189-b59c-e4815388e554} - {CFC883CE-9BAE-B26F-B08B-7F194AD35929} + {10790F49-6887-AAB6-2D86-BCBD516F8D26} Win32Proj rsa_sign @@ -96,7 +96,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -116,7 +116,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -140,7 +140,7 @@ true true Release - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib diff --git a/visualc/VS2010/rsa_sign_pss.vcxproj b/visualc/VS2010/rsa_sign_pss.vcxproj index 0b74bbbb6..ab5a64f4a 100644 --- a/visualc/VS2010/rsa_sign_pss.vcxproj +++ b/visualc/VS2010/rsa_sign_pss.vcxproj @@ -22,12 +22,12 @@ - + {46cf2d25-6a36-4189-b59c-e4815388e554} - {34A00BC1-32A6-5145-606F-F081D31CC1D1} + {DCD3A1B6-5EC1-8266-93EF-BD2B9BEFE12D} Win32Proj rsa_sign_pss @@ -96,7 +96,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -116,7 +116,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -140,7 +140,7 @@ true true Release - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib diff --git a/visualc/VS2010/rsa_verify.vcxproj b/visualc/VS2010/rsa_verify.vcxproj index 8b8410c78..55f63e55b 100644 --- a/visualc/VS2010/rsa_verify.vcxproj +++ b/visualc/VS2010/rsa_verify.vcxproj @@ -22,12 +22,12 @@ - + {46cf2d25-6a36-4189-b59c-e4815388e554} - {77834257-2878-A38D-AEBE-79423968B6DB} + {689E28CF-89ED-BA38-3A14-78A75D891D46} Win32Proj rsa_verify @@ -96,7 +96,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -116,7 +116,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -140,7 +140,7 @@ true true Release - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib diff --git a/visualc/VS2010/rsa_verify_pss.vcxproj b/visualc/VS2010/rsa_verify_pss.vcxproj index df54f61ec..f6b574474 100644 --- a/visualc/VS2010/rsa_verify_pss.vcxproj +++ b/visualc/VS2010/rsa_verify_pss.vcxproj @@ -22,12 +22,12 @@ - + {46cf2d25-6a36-4189-b59c-e4815388e554} - {DAD91B2F-DEC8-E94F-8D9A-66B6E237AF07} + {95C50864-854C-2A11-4C91-BCE654E344FB} Win32Proj rsa_verify_pss @@ -96,7 +96,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -116,7 +116,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -140,7 +140,7 @@ true true Release - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib diff --git a/visualc/VS2010/selftest.vcxproj b/visualc/VS2010/selftest.vcxproj index 8edf196a4..1da6997f0 100644 --- a/visualc/VS2010/selftest.vcxproj +++ b/visualc/VS2010/selftest.vcxproj @@ -22,12 +22,12 @@ - + {46cf2d25-6a36-4189-b59c-e4815388e554} - {4DD758B5-6FC5-66C0-1D26-22C74C88FEF3} + {7DBC5F77-3DA1-5F73-8421-E693D95FC66A} Win32Proj selftest @@ -96,7 +96,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -116,7 +116,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -140,7 +140,7 @@ true true Release - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib diff --git a/visualc/VS2010/sha1sum.vcxproj b/visualc/VS2010/sha1sum.vcxproj index e4b0cea81..bbb5fabde 100644 --- a/visualc/VS2010/sha1sum.vcxproj +++ b/visualc/VS2010/sha1sum.vcxproj @@ -22,12 +22,12 @@ - + {46cf2d25-6a36-4189-b59c-e4815388e554} - {A0278E64-D98F-842D-438A-6747411CE76F} + {E91D12D7-01C0-357F-CAB1-8478B096743C} Win32Proj sha1sum @@ -96,7 +96,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -116,7 +116,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -140,7 +140,7 @@ true true Release - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib diff --git a/visualc/VS2010/sha2sum.vcxproj b/visualc/VS2010/sha2sum.vcxproj index 821050a75..ed821ee52 100644 --- a/visualc/VS2010/sha2sum.vcxproj +++ b/visualc/VS2010/sha2sum.vcxproj @@ -22,12 +22,12 @@ - + {46cf2d25-6a36-4189-b59c-e4815388e554} - {BAF92F6C-E5BE-95B7-6E36-823A1779A818} + {8C5CF095-A0A4-54FB-0D48-8DF2B7FE4CA5} Win32Proj sha2sum @@ -96,7 +96,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -116,7 +116,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -140,7 +140,7 @@ true true Release - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib diff --git a/visualc/VS2010/ssl_cert_test.vcxproj b/visualc/VS2010/ssl_cert_test.vcxproj index e47ec9a25..38d9fe526 100644 --- a/visualc/VS2010/ssl_cert_test.vcxproj +++ b/visualc/VS2010/ssl_cert_test.vcxproj @@ -22,12 +22,12 @@ - + {46cf2d25-6a36-4189-b59c-e4815388e554} - {173A0BC9-FF81-3C36-7887-4FBD6032C9FD} + {3FE0C0E1-D9BA-6A26-380C-F293E543B914} Win32Proj ssl_cert_test @@ -96,7 +96,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -116,7 +116,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -140,7 +140,7 @@ true true Release - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib diff --git a/visualc/VS2010/ssl_client1.vcxproj b/visualc/VS2010/ssl_client1.vcxproj index bdcec8b40..8400cafe8 100644 --- a/visualc/VS2010/ssl_client1.vcxproj +++ b/visualc/VS2010/ssl_client1.vcxproj @@ -22,12 +22,12 @@ - + {46cf2d25-6a36-4189-b59c-e4815388e554} - {CE90D346-EBC0-D292-6D68-24717DB3F510} + {487A2F80-3CA3-678D-88D5-82194872CF08} Win32Proj ssl_client1 @@ -96,7 +96,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -116,7 +116,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -140,7 +140,7 @@ true true Release - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib diff --git a/visualc/VS2010/ssl_client2.vcxproj b/visualc/VS2010/ssl_client2.vcxproj index 62cd2bded..de1479cf8 100644 --- a/visualc/VS2010/ssl_client2.vcxproj +++ b/visualc/VS2010/ssl_client2.vcxproj @@ -22,12 +22,12 @@ - + {46cf2d25-6a36-4189-b59c-e4815388e554} - {436AF1C2-99E7-32FA-5BFA-641F1FF2C57D} + {4E590E9D-E28F-87FF-385B-D58736388231} Win32Proj ssl_client2 @@ -96,7 +96,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -116,7 +116,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -140,7 +140,7 @@ true true Release - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib diff --git a/visualc/VS2010/ssl_fork_server.vcxproj b/visualc/VS2010/ssl_fork_server.vcxproj index b0e55f0f4..35246969f 100644 --- a/visualc/VS2010/ssl_fork_server.vcxproj +++ b/visualc/VS2010/ssl_fork_server.vcxproj @@ -22,12 +22,12 @@ - + {46cf2d25-6a36-4189-b59c-e4815388e554} - {D8295912-D341-F4E4-DC8E-98A2A0604221} + {918CD402-047D-8467-E11C-E1132053F916} Win32Proj ssl_fork_server @@ -96,7 +96,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -116,7 +116,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -140,7 +140,7 @@ true true Release - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib diff --git a/visualc/VS2010/ssl_mail_client.vcxproj b/visualc/VS2010/ssl_mail_client.vcxproj index 8ffc3adbe..c5a21c17e 100644 --- a/visualc/VS2010/ssl_mail_client.vcxproj +++ b/visualc/VS2010/ssl_mail_client.vcxproj @@ -22,12 +22,12 @@ - + {46cf2d25-6a36-4189-b59c-e4815388e554} - {68EFA4E3-08B0-2925-0EF6-177996B08B24} + {7C4863A1-941A-C5AE-E1F9-30F062E4B2FD} Win32Proj ssl_mail_client @@ -96,7 +96,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -116,7 +116,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -140,7 +140,7 @@ true true Release - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib diff --git a/visualc/VS2010/ssl_server.vcxproj b/visualc/VS2010/ssl_server.vcxproj index d75f9f1d8..982c96387 100644 --- a/visualc/VS2010/ssl_server.vcxproj +++ b/visualc/VS2010/ssl_server.vcxproj @@ -22,12 +22,12 @@ - + {46cf2d25-6a36-4189-b59c-e4815388e554} - {C49B1EF8-D169-70C5-2FA4-837A900267A7} + {E08E0065-896A-7487-DEA5-D3B80B71F975} Win32Proj ssl_server @@ -96,7 +96,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -116,7 +116,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -140,7 +140,7 @@ true true Release - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib diff --git a/visualc/VS2010/ssl_server2.vcxproj b/visualc/VS2010/ssl_server2.vcxproj index df0585ed8..c2b215470 100644 --- a/visualc/VS2010/ssl_server2.vcxproj +++ b/visualc/VS2010/ssl_server2.vcxproj @@ -22,12 +22,12 @@ - + {46cf2d25-6a36-4189-b59c-e4815388e554} - {870B39B9-8F38-D9A4-8A07-87047C565061} + {A4DA7463-1047-BDF5-E1B3-5632CB573F41} Win32Proj ssl_server2 @@ -96,7 +96,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -116,7 +116,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -140,7 +140,7 @@ true true Release - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib diff --git a/visualc/VS2010/ssl_test.vcxproj b/visualc/VS2010/ssl_test.vcxproj index 233275874..069bd2dac 100644 --- a/visualc/VS2010/ssl_test.vcxproj +++ b/visualc/VS2010/ssl_test.vcxproj @@ -22,12 +22,12 @@ - + {46cf2d25-6a36-4189-b59c-e4815388e554} - {0FC4D326-CF64-AB19-B037-3E3D06EA6798} + {DDD0BF0A-779A-DEFD-6A1C-FA2164AE9A34} Win32Proj ssl_test @@ -96,7 +96,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -116,7 +116,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -140,7 +140,7 @@ true true Release - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib diff --git a/visualc/VS2010/strerror.vcxproj b/visualc/VS2010/strerror.vcxproj index 03a4da16d..f641f7a55 100644 --- a/visualc/VS2010/strerror.vcxproj +++ b/visualc/VS2010/strerror.vcxproj @@ -22,12 +22,12 @@ - + {46cf2d25-6a36-4189-b59c-e4815388e554} - {9D625831-AF31-CFBA-8855-61C024DA2DE0} + {23EF735C-CC4C-3EC4-A75E-903DB340F04A} Win32Proj strerror @@ -96,7 +96,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -116,7 +116,7 @@ Console true NotSet - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib Debug @@ -140,7 +140,7 @@ true true Release - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);PolarSSL.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);mbedTLS.lib diff --git a/visualc/VS6/polarssl.dsp b/visualc/VS6/mbedtls.dsp similarity index 90% rename from visualc/VS6/polarssl.dsp rename to visualc/VS6/mbedtls.dsp index 17e9e70fc..9d7d9006c 100644 --- a/visualc/VS6/polarssl.dsp +++ b/visualc/VS6/mbedtls.dsp @@ -1,624 +1,624 @@ -# Microsoft Developer Studio Project File - Name="polarssl" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=polarssl - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "polarssl.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "polarssl.mak" CFG="polarssl - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "polarssl - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "polarssl - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "polarssl - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "" -# PROP BASE Intermediate_Dir "temp" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "" -# PROP Intermediate_Dir "temp" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../../include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD BASE RSC /l 0x40c /d "NDEBUG" -# ADD RSC /l 0x40c /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "polarssl - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "" -# PROP BASE Intermediate_Dir "temp" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "" -# PROP Intermediate_Dir "temp" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /GX /Z7 /Od /I "../../include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD BASE RSC /l 0x40c /d "_DEBUG" -# ADD RSC /l 0x40c /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "polarssl - Win32 Release" -# Name "polarssl - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\library\aes.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\aesni.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\arc4.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\asn1parse.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\asn1write.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\base64.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\bignum.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\blowfish.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\camellia.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\ccm.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\certs.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\cipher.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\cipher_wrap.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\ctr_drbg.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\debug.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\des.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\dhm.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\ecdh.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\ecdsa.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\ecp.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\ecp_curves.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\entropy.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\entropy_poll.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\error.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\gcm.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\havege.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\hmac_drbg.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\md.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\md2.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\md4.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\md5.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\md_wrap.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\memory_buffer_alloc.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\net.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\oid.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\padlock.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\pbkdf2.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\pem.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\pk.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\pk_wrap.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\pkcs11.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\pkcs12.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\pkcs5.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\pkparse.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\pkwrite.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\platform.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\ripemd160.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\rsa.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\sha1.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\sha256.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\sha512.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\ssl_cache.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\ssl_ciphersuites.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\ssl_cli.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\ssl_srv.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\ssl_tls.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\threading.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\timing.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\version.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\version_features.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\x509.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\x509_create.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\x509_crl.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\x509_crt.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\x509_csr.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\x509write_crt.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\x509write_csr.c -# End Source File -# Begin Source File - -SOURCE=..\..\library\xtea.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\include\polarssl\aes.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\aesni.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\arc4.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\asn1.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\asn1write.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\base64.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\bignum.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\blowfish.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\bn_mul.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\camellia.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\ccm.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\certs.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\check_config.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\cipher.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\cipher_wrap.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\compat-1.2.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\config.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\ctr_drbg.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\debug.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\des.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\dhm.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\ecdh.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\ecdsa.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\ecp.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\entropy.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\entropy_poll.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\error.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\gcm.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\havege.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\hmac_drbg.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\md.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\md2.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\md4.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\md5.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\md_wrap.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\memory.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\memory_buffer_alloc.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\net.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\oid.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\openssl.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\padlock.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\pbkdf2.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\pem.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\pk.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\pk_wrap.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\pkcs11.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\pkcs12.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\pkcs5.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\platform.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\ripemd160.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\rsa.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\sha1.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\sha256.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\sha512.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\ssl.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\ssl_cache.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\ssl_ciphersuites.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\threading.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\timing.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\version.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\x509.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\x509_crl.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\x509_crt.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\x509_csr.h -# End Source File -# Begin Source File - -SOURCE=..\..\include\polarssl\xtea.h -# End Source File -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="mbedtls" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=mbedtls - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "mbedtls.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "mbedtls.mak" CFG="mbedtls - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "mbedtls - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "mbedtls - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "mbedtls - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "" +# PROP BASE Intermediate_Dir "temp" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "" +# PROP Intermediate_Dir "temp" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../../include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD BASE RSC /l 0x40c /d "NDEBUG" +# ADD RSC /l 0x40c /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "mbedtls - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "" +# PROP BASE Intermediate_Dir "temp" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "" +# PROP Intermediate_Dir "temp" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /GX /Z7 /Od /I "../../include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD BASE RSC /l 0x40c /d "_DEBUG" +# ADD RSC /l 0x40c /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "mbedtls - Win32 Release" +# Name "mbedtls - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\library\aes.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\aesni.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\arc4.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\asn1parse.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\asn1write.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\base64.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\bignum.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\blowfish.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\camellia.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\ccm.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\certs.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\cipher.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\cipher_wrap.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\ctr_drbg.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\debug.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\des.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\dhm.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\ecdh.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\ecdsa.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\ecp.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\ecp_curves.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\entropy.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\entropy_poll.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\error.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\gcm.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\havege.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\hmac_drbg.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\md.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\md2.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\md4.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\md5.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\md_wrap.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\memory_buffer_alloc.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\net.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\oid.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\padlock.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\pbkdf2.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\pem.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\pk.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\pk_wrap.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\pkcs11.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\pkcs12.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\pkcs5.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\pkparse.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\pkwrite.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\platform.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\ripemd160.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\rsa.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\sha1.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\sha256.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\sha512.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\ssl_cache.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\ssl_ciphersuites.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\ssl_cli.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\ssl_srv.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\ssl_tls.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\threading.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\timing.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\version.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\version_features.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\x509.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\x509_create.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\x509_crl.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\x509_crt.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\x509_csr.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\x509write_crt.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\x509write_csr.c +# End Source File +# Begin Source File + +SOURCE=..\..\library\xtea.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\include\polarssl\aes.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\aesni.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\arc4.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\asn1.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\asn1write.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\base64.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\bignum.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\blowfish.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\bn_mul.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\camellia.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\ccm.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\certs.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\check_config.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\cipher.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\cipher_wrap.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\compat-1.2.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\config.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\ctr_drbg.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\debug.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\des.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\dhm.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\ecdh.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\ecdsa.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\ecp.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\entropy.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\entropy_poll.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\error.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\gcm.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\havege.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\hmac_drbg.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\md.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\md2.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\md4.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\md5.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\md_wrap.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\memory.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\memory_buffer_alloc.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\net.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\oid.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\openssl.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\padlock.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\pbkdf2.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\pem.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\pk.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\pk_wrap.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\pkcs11.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\pkcs12.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\pkcs5.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\platform.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\ripemd160.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\rsa.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\sha1.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\sha256.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\sha512.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\ssl.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\ssl_cache.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\ssl_ciphersuites.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\threading.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\timing.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\version.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\x509.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\x509_crl.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\x509_crt.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\x509_csr.h +# End Source File +# Begin Source File + +SOURCE=..\..\include\polarssl\xtea.h +# End Source File +# End Group +# End Target +# End Project diff --git a/visualc/VS6/polarssl.dsw b/visualc/VS6/mbedtls.dsw similarity index 84% rename from visualc/VS6/polarssl.dsw rename to visualc/VS6/mbedtls.dsw index 105e60454..d92afc34d 100644 --- a/visualc/VS6/polarssl.dsw +++ b/visualc/VS6/mbedtls.dsw @@ -1,662 +1,661 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "aescrypt2"=.\aescrypt2.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name polarssl - End Project Dependency -}}} - -############################################################################### - -Project: "crypt_and_hash"=.\crypt_and_hash.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name polarssl - End Project Dependency -}}} - -############################################################################### - -Project: "hello"=.\hello.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name polarssl - End Project Dependency -}}} - -############################################################################### - -Project: "generic_sum"=.\generic_sum.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name polarssl - End Project Dependency -}}} - -############################################################################### - -Project: "md5sum"=.\md5sum.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name polarssl - End Project Dependency -}}} - -############################################################################### - -Project: "sha1sum"=.\sha1sum.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name polarssl - End Project Dependency -}}} - -############################################################################### - -Project: "sha2sum"=.\sha2sum.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name polarssl - End Project Dependency -}}} - -############################################################################### - -Project: "dh_client"=.\dh_client.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name polarssl - End Project Dependency -}}} - -############################################################################### - -Project: "dh_genprime"=.\dh_genprime.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name polarssl - End Project Dependency -}}} - -############################################################################### - -Project: "dh_server"=.\dh_server.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name polarssl - End Project Dependency -}}} - -############################################################################### - -Project: "gen_key"=.\gen_key.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name polarssl - End Project Dependency -}}} - -############################################################################### - -Project: "key_app"=.\key_app.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name polarssl - End Project Dependency -}}} - -############################################################################### - -Project: "key_app_writer"=.\key_app_writer.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name polarssl - End Project Dependency -}}} - -############################################################################### - -Project: "mpi_demo"=.\mpi_demo.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name polarssl - End Project Dependency -}}} - -############################################################################### - -Project: "pk_decrypt"=.\pk_decrypt.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name polarssl - End Project Dependency -}}} - -############################################################################### - -Project: "pk_encrypt"=.\pk_encrypt.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name polarssl - End Project Dependency -}}} - -############################################################################### - -Project: "pk_sign"=.\pk_sign.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name polarssl - End Project Dependency -}}} - -############################################################################### - -Project: "pk_verify"=.\pk_verify.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name polarssl - End Project Dependency -}}} - -############################################################################### - -Project: "rsa_genkey"=.\rsa_genkey.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name polarssl - End Project Dependency -}}} - -############################################################################### - -Project: "rsa_decrypt"=.\rsa_decrypt.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name polarssl - End Project Dependency -}}} - -############################################################################### - -Project: "rsa_encrypt"=.\rsa_encrypt.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name polarssl - End Project Dependency -}}} - -############################################################################### - -Project: "rsa_sign"=.\rsa_sign.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name polarssl - End Project Dependency -}}} - -############################################################################### - -Project: "rsa_verify"=.\rsa_verify.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name polarssl - End Project Dependency -}}} - -############################################################################### - -Project: "rsa_sign_pss"=.\rsa_sign_pss.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name polarssl - End Project Dependency -}}} - -############################################################################### - -Project: "rsa_verify_pss"=.\rsa_verify_pss.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name polarssl - End Project Dependency -}}} - -############################################################################### - -Project: "ssl_client1"=.\ssl_client1.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name polarssl - End Project Dependency -}}} - -############################################################################### - -Project: "ssl_client2"=.\ssl_client2.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name polarssl - End Project Dependency -}}} - -############################################################################### - -Project: "ssl_server"=.\ssl_server.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name polarssl - End Project Dependency -}}} - -############################################################################### - -Project: "ssl_server2"=.\ssl_server2.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name polarssl - End Project Dependency -}}} - -############################################################################### - -Project: "ssl_fork_server"=.\ssl_fork_server.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name polarssl - End Project Dependency -}}} - -############################################################################### - -Project: "ssl_mail_client"=.\ssl_mail_client.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name polarssl - End Project Dependency -}}} - -############################################################################### - -Project: "gen_entropy"=.\gen_entropy.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name polarssl - End Project Dependency -}}} - -############################################################################### - -Project: "gen_random_havege"=.\gen_random_havege.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name polarssl - End Project Dependency -}}} - -############################################################################### - -Project: "gen_random_ctr_drbg"=.\gen_random_ctr_drbg.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name polarssl - End Project Dependency -}}} - -############################################################################### - -Project: "ssl_cert_test"=.\ssl_cert_test.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name polarssl - End Project Dependency -}}} - -############################################################################### - -Project: "benchmark"=.\benchmark.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name polarssl - End Project Dependency -}}} - -############################################################################### - -Project: "selftest"=.\selftest.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name polarssl - End Project Dependency -}}} - -############################################################################### - -Project: "ssl_test"=.\ssl_test.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name polarssl - End Project Dependency -}}} - -############################################################################### - -Project: "pem2der"=.\pem2der.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name polarssl - End Project Dependency -}}} - -############################################################################### - -Project: "strerror"=.\strerror.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name polarssl - End Project Dependency -}}} - -############################################################################### - -Project: "cert_app"=.\cert_app.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name polarssl - End Project Dependency -}}} - -############################################################################### - -Project: "crl_app"=.\crl_app.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name polarssl - End Project Dependency -}}} - -############################################################################### - -Project: "cert_req"=.\cert_req.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name polarssl - End Project Dependency -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "aescrypt2"=.\aescrypt2.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name mbedtls + End Project Dependency +}}} + +############################################################################### + +Project: "crypt_and_hash"=.\crypt_and_hash.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name mbedtls + End Project Dependency +}}} + +############################################################################### + +Project: "hello"=.\hello.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name mbedtls + End Project Dependency +}}} + +############################################################################### + +Project: "generic_sum"=.\generic_sum.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name mbedtls + End Project Dependency +}}} + +############################################################################### + +Project: "md5sum"=.\md5sum.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name mbedtls + End Project Dependency +}}} + +############################################################################### + +Project: "sha1sum"=.\sha1sum.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name mbedtls + End Project Dependency +}}} + +############################################################################### + +Project: "sha2sum"=.\sha2sum.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name mbedtls + End Project Dependency +}}} + +############################################################################### + +Project: "dh_client"=.\dh_client.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name mbedtls + End Project Dependency +}}} + +############################################################################### + +Project: "dh_genprime"=.\dh_genprime.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name mbedtls + End Project Dependency +}}} + +############################################################################### + +Project: "dh_server"=.\dh_server.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name mbedtls + End Project Dependency +}}} + +############################################################################### + +Project: "gen_key"=.\gen_key.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name mbedtls + End Project Dependency +}}} + +############################################################################### + +Project: "key_app"=.\key_app.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name mbedtls + End Project Dependency +}}} + +############################################################################### + +Project: "key_app_writer"=.\key_app_writer.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name mbedtls + End Project Dependency +}}} + +############################################################################### + +Project: "mpi_demo"=.\mpi_demo.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name mbedtls + End Project Dependency +}}} + +############################################################################### + +Project: "pk_decrypt"=.\pk_decrypt.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name mbedtls + End Project Dependency +}}} + +############################################################################### + +Project: "pk_encrypt"=.\pk_encrypt.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name mbedtls + End Project Dependency +}}} + +############################################################################### + +Project: "pk_sign"=.\pk_sign.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name mbedtls + End Project Dependency +}}} + +############################################################################### + +Project: "pk_verify"=.\pk_verify.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name mbedtls + End Project Dependency +}}} + +############################################################################### + +Project: "rsa_genkey"=.\rsa_genkey.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name mbedtls + End Project Dependency +}}} + +############################################################################### + +Project: "rsa_decrypt"=.\rsa_decrypt.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name mbedtls + End Project Dependency +}}} + +############################################################################### + +Project: "rsa_encrypt"=.\rsa_encrypt.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name mbedtls + End Project Dependency +}}} + +############################################################################### + +Project: "rsa_sign"=.\rsa_sign.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name mbedtls + End Project Dependency +}}} + +############################################################################### + +Project: "rsa_verify"=.\rsa_verify.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name mbedtls + End Project Dependency +}}} + +############################################################################### + +Project: "rsa_sign_pss"=.\rsa_sign_pss.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name mbedtls + End Project Dependency +}}} + +############################################################################### + +Project: "rsa_verify_pss"=.\rsa_verify_pss.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name mbedtls + End Project Dependency +}}} + +############################################################################### + +Project: "ssl_client1"=.\ssl_client1.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name mbedtls + End Project Dependency +}}} + +############################################################################### + +Project: "ssl_client2"=.\ssl_client2.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name mbedtls + End Project Dependency +}}} + +############################################################################### + +Project: "ssl_server"=.\ssl_server.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name mbedtls + End Project Dependency +}}} + +############################################################################### + +Project: "ssl_server2"=.\ssl_server2.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name mbedtls + End Project Dependency +}}} + +############################################################################### + +Project: "ssl_fork_server"=.\ssl_fork_server.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name mbedtls + End Project Dependency +}}} + +############################################################################### + +Project: "ssl_mail_client"=.\ssl_mail_client.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name mbedtls + End Project Dependency +}}} + +############################################################################### + +Project: "gen_entropy"=.\gen_entropy.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name mbedtls + End Project Dependency +}}} + +############################################################################### + +Project: "gen_random_havege"=.\gen_random_havege.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name mbedtls + End Project Dependency +}}} + +############################################################################### + +Project: "gen_random_ctr_drbg"=.\gen_random_ctr_drbg.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name mbedtls + End Project Dependency +}}} + +############################################################################### + +Project: "ssl_cert_test"=.\ssl_cert_test.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name mbedtls + End Project Dependency +}}} + +############################################################################### + +Project: "benchmark"=.\benchmark.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name mbedtls + End Project Dependency +}}} + +############################################################################### + +Project: "selftest"=.\selftest.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name mbedtls + End Project Dependency +}}} + +############################################################################### + +Project: "ssl_test"=.\ssl_test.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name mbedtls + End Project Dependency +}}} + +############################################################################### + +Project: "pem2der"=.\pem2der.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name mbedtls + End Project Dependency +}}} + +############################################################################### + +Project: "strerror"=.\strerror.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name mbedtls + End Project Dependency +}}} + +############################################################################### + +Project: "cert_app"=.\cert_app.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name mbedtls + End Project Dependency +}}} + +############################################################################### + +Project: "crl_app"=.\crl_app.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name mbedtls + End Project Dependency +}}} + +############################################################################### + +Project: "cert_req"=.\cert_req.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name mbedtls + End Project Dependency +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### From 04a81d5c6512bdbdfd0ea63517432e15b9c12d73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Tue, 27 Jan 2015 11:24:05 +0100 Subject: [PATCH 14/46] Fix issue in previous commit Even with shared we need to build the static library since programs are using it. --- library/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/Makefile b/library/Makefile index 72e376c94..36c8a40e0 100644 --- a/library/Makefile +++ b/library/Makefile @@ -68,7 +68,7 @@ OBJS= aes.o aesni.o arc4.o \ ifndef SHARED all: static else -all: shared +all: shared static endif static: libpolarssl.a From 145422f74db8b27483a841e72f6b0d8c714cc5b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Mon, 26 Jan 2015 18:26:10 +0100 Subject: [PATCH 15/46] Make now creates libmbedtls.so with polarssl link --- library/Makefile | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/library/Makefile b/library/Makefile index 36c8a40e0..a7190d69e 100644 --- a/library/Makefile +++ b/library/Makefile @@ -22,7 +22,7 @@ ifdef SHARED CFLAGS += -fPIC endif -SONAME=libpolarssl.so.7 +SONAME=libmbedtls.so.7 DLEXT=so.7 # OSX shared library extension: @@ -73,7 +73,7 @@ endif static: libpolarssl.a -shared: libpolarssl.$(DLEXT) libpolarssl.so +shared: libpolarssl.so libpolarssl.a: libmbedtls.a echo " LN $@ -> $?" @@ -89,19 +89,27 @@ libmbedtls.a: $(OBJS) echo " RL $@" $(AR) s $@ -libpolarssl.${DLEXT}: $(OBJS) +libpolarssl.so: libmbedtls.so + echo " LN $@ -> $?" +ifndef WINDOWS + ln -sf $? $@ +else + copy /y /b $? $@ +endif + +libmbedtls.${DLEXT}: $(OBJS) echo " LD $@" $(CC) ${LDFLAGS} -shared -Wl,-soname,$(SONAME) -o $@ $(OBJS) -libpolarssl.so: libpolarssl.${DLEXT} - echo " LN $@ -> libpolarssl.${DLEXT}" - ln -sf libpolarssl.${DLEXT} $@ +libmbedtls.so: libmbedtls.${DLEXT} + echo " LN $@ -> libmbedtls.${DLEXT}" + ln -sf libmbedtls.${DLEXT} $@ -libpolarssl.dylib: $(OBJS) +libmbedtls.dylib: $(OBJS) echo " LD $@" $(CC) ${LDFLAGS} -dynamiclib -o $@ $(OBJS) -libpolarssl.dll: $(OBJS) +libmbedtls.dll: $(OBJS) echo " LD $@" $(CC) -shared -Wl,-soname,$@ -o $@ $(OBJS) -lws2_32 -lwinmm -lgdi32 From 6a4ae35788ef8bfeb9097d72a88f7e5d56175b00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Tue, 27 Jan 2015 14:03:24 +0100 Subject: [PATCH 16/46] Link to new name in programs & tests Makefiles --- programs/Makefile | 2 +- tests/Makefile | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/programs/Makefile b/programs/Makefile index b7fcf92c6..ba8dd316b 100644 --- a/programs/Makefile +++ b/programs/Makefile @@ -5,7 +5,7 @@ CFLAGS += -I../include -D_FILE_OFFSET_BITS=64 -Wall -W -Wdeclaration-after-statement OFLAGS = -O2 -LDFLAGS += -L../library -lpolarssl $(SYS_LDFLAGS) +LDFLAGS += -L../library -lmbedtls $(SYS_LDFLAGS) ifdef DEBUG CFLAGS += -g3 diff --git a/tests/Makefile b/tests/Makefile index a0753965b..850ff7bc7 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -7,14 +7,14 @@ CFLAGS += -I../include -D_FILE_OFFSET_BITS=64 -Wall -W -Wdeclaration-after-state -Wno-unused-function -Wno-unused-value OFLAGS = -O2 -LDFLAGS += -L../library -lpolarssl $(SYS_LDFLAGS) +LDFLAGS += -L../library -lmbedtls $(SYS_LDFLAGS) ifndef SHARED DEP=../library/libmbedtls.a CHECK_PRELOAD= else -DEP=../library/libpolarssl.so -CHECK_PRELOAD= LD_PRELOAD=../library/libpolarssl.so +DEP=../library/libmbedtls.so +CHECK_PRELOAD= LD_PRELOAD=../library/libmbedtls.so endif ifdef DEBUG From 5285970871409a592311fbbe81a3fb6f98f7d6fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Tue, 27 Jan 2015 14:05:16 +0100 Subject: [PATCH 17/46] Update name in install target for Make --- Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 17544a5c6..808290da1 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ DESTDIR=/usr/local -PREFIX=polarssl_ +PREFIX=mbedtls_ +OLDPREFIX=polarssl_ .SILENT: @@ -21,26 +22,31 @@ install: cp -r include/polarssl $(DESTDIR)/include mkdir -p $(DESTDIR)/lib - cp library/libpolarssl.* $(DESTDIR)/lib + cp library/libpolarssl.* library/libmbedtls.* $(DESTDIR)/lib mkdir -p $(DESTDIR)/bin for p in programs/*/* ; do \ if [ -x $$p ] && [ ! -d $$p ] ; \ then \ f=$(PREFIX)`basename $$p` ; \ + o=$(OLDPREFIX)`basename $$p` ; \ cp $$p $(DESTDIR)/bin/$$f ; \ + ln -sf $$f $(DESTDIR)/bin/$$o ; \ fi \ done uninstall: rm -rf $(DESTDIR)/include/polarssl rm -f $(DESTDIR)/lib/libpolarssl.* + rm -f $(DESTDIR)/lib/libmbedtls.* for p in programs/*/* ; do \ if [ -x $$p ] && [ ! -d $$p ] ; \ then \ f=$(PREFIX)`basename $$p` ; \ + o=$(OLDPREFIX)`basename $$p` ; \ rm -f $(DESTDIR)/bin/$$f ; \ + rm -f $(DESTDIR)/bin/$$o ; \ fi \ done From 9014b6f227270d83ea781b7e763c28665b380032 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Tue, 27 Jan 2015 15:44:46 +0000 Subject: [PATCH 18/46] Rename project in CMake TODO: to create symlinks to the old names! --- CMakeLists.txt | 6 ++--- include/CMakeLists.txt | 6 ++--- library/CMakeLists.txt | 48 +++++++++++++++++----------------- programs/aes/CMakeLists.txt | 4 +-- programs/hash/CMakeLists.txt | 10 +++---- programs/pkey/CMakeLists.txt | 38 +++++++++++++-------------- programs/random/CMakeLists.txt | 6 ++--- programs/ssl/CMakeLists.txt | 2 +- programs/test/CMakeLists.txt | 2 +- programs/util/CMakeLists.txt | 2 +- programs/x509/CMakeLists.txt | 2 +- tests/CMakeLists.txt | 4 +-- 12 files changed, 65 insertions(+), 65 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d133de1fe..72c81b131 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 2.6) -project(POLARSSL C) +project(MBEDTLS C) string(REGEX MATCH "Clang" CMAKE_COMPILER_IS_CLANG "${CMAKE_C_COMPILER_ID}") @@ -98,8 +98,8 @@ if(ENABLE_TESTING) ADD_CUSTOM_TARGET(lcov COMMAND rm -rf Coverage - COMMAND lcov --capture --initial --directory library/CMakeFiles/polarssl.dir -o files.info - COMMAND lcov --capture --directory library/CMakeFiles/polarssl.dir -o tests.info + COMMAND lcov --capture --initial --directory library/CMakeFiles/mbedtls.dir -o files.info + COMMAND lcov --capture --directory library/CMakeFiles/mbedtls.dir -o tests.info COMMAND lcov --add-tracefile files.info --add-tracefile tests.info -o all.info COMMAND lcov --remove all.info -o final.info '*.h' COMMAND gendesc tests/Descriptions.txt -o descriptions diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index 17a098c34..2c568584f 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -1,6 +1,6 @@ -option(INSTALL_POLARSSL_HEADERS "Install mbed TLS headers." ON) +option(INSTALL_MBEDTLS_HEADERS "Install mbed TLS headers." ON) -if(INSTALL_POLARSSL_HEADERS) +if(INSTALL_MBEDTLS_HEADERS) file(GLOB headers "polarssl/*.h") @@ -8,4 +8,4 @@ install(FILES ${headers} DESTINATION include/polarssl PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ) -endif(INSTALL_POLARSSL_HEADERS) +endif(INSTALL_MBEDTLS_HEADERS) diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt index 4de96c93e..f738b3b2e 100644 --- a/library/CMakeLists.txt +++ b/library/CMakeLists.txt @@ -1,5 +1,5 @@ -option(USE_STATIC_POLARSSL_LIBRARY "Build mbed TLS static library." ON) -option(USE_SHARED_POLARSSL_LIBRARY "Build mbed TLS shared library." OFF) +option(USE_STATIC_MBEDTLS_LIBRARY "Build mbed TLS static library." ON) +option(USE_SHARED_MBEDTLS_LIBRARY "Build mbed TLS shared library." OFF) option(LINK_WITH_PTHREAD "Explicitly link mbed TLS library to pthread." OFF) set(src @@ -85,51 +85,51 @@ if(CMAKE_COMPILER_IS_CLANG) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-declarations -Wmissing-prototypes -Wdocumentation -Wunreachable-code") endif(CMAKE_COMPILER_IS_CLANG) -if (NOT USE_STATIC_POLARSSL_LIBRARY AND NOT USE_SHARED_POLARSSL_LIBRARY) - message(FATAL_ERROR "Need to choose static or shared polarssl build!") -endif(NOT USE_STATIC_POLARSSL_LIBRARY AND NOT USE_SHARED_POLARSSL_LIBRARY) +if (NOT USE_STATIC_MBEDTLS_LIBRARY AND NOT USE_SHARED_MBEDTLS_LIBRARY) + message(FATAL_ERROR "Need to choose static or shared mbedtls build!") +endif(NOT USE_STATIC_MBEDTLS_LIBRARY AND NOT USE_SHARED_MBEDTLS_LIBRARY) -if(USE_STATIC_POLARSSL_LIBRARY AND USE_SHARED_POLARSSL_LIBRARY) +if(USE_STATIC_MBEDTLS_LIBRARY AND USE_SHARED_MBEDTLS_LIBRARY) # if we build both static an shared, then let # tests and programs link to the shared lib target - set(polarssl_static_target "polarssl_static") -elseif(USE_STATIC_POLARSSL_LIBRARY) - set(polarssl_static_target "polarssl") + set(mbedtls_static_target "mbedtls_static") +elseif(USE_STATIC_MBEDTLS_LIBRARY) + set(mbedtls_static_target "mbedtls") endif() -if(USE_STATIC_POLARSSL_LIBRARY) - add_library(${polarssl_static_target} STATIC ${src}) - set_target_properties(${polarssl_static_target} PROPERTIES OUTPUT_NAME polarssl) - target_link_libraries(${polarssl_static_target} ${libs}) +if(USE_STATIC_MBEDTLS_LIBRARY) + add_library(${mbedtls_static_target} STATIC ${src}) + set_target_properties(${mbedtls_static_target} PROPERTIES OUTPUT_NAME mbedtls) + target_link_libraries(${mbedtls_static_target} ${libs}) if(ZLIB_FOUND) - target_link_libraries(${polarssl_static_target} ${ZLIB_LIBRARIES}) + target_link_libraries(${mbedtls_static_target} ${ZLIB_LIBRARIES}) endif(ZLIB_FOUND) if(LINK_WITH_PTHREAD) - target_link_libraries(${polarssl_static_target} pthread) + target_link_libraries(${mbedtls_static_target} pthread) endif() - install(TARGETS ${polarssl_static_target} + install(TARGETS ${mbedtls_static_target} DESTINATION ${LIB_INSTALL_DIR} PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) endif() -if(USE_SHARED_POLARSSL_LIBRARY) - add_library(polarssl SHARED ${src}) - set_target_properties(polarssl PROPERTIES VERSION 1.3.9 SOVERSION 7) +if(USE_SHARED_MBEDTLS_LIBRARY) + add_library(mbedtls SHARED ${src}) + set_target_properties(mbedtls PROPERTIES VERSION 1.3.9 SOVERSION 7) - target_link_libraries(polarssl ${libs}) + target_link_libraries(mbedtls ${libs}) if(ZLIB_FOUND) - target_link_libraries(polarssl ${ZLIB_LIBRARIES}) + target_link_libraries(mbedtls ${ZLIB_LIBRARIES}) endif(ZLIB_FOUND) if(LINK_WITH_PTHREAD) - target_link_libraries(polarssl pthread) + target_link_libraries(mbedtls pthread) endif() - install(TARGETS polarssl + install(TARGETS mbedtls DESTINATION ${LIB_INSTALL_DIR} PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) -endif(USE_SHARED_POLARSSL_LIBRARY) +endif(USE_SHARED_MBEDTLS_LIBRARY) diff --git a/programs/aes/CMakeLists.txt b/programs/aes/CMakeLists.txt index 9bac94a72..f5a0caabb 100644 --- a/programs/aes/CMakeLists.txt +++ b/programs/aes/CMakeLists.txt @@ -1,8 +1,8 @@ add_executable(aescrypt2 aescrypt2.c) -target_link_libraries(aescrypt2 polarssl) +target_link_libraries(aescrypt2 mbedtls) add_executable(crypt_and_hash crypt_and_hash.c) -target_link_libraries(crypt_and_hash polarssl) +target_link_libraries(crypt_and_hash mbedtls) install(TARGETS aescrypt2 crypt_and_hash DESTINATION "bin" diff --git a/programs/hash/CMakeLists.txt b/programs/hash/CMakeLists.txt index 870b8a0b7..f7a768966 100644 --- a/programs/hash/CMakeLists.txt +++ b/programs/hash/CMakeLists.txt @@ -1,17 +1,17 @@ add_executable(hello hello.c) -target_link_libraries(hello polarssl) +target_link_libraries(hello mbedtls) add_executable(generic_sum generic_sum.c) -target_link_libraries(generic_sum polarssl) +target_link_libraries(generic_sum mbedtls) add_executable(md5sum md5sum.c) -target_link_libraries(md5sum polarssl) +target_link_libraries(md5sum mbedtls) add_executable(sha1sum sha1sum.c) -target_link_libraries(sha1sum polarssl) +target_link_libraries(sha1sum mbedtls) add_executable(sha2sum sha2sum.c) -target_link_libraries(sha2sum polarssl) +target_link_libraries(sha2sum mbedtls) install(TARGETS hello md5sum sha1sum sha2sum generic_sum DESTINATION "bin" diff --git a/programs/pkey/CMakeLists.txt b/programs/pkey/CMakeLists.txt index 291ff99c8..8dc7def6e 100644 --- a/programs/pkey/CMakeLists.txt +++ b/programs/pkey/CMakeLists.txt @@ -1,59 +1,59 @@ add_executable(dh_client dh_client.c) -target_link_libraries(dh_client polarssl) +target_link_libraries(dh_client mbedtls) add_executable(dh_genprime dh_genprime.c) -target_link_libraries(dh_genprime polarssl) +target_link_libraries(dh_genprime mbedtls) add_executable(dh_server dh_server.c) -target_link_libraries(dh_server polarssl) +target_link_libraries(dh_server mbedtls) add_executable(ecdsa ecdsa.c) -target_link_libraries(ecdsa polarssl) +target_link_libraries(ecdsa mbedtls) add_executable(gen_key gen_key.c) -target_link_libraries(gen_key polarssl) +target_link_libraries(gen_key mbedtls) add_executable(key_app key_app.c) -target_link_libraries(key_app polarssl) +target_link_libraries(key_app mbedtls) add_executable(key_app_writer key_app_writer.c) -target_link_libraries(key_app_writer polarssl) +target_link_libraries(key_app_writer mbedtls) add_executable(mpi_demo mpi_demo.c) -target_link_libraries(mpi_demo polarssl) +target_link_libraries(mpi_demo mbedtls) add_executable(rsa_genkey rsa_genkey.c) -target_link_libraries(rsa_genkey polarssl) +target_link_libraries(rsa_genkey mbedtls) add_executable(rsa_sign rsa_sign.c) -target_link_libraries(rsa_sign polarssl) +target_link_libraries(rsa_sign mbedtls) add_executable(rsa_verify rsa_verify.c) -target_link_libraries(rsa_verify polarssl) +target_link_libraries(rsa_verify mbedtls) add_executable(rsa_sign_pss rsa_sign_pss.c) -target_link_libraries(rsa_sign_pss polarssl) +target_link_libraries(rsa_sign_pss mbedtls) add_executable(rsa_verify_pss rsa_verify_pss.c) -target_link_libraries(rsa_verify_pss polarssl) +target_link_libraries(rsa_verify_pss mbedtls) add_executable(rsa_encrypt rsa_encrypt.c) -target_link_libraries(rsa_encrypt polarssl) +target_link_libraries(rsa_encrypt mbedtls) add_executable(rsa_decrypt rsa_decrypt.c) -target_link_libraries(rsa_decrypt polarssl) +target_link_libraries(rsa_decrypt mbedtls) add_executable(pk_sign pk_sign.c) -target_link_libraries(pk_sign polarssl) +target_link_libraries(pk_sign mbedtls) add_executable(pk_verify pk_verify.c) -target_link_libraries(pk_verify polarssl) +target_link_libraries(pk_verify mbedtls) add_executable(pk_encrypt pk_encrypt.c) -target_link_libraries(pk_encrypt polarssl) +target_link_libraries(pk_encrypt mbedtls) add_executable(pk_decrypt pk_decrypt.c) -target_link_libraries(pk_decrypt polarssl) +target_link_libraries(pk_decrypt mbedtls) 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 DESTINATION "bin" diff --git a/programs/random/CMakeLists.txt b/programs/random/CMakeLists.txt index ae02bd103..30933d88d 100644 --- a/programs/random/CMakeLists.txt +++ b/programs/random/CMakeLists.txt @@ -1,11 +1,11 @@ add_executable(gen_random_havege gen_random_havege.c) -target_link_libraries(gen_random_havege polarssl) +target_link_libraries(gen_random_havege mbedtls) add_executable(gen_random_ctr_drbg gen_random_ctr_drbg.c) -target_link_libraries(gen_random_ctr_drbg polarssl) +target_link_libraries(gen_random_ctr_drbg mbedtls) add_executable(gen_entropy gen_entropy.c) -target_link_libraries(gen_entropy polarssl) +target_link_libraries(gen_entropy mbedtls) install(TARGETS gen_random_havege gen_random_ctr_drbg gen_entropy DESTINATION "bin" diff --git a/programs/ssl/CMakeLists.txt b/programs/ssl/CMakeLists.txt index e0cfba050..9ba924105 100644 --- a/programs/ssl/CMakeLists.txt +++ b/programs/ssl/CMakeLists.txt @@ -2,7 +2,7 @@ set(THREADS_USE_PTHREADS_WIN32 true) find_package(Threads) set(libs - polarssl + mbedtls ) set(targets diff --git a/programs/test/CMakeLists.txt b/programs/test/CMakeLists.txt index 758b7a55d..da3376e64 100644 --- a/programs/test/CMakeLists.txt +++ b/programs/test/CMakeLists.txt @@ -1,7 +1,7 @@ FIND_PACKAGE(OpenSSL) set(libs - polarssl + mbedtls ) if(USE_PKCS11_HELPER_LIBRARY) diff --git a/programs/util/CMakeLists.txt b/programs/util/CMakeLists.txt index aedd94f58..f302de74e 100644 --- a/programs/util/CMakeLists.txt +++ b/programs/util/CMakeLists.txt @@ -1,5 +1,5 @@ set(libs - polarssl + mbedtls ) add_executable(strerror strerror.c) diff --git a/programs/x509/CMakeLists.txt b/programs/x509/CMakeLists.txt index fe46da5db..4e39e4563 100644 --- a/programs/x509/CMakeLists.txt +++ b/programs/x509/CMakeLists.txt @@ -1,5 +1,5 @@ set(libs - polarssl + mbedtls ) if(USE_PKCS11_HELPER_LIBRARY) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 3cd7e3781..68e670708 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,5 +1,5 @@ set(libs - polarssl + mbedtls ) if(USE_PKCS11_HELPER_LIBRARY) @@ -20,7 +20,7 @@ function(add_test_suite suite_name) add_custom_command( OUTPUT test_suite_${data_name}.c COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/scripts/generate_code.pl ${CMAKE_CURRENT_SOURCE_DIR}/suites test_suite_${suite_name} test_suite_${data_name} - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/scripts/generate_code.pl polarssl suites/helpers.function suites/main_test.function suites/test_suite_${suite_name}.function suites/test_suite_${data_name}.data + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/scripts/generate_code.pl mbedtls suites/helpers.function suites/main_test.function suites/test_suite_${suite_name}.function suites/test_suite_${data_name}.data ) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) From 3d536ba30c23731c6382f372a7d92d8a0c096d4f Mon Sep 17 00:00:00 2001 From: Rich Evans Date: Wed, 14 Jan 2015 18:58:11 +0000 Subject: [PATCH 19/46] fix main_test.function to use polarssl (f)printf functions --- tests/suites/main_test.function | 37 +++++++++++++++++---------------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/tests/suites/main_test.function b/tests/suites/main_test.function index 9ebd9c3db..4a5e1041d 100644 --- a/tests/suites/main_test.function +++ b/tests/suites/main_test.function @@ -5,6 +5,7 @@ #include "polarssl/platform.h" #else #define polarssl_printf printf +#define polarssl_fprintf fprintf #define polarssl_malloc malloc #define polarssl_free free #endif @@ -25,8 +26,8 @@ static int test_assert( int correct, const char *test ) test_errors++; if( test_errors == 1 ) - printf( "FAILED\n" ); - printf( " %s\n", test ); + polarssl_printf( "FAILED\n" ); + polarssl_printf( " %s\n", test ); return( 1 ); } @@ -41,7 +42,7 @@ int verify_string( char **str ) if( (*str)[0] != '"' || (*str)[strlen( *str ) - 1] != '"' ) { - printf( "Expected string (with \"\") for parameter and got: %s\n", *str ); + polarssl_printf( "Expected string (with \"\") for parameter and got: %s\n", *str ); return( -1 ); } @@ -94,7 +95,7 @@ int verify_int( char *str, int *value ) MAPPING_CODE - printf( "Expected integer for parameter and got: %s\n", str ); + polarssl_printf( "Expected integer for parameter and got: %s\n", str ); return( -1 ); } @@ -120,7 +121,7 @@ int dispatch_test(int cnt, char *params[50]) #if defined(TEST_SUITE_ACTIVE) DISPATCH_FUNCTION { - fprintf( stdout, "FAILED\nSkipping unknown test function '%s'\n", params[0] ); + polarssl_fprintf( stdout, "FAILED\nSkipping unknown test function '%s'\n", params[0] ); fflush( stdout ); return( 1 ); } @@ -224,7 +225,7 @@ int main() file = fopen( filename, "r" ); if( file == NULL ) { - fprintf( stderr, "Failed to open\n" ); + polarssl_fprintf( stderr, "Failed to open\n" ); return( 1 ); } @@ -234,11 +235,11 @@ int main() if( ( ret = get_line( file, buf, sizeof(buf) ) ) != 0 ) break; - fprintf( stdout, "%s%.66s", test_errors ? "\n" : "", buf ); - fprintf( stdout, " " ); + polarssl_fprintf( stdout, "%s%.66s", test_errors ? "\n" : "", buf ); + polarssl_fprintf( stdout, " " ); for( i = strlen( buf ) + 1; i < 67; i++ ) - fprintf( stdout, "." ); - fprintf( stdout, " " ); + polarssl_fprintf( stdout, "." ); + polarssl_fprintf( stdout, " " ); fflush( stdout ); total_tests++; @@ -267,17 +268,17 @@ int main() if( skip == 1 || ret == 3 ) { total_skipped++; - fprintf( stdout, "----\n" ); + polarssl_fprintf( stdout, "----\n" ); fflush( stdout ); } else if( ret == 0 && test_errors == 0 ) { - fprintf( stdout, "PASS\n" ); + polarssl_fprintf( stdout, "PASS\n" ); fflush( stdout ); } else if( ret == 2 ) { - fprintf( stderr, "FAILED: FATAL PARSE ERROR\n" ); + polarssl_fprintf( stderr, "FAILED: FATAL PARSE ERROR\n" ); fclose(file); exit( 2 ); } @@ -288,19 +289,19 @@ int main() break; if( strlen(buf) != 0 ) { - fprintf( stderr, "Should be empty %d\n", (int) strlen(buf) ); + polarssl_fprintf( stderr, "Should be empty %d\n", (int) strlen(buf) ); return( 1 ); } } fclose(file); - fprintf( stdout, "\n----------------------------------------------------------------------------\n\n"); + polarssl_fprintf( stdout, "\n----------------------------------------------------------------------------\n\n"); if( total_errors == 0 ) - fprintf( stdout, "PASSED" ); + polarssl_fprintf( stdout, "PASSED" ); else - fprintf( stdout, "FAILED" ); + polarssl_fprintf( stdout, "FAILED" ); - fprintf( stdout, " (%d / %d tests (%d skipped))\n", + polarssl_fprintf( stdout, " (%d / %d tests (%d skipped))\n", total_tests - total_errors, total_tests, total_skipped ); #if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) && \ From f4253c72f0737752ffee29e1812e29990bc9ef40 Mon Sep 17 00:00:00 2001 From: Rich Evans Date: Wed, 14 Jan 2015 19:23:00 +0000 Subject: [PATCH 20/46] modify tests/scripts/generate_code.pl to allow overriding of from command line --- tests/scripts/generate_code.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/scripts/generate_code.pl b/tests/scripts/generate_code.pl index 318629fe1..6b195e70b 100755 --- a/tests/scripts/generate_code.pl +++ b/tests/scripts/generate_code.pl @@ -6,11 +6,11 @@ use strict; my $suite_dir = shift or die "Missing suite directory"; my $suite_name = shift or die "Missing suite name"; my $data_name = shift or die "Missing data name"; +my $test_main_file = do { my $arg = shift; defined($arg) ? $arg : $suite_dir."/main_test.function" }; my $test_file = $data_name.".c"; my $test_helper_file = $suite_dir."/helpers.function"; my $test_case_file = $suite_dir."/".$suite_name.".function"; my $test_case_data = $suite_dir."/".$data_name.".data"; -my $test_main_file = $suite_dir."/main_test.function"; my $line_separator = $/; undef $/; From 920aa9c8ee06774cf9e4d6590b9a44d6d1137762 Mon Sep 17 00:00:00 2001 From: Rich Evans Date: Thu, 15 Jan 2015 10:31:23 +0000 Subject: [PATCH 21/46] change more references to (f)printf to polarssl_(f)printf to allow overriding --- tests/scripts/generate_code.pl | 2 +- tests/suites/test_suite_x509parse.function | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/scripts/generate_code.pl b/tests/scripts/generate_code.pl index 6b195e70b..45913781d 100755 --- a/tests/scripts/generate_code.pl +++ b/tests/scripts/generate_code.pl @@ -172,7 +172,7 @@ $function_pre_code $param_defs if( cnt != $param_count ) { - fprintf( stderr, "\\nIncorrect argument count (%d != %d)\\n", cnt, $param_count ); + polarssl_fprintf( stderr, "\\nIncorrect argument count (%d != %d)\\n", cnt, $param_count ); return( 2 ); } diff --git a/tests/suites/test_suite_x509parse.function b/tests/suites/test_suite_x509parse.function index 89b40b7d6..7af1d1ecc 100644 --- a/tests/suites/test_suite_x509parse.function +++ b/tests/suites/test_suite_x509parse.function @@ -445,7 +445,7 @@ void x509_parse_rsassa_pss_params( char *hex_params, int params_tag, my_ret = x509_get_rsassa_pss_params( ¶ms, &my_msg_md, &my_mgf_md, &my_salt_len ); - if( my_ret != ref_ret ) printf( "\n%04X\n", - my_ret ); + if( my_ret != ref_ret ) polarssl_printf( "\n%04X\n", - my_ret ); TEST_ASSERT( my_ret == ref_ret ); From 9ad7b6ebdef4d13f8c2b31ba99d18f76f7754eff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Mon, 19 Jan 2015 14:49:16 +0000 Subject: [PATCH 22/46] Rm spurious printf from test function --- tests/suites/test_suite_x509parse.function | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/suites/test_suite_x509parse.function b/tests/suites/test_suite_x509parse.function index 7af1d1ecc..4329dccfe 100644 --- a/tests/suites/test_suite_x509parse.function +++ b/tests/suites/test_suite_x509parse.function @@ -445,8 +445,6 @@ void x509_parse_rsassa_pss_params( char *hex_params, int params_tag, my_ret = x509_get_rsassa_pss_params( ¶ms, &my_msg_md, &my_mgf_md, &my_salt_len ); - if( my_ret != ref_ret ) polarssl_printf( "\n%04X\n", - my_ret ); - TEST_ASSERT( my_ret == ref_ret ); if( ref_ret == 0 ) From e94e6e5b9c3d2fca9f83db02f7470abd0f960697 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Mon, 19 Jan 2015 15:01:53 +0000 Subject: [PATCH 23/46] Fix stdio (non-)inclusion issues. --- include/polarssl/bignum.h | 5 ++++- library/debug.c | 3 --- library/error.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/polarssl/bignum.h b/include/polarssl/bignum.h index 180743945..7c3961e5e 100644 --- a/include/polarssl/bignum.h +++ b/include/polarssl/bignum.h @@ -24,7 +24,6 @@ #ifndef POLARSSL_BIGNUM_H #define POLARSSL_BIGNUM_H -#include #include #if !defined(POLARSSL_CONFIG_FILE) @@ -33,6 +32,10 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_FS_IO) +#include +#endif + #if defined(_MSC_VER) && !defined(EFIX64) && !defined(EFI32) #include #if (_MSC_VER <= 1200) diff --git a/library/debug.c b/library/debug.c index e014c0379..d08ecfbaf 100644 --- a/library/debug.c +++ b/library/debug.c @@ -32,10 +32,7 @@ #include #include - -#if defined(EFIX64) || defined(EFI32) #include -#endif #if defined(_MSC_VER) && !defined(EFIX64) && !defined(EFI32) #if !defined snprintf diff --git a/library/error.c b/library/error.c index 60fec1165..3fbec5d9d 100644 --- a/library/error.c +++ b/library/error.c @@ -172,7 +172,7 @@ #include "polarssl/xtea.h" #endif - +#include #include #if defined(_MSC_VER) && !defined snprintf && !defined(EFIX64) && \ From f90016aade7194a6661f419a7620bb16f29aa32e Mon Sep 17 00:00:00 2001 From: Rich Evans Date: Mon, 19 Jan 2015 14:26:37 +0000 Subject: [PATCH 24/46] Use platform layer in programs for consistency. --- programs/aes/aescrypt2.c | 49 ++++--- programs/aes/crypt_and_hash.c | 85 ++++++----- programs/hash/generic_sum.c | 45 +++--- programs/hash/hello.c | 19 ++- programs/hash/md5sum.c | 33 +++-- programs/hash/sha1sum.c | 33 +++-- programs/hash/sha2sum.c | 33 +++-- programs/pkey/dh_client.c | 63 +++++---- programs/pkey/dh_genprime.c | 53 ++++--- programs/pkey/dh_server.c | 61 ++++---- programs/pkey/ecdsa.c | 53 ++++--- programs/pkey/gen_key.c | 55 +++++--- programs/pkey/key_app.c | 45 +++--- programs/pkey/key_app_writer.c | 43 +++--- programs/pkey/mpi_demo.c | 23 ++- programs/pkey/pk_decrypt.c | 37 +++-- programs/pkey/pk_encrypt.c | 39 +++-- programs/pkey/pk_sign.c | 39 +++-- programs/pkey/pk_verify.c | 33 +++-- programs/pkey/rsa_decrypt.c | 39 +++-- programs/pkey/rsa_encrypt.c | 39 +++-- programs/pkey/rsa_genkey.c | 37 +++-- programs/pkey/rsa_sign.c | 39 +++-- programs/pkey/rsa_sign_pss.c | 41 +++--- programs/pkey/rsa_verify.c | 35 +++-- programs/pkey/rsa_verify_pss.c | 35 +++-- programs/random/gen_entropy.c | 19 ++- programs/random/gen_random_ctr_drbg.c | 29 ++-- programs/random/gen_random_havege.c | 21 ++- programs/ssl/ssl_client1.c | 79 ++++++----- programs/ssl/ssl_client2.c | 183 ++++++++++++------------ programs/ssl/ssl_fork_server.c | 87 +++++++----- programs/ssl/ssl_mail_client.c | 183 ++++++++++++------------ programs/ssl/ssl_pthread_server.c | 95 +++++++------ programs/ssl/ssl_server.c | 85 ++++++----- programs/ssl/ssl_server2.c | 196 +++++++++++++------------- programs/test/benchmark.c | 33 +++-- programs/test/o_p_test.c | 97 +++++++------ programs/test/selftest.c | 17 ++- programs/test/ssl_cert_test.c | 71 ++++++---- programs/test/ssl_test.c | 57 ++++---- programs/util/pem2der.c | 35 +++-- programs/util/strerror.c | 19 ++- programs/x509/cert_app.c | 101 +++++++------ programs/x509/cert_req.c | 43 +++--- programs/x509/cert_write.c | 107 +++++++------- programs/x509/crl_app.c | 27 ++-- programs/x509/req_app.c | 27 ++-- 48 files changed, 1572 insertions(+), 1145 deletions(-) diff --git a/programs/aes/aescrypt2.c b/programs/aes/aescrypt2.c index a82e45719..db20db456 100644 --- a/programs/aes/aescrypt2.c +++ b/programs/aes/aescrypt2.c @@ -26,6 +26,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #if defined(_WIN32) #include #if !defined(_WIN32_WCE) @@ -58,7 +67,7 @@ int main( int argc, char *argv[] ) { ((void) argc); ((void) argv); - printf("POLARSSL_AES_C and/or POLARSSL_SHA256_C not defined.\n"); + polarssl_printf("POLARSSL_AES_C and/or POLARSSL_SHA256_C not defined.\n"); return( 0 ); } #else @@ -98,10 +107,10 @@ int main( int argc, char *argv[] ) */ if( argc != 5 ) { - printf( USAGE ); + polarssl_printf( USAGE ); #if defined(_WIN32) - printf( "\n Press Enter to exit this program.\n" ); + polarssl_printf( "\n Press Enter to exit this program.\n" ); fflush( stdout ); getchar(); #endif @@ -112,25 +121,25 @@ int main( int argc, char *argv[] ) if( mode != MODE_ENCRYPT && mode != MODE_DECRYPT ) { - fprintf( stderr, "invalide operation mode\n" ); + polarssl_fprintf( stderr, "invalide operation mode\n" ); goto exit; } if( strcmp( argv[2], argv[3] ) == 0 ) { - fprintf( stderr, "input and output filenames must differ\n" ); + polarssl_fprintf( stderr, "input and output filenames must differ\n" ); goto exit; } if( ( fin = fopen( argv[2], "rb" ) ) == NULL ) { - fprintf( stderr, "fopen(%s,rb) failed\n", argv[2] ); + polarssl_fprintf( stderr, "fopen(%s,rb) failed\n", argv[2] ); goto exit; } if( ( fout = fopen( argv[3], "wb+" ) ) == NULL ) { - fprintf( stderr, "fopen(%s,wb+) failed\n", argv[3] ); + polarssl_fprintf( stderr, "fopen(%s,wb+) failed\n", argv[3] ); goto exit; } @@ -183,7 +192,7 @@ int main( int argc, char *argv[] ) if( li_size.LowPart == 0xFFFFFFFF && GetLastError() != NO_ERROR ) { - fprintf( stderr, "SetFilePointer(0,FILE_END) failed\n" ); + polarssl_fprintf( stderr, "SetFilePointer(0,FILE_END) failed\n" ); goto exit; } @@ -199,7 +208,7 @@ int main( int argc, char *argv[] ) if( fseek( fin, 0, SEEK_SET ) < 0 ) { - fprintf( stderr, "fseek(0,SEEK_SET) failed\n" ); + polarssl_fprintf( stderr, "fseek(0,SEEK_SET) failed\n" ); goto exit; } @@ -235,7 +244,7 @@ int main( int argc, char *argv[] ) */ if( fwrite( IV, 1, 16, fout ) != 16 ) { - fprintf( stderr, "fwrite(%d bytes) failed\n", 16 ); + polarssl_fprintf( stderr, "fwrite(%d bytes) failed\n", 16 ); goto exit; } @@ -268,7 +277,7 @@ int main( int argc, char *argv[] ) if( fread( buffer, 1, n, fin ) != (size_t) n ) { - fprintf( stderr, "fread(%d bytes) failed\n", n ); + polarssl_fprintf( stderr, "fread(%d bytes) failed\n", n ); goto exit; } @@ -280,7 +289,7 @@ int main( int argc, char *argv[] ) if( fwrite( buffer, 1, 16, fout ) != 16 ) { - fprintf( stderr, "fwrite(%d bytes) failed\n", 16 ); + polarssl_fprintf( stderr, "fwrite(%d bytes) failed\n", 16 ); goto exit; } @@ -294,7 +303,7 @@ int main( int argc, char *argv[] ) if( fwrite( digest, 1, 32, fout ) != 32 ) { - fprintf( stderr, "fwrite(%d bytes) failed\n", 16 ); + polarssl_fprintf( stderr, "fwrite(%d bytes) failed\n", 16 ); goto exit; } } @@ -314,13 +323,13 @@ int main( int argc, char *argv[] ) */ if( filesize < 48 ) { - fprintf( stderr, "File too short to be encrypted.\n" ); + polarssl_fprintf( stderr, "File too short to be encrypted.\n" ); goto exit; } if( ( filesize & 0x0F ) != 0 ) { - fprintf( stderr, "File size not a multiple of 16.\n" ); + polarssl_fprintf( stderr, "File size not a multiple of 16.\n" ); goto exit; } @@ -334,7 +343,7 @@ int main( int argc, char *argv[] ) */ if( fread( buffer, 1, 16, fin ) != 16 ) { - fprintf( stderr, "fread(%d bytes) failed\n", 16 ); + polarssl_fprintf( stderr, "fread(%d bytes) failed\n", 16 ); goto exit; } @@ -367,7 +376,7 @@ int main( int argc, char *argv[] ) { if( fread( buffer, 1, 16, fin ) != 16 ) { - fprintf( stderr, "fread(%d bytes) failed\n", 16 ); + polarssl_fprintf( stderr, "fread(%d bytes) failed\n", 16 ); goto exit; } @@ -386,7 +395,7 @@ int main( int argc, char *argv[] ) if( fwrite( buffer, 1, n, fout ) != (size_t) n ) { - fprintf( stderr, "fwrite(%d bytes) failed\n", n ); + polarssl_fprintf( stderr, "fwrite(%d bytes) failed\n", n ); goto exit; } } @@ -398,7 +407,7 @@ int main( int argc, char *argv[] ) if( fread( buffer, 1, 32, fin ) != 32 ) { - fprintf( stderr, "fread(%d bytes) failed\n", 32 ); + polarssl_fprintf( stderr, "fread(%d bytes) failed\n", 32 ); goto exit; } @@ -409,7 +418,7 @@ int main( int argc, char *argv[] ) if( diff != 0 ) { - fprintf( stderr, "HMAC check failed: wrong key, " + polarssl_fprintf( stderr, "HMAC check failed: wrong key, " "or file corrupted.\n" ); goto exit; } diff --git a/programs/aes/crypt_and_hash.c b/programs/aes/crypt_and_hash.c index a904bdeae..231849830 100644 --- a/programs/aes/crypt_and_hash.c +++ b/programs/aes/crypt_and_hash.c @@ -27,6 +27,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #if defined(_WIN32) #include #if !defined(_WIN32_WCE) @@ -60,7 +69,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf("POLARSSL_CIPHER_C and/or POLARSSL_MD_C not defined.\n"); + polarssl_printf("POLARSSL_CIPHER_C and/or POLARSSL_MD_C not defined.\n"); return( 0 ); } #else @@ -102,28 +111,28 @@ int main( int argc, char *argv[] ) { const int *list; - printf( USAGE ); + polarssl_printf( USAGE ); - printf( "Available ciphers:\n" ); + polarssl_printf( "Available ciphers:\n" ); list = cipher_list(); while( *list ) { cipher_info = cipher_info_from_type( *list ); - printf( " %s\n", cipher_info->name ); + polarssl_printf( " %s\n", cipher_info->name ); list++; } - printf( "\nAvailable message digests:\n" ); + polarssl_printf( "\nAvailable message digests:\n" ); list = md_list(); while( *list ) { md_info = md_info_from_type( *list ); - printf( " %s\n", md_info->name ); + polarssl_printf( " %s\n", md_info->name ); list++; } #if defined(_WIN32) - printf( "\n Press Enter to exit this program.\n" ); + polarssl_printf( "\n Press Enter to exit this program.\n" ); fflush( stdout ); getchar(); #endif @@ -134,25 +143,25 @@ int main( int argc, char *argv[] ) if( mode != MODE_ENCRYPT && mode != MODE_DECRYPT ) { - fprintf( stderr, "invalid operation mode\n" ); + polarssl_fprintf( stderr, "invalid operation mode\n" ); goto exit; } if( strcmp( argv[2], argv[3] ) == 0 ) { - fprintf( stderr, "input and output filenames must differ\n" ); + polarssl_fprintf( stderr, "input and output filenames must differ\n" ); goto exit; } if( ( fin = fopen( argv[2], "rb" ) ) == NULL ) { - fprintf( stderr, "fopen(%s,rb) failed\n", argv[2] ); + polarssl_fprintf( stderr, "fopen(%s,rb) failed\n", argv[2] ); goto exit; } if( ( fout = fopen( argv[3], "wb+" ) ) == NULL ) { - fprintf( stderr, "fopen(%s,wb+) failed\n", argv[3] ); + polarssl_fprintf( stderr, "fopen(%s,wb+) failed\n", argv[3] ); goto exit; } @@ -162,19 +171,19 @@ int main( int argc, char *argv[] ) cipher_info = cipher_info_from_string( argv[4] ); if( cipher_info == NULL ) { - fprintf( stderr, "Cipher '%s' not found\n", argv[4] ); + polarssl_fprintf( stderr, "Cipher '%s' not found\n", argv[4] ); goto exit; } if( ( ret = cipher_init_ctx( &cipher_ctx, cipher_info) ) != 0 ) { - fprintf( stderr, "cipher_init_ctx failed\n" ); + polarssl_fprintf( stderr, "cipher_init_ctx failed\n" ); goto exit; } md_info = md_info_from_string( argv[5] ); if( md_info == NULL ) { - fprintf( stderr, "Message Digest '%s' not found\n", argv[5] ); + polarssl_fprintf( stderr, "Message Digest '%s' not found\n", argv[5] ); goto exit; } md_init_ctx( &md_ctx, md_info); @@ -228,7 +237,7 @@ int main( int argc, char *argv[] ) if( li_size.LowPart == 0xFFFFFFFF && GetLastError() != NO_ERROR ) { - fprintf( stderr, "SetFilePointer(0,FILE_END) failed\n" ); + polarssl_fprintf( stderr, "SetFilePointer(0,FILE_END) failed\n" ); goto exit; } @@ -244,7 +253,7 @@ int main( int argc, char *argv[] ) if( fseek( fin, 0, SEEK_SET ) < 0 ) { - fprintf( stderr, "fseek(0,SEEK_SET) failed\n" ); + polarssl_fprintf( stderr, "fseek(0,SEEK_SET) failed\n" ); goto exit; } @@ -280,7 +289,7 @@ int main( int argc, char *argv[] ) */ if( fwrite( IV, 1, 16, fout ) != 16 ) { - fprintf( stderr, "fwrite(%d bytes) failed\n", 16 ); + polarssl_fprintf( stderr, "fwrite(%d bytes) failed\n", 16 ); goto exit; } @@ -305,17 +314,17 @@ int main( int argc, char *argv[] ) if( cipher_setkey( &cipher_ctx, digest, cipher_info->key_length, POLARSSL_ENCRYPT ) != 0 ) { - fprintf( stderr, "cipher_setkey() returned error\n"); + polarssl_fprintf( stderr, "cipher_setkey() returned error\n"); goto exit; } if( cipher_set_iv( &cipher_ctx, IV, 16 ) != 0 ) { - fprintf( stderr, "cipher_set_iv() returned error\n"); + polarssl_fprintf( stderr, "cipher_set_iv() returned error\n"); goto exit; } if( cipher_reset( &cipher_ctx ) != 0 ) { - fprintf( stderr, "cipher_reset() returned error\n"); + polarssl_fprintf( stderr, "cipher_reset() returned error\n"); goto exit; } @@ -331,13 +340,13 @@ int main( int argc, char *argv[] ) if( fread( buffer, 1, ilen, fin ) != ilen ) { - fprintf( stderr, "fread(%ld bytes) failed\n", (long) ilen ); + polarssl_fprintf( stderr, "fread(%ld bytes) failed\n", (long) ilen ); goto exit; } if( cipher_update( &cipher_ctx, buffer, ilen, output, &olen ) != 0 ) { - fprintf( stderr, "cipher_update() returned error\n"); + polarssl_fprintf( stderr, "cipher_update() returned error\n"); goto exit; } @@ -345,21 +354,21 @@ int main( int argc, char *argv[] ) if( fwrite( output, 1, olen, fout ) != olen ) { - fprintf( stderr, "fwrite(%ld bytes) failed\n", (long) olen ); + polarssl_fprintf( stderr, "fwrite(%ld bytes) failed\n", (long) olen ); goto exit; } } if( cipher_finish( &cipher_ctx, output, &olen ) != 0 ) { - fprintf( stderr, "cipher_finish() returned error\n" ); + polarssl_fprintf( stderr, "cipher_finish() returned error\n" ); goto exit; } md_hmac_update( &md_ctx, output, olen ); if( fwrite( output, 1, olen, fout ) != olen ) { - fprintf( stderr, "fwrite(%ld bytes) failed\n", (long) olen ); + polarssl_fprintf( stderr, "fwrite(%ld bytes) failed\n", (long) olen ); goto exit; } @@ -370,7 +379,7 @@ int main( int argc, char *argv[] ) if( fwrite( digest, 1, md_get_size( md_info ), fout ) != md_get_size( md_info ) ) { - fprintf( stderr, "fwrite(%d bytes) failed\n", md_get_size( md_info ) ); + polarssl_fprintf( stderr, "fwrite(%d bytes) failed\n", md_get_size( md_info ) ); goto exit; } } @@ -388,14 +397,14 @@ int main( int argc, char *argv[] ) */ if( filesize < 16 + md_get_size( md_info ) ) { - fprintf( stderr, "File too short to be encrypted.\n" ); + polarssl_fprintf( stderr, "File too short to be encrypted.\n" ); goto exit; } if( ( ( filesize - md_get_size( md_info ) ) % cipher_get_block_size( &cipher_ctx ) ) != 0 ) { - fprintf( stderr, "File content not a multiple of the block size (%d).\n", + polarssl_fprintf( stderr, "File content not a multiple of the block size (%d).\n", cipher_get_block_size( &cipher_ctx )); goto exit; } @@ -410,7 +419,7 @@ int main( int argc, char *argv[] ) */ if( fread( buffer, 1, 16, fin ) != 16 ) { - fprintf( stderr, "fread(%d bytes) failed\n", 16 ); + polarssl_fprintf( stderr, "fread(%d bytes) failed\n", 16 ); goto exit; } @@ -437,19 +446,19 @@ int main( int argc, char *argv[] ) if( cipher_setkey( &cipher_ctx, digest, cipher_info->key_length, POLARSSL_DECRYPT ) != 0 ) { - fprintf( stderr, "cipher_setkey() returned error\n" ); + polarssl_fprintf( stderr, "cipher_setkey() returned error\n" ); goto exit; } if( cipher_set_iv( &cipher_ctx, IV, 16 ) != 0 ) { - fprintf( stderr, "cipher_set_iv() returned error\n" ); + polarssl_fprintf( stderr, "cipher_set_iv() returned error\n" ); goto exit; } if( cipher_reset( &cipher_ctx ) != 0 ) { - fprintf( stderr, "cipher_reset() returned error\n" ); + polarssl_fprintf( stderr, "cipher_reset() returned error\n" ); goto exit; } @@ -463,7 +472,7 @@ int main( int argc, char *argv[] ) if( fread( buffer, 1, cipher_get_block_size( &cipher_ctx ), fin ) != (size_t) cipher_get_block_size( &cipher_ctx ) ) { - fprintf( stderr, "fread(%d bytes) failed\n", + polarssl_fprintf( stderr, "fread(%d bytes) failed\n", cipher_get_block_size( &cipher_ctx ) ); goto exit; } @@ -473,13 +482,13 @@ int main( int argc, char *argv[] ) cipher_get_block_size( &cipher_ctx ), output, &olen ) != 0 ) { - fprintf( stderr, "cipher_update() returned error\n" ); + polarssl_fprintf( stderr, "cipher_update() returned error\n" ); goto exit; } if( fwrite( output, 1, olen, fout ) != olen ) { - fprintf( stderr, "fwrite(%ld bytes) failed\n", (long) olen ); + polarssl_fprintf( stderr, "fwrite(%ld bytes) failed\n", (long) olen ); goto exit; } } @@ -491,7 +500,7 @@ int main( int argc, char *argv[] ) if( fread( buffer, 1, md_get_size( md_info ), fin ) != md_get_size( md_info ) ) { - fprintf( stderr, "fread(%d bytes) failed\n", md_get_size( md_info ) ); + polarssl_fprintf( stderr, "fread(%d bytes) failed\n", md_get_size( md_info ) ); goto exit; } @@ -502,7 +511,7 @@ int main( int argc, char *argv[] ) if( diff != 0 ) { - fprintf( stderr, "HMAC check failed: wrong key, " + polarssl_fprintf( stderr, "HMAC check failed: wrong key, " "or file corrupted.\n" ); goto exit; } @@ -514,7 +523,7 @@ int main( int argc, char *argv[] ) if( fwrite( output, 1, olen, fout ) != olen ) { - fprintf( stderr, "fwrite(%ld bytes) failed\n", (long) olen ); + polarssl_fprintf( stderr, "fwrite(%ld bytes) failed\n", (long) olen ); goto exit; } } diff --git a/programs/hash/generic_sum.c b/programs/hash/generic_sum.c index 34814d5db..5af63f5e7 100644 --- a/programs/hash/generic_sum.c +++ b/programs/hash/generic_sum.c @@ -26,6 +26,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #include #include @@ -37,7 +46,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf("POLARSSL_MD_C not defined.\n"); + polarssl_printf("POLARSSL_MD_C not defined.\n"); return( 0 ); } #else @@ -46,10 +55,10 @@ static int generic_wrapper( const md_info_t *md_info, char *filename, unsigned c int ret = md_file( md_info, filename, sum ); if( ret == 1 ) - fprintf( stderr, "failed to open: %s\n", filename ); + polarssl_fprintf( stderr, "failed to open: %s\n", filename ); if( ret == 2 ) - fprintf( stderr, "failed to read: %s\n", filename ); + polarssl_fprintf( stderr, "failed to read: %s\n", filename ); return( ret ); } @@ -63,9 +72,9 @@ static int generic_print( const md_info_t *md_info, char *filename ) return( 1 ); for( i = 0; i < md_info->size; i++ ) - printf( "%02x", sum[i] ); + polarssl_printf( "%02x", sum[i] ); - printf( " %s\n", filename ); + polarssl_printf( " %s\n", filename ); return( 0 ); } @@ -82,7 +91,7 @@ static int generic_check( const md_info_t *md_info, char *filename ) if( ( f = fopen( filename, "rb" ) ) == NULL ) { - printf( "failed to open: %s\n", filename ); + polarssl_printf( "failed to open: %s\n", filename ); return( 1 ); } @@ -99,13 +108,13 @@ static int generic_check( const md_info_t *md_info, char *filename ) if( n < (size_t) 2 * md_info->size + 4 ) { - printf("No '%s' hash found on line.\n", md_info->name); + polarssl_printf("No '%s' hash found on line.\n", md_info->name); continue; } if( line[2 * md_info->size] != ' ' || line[2 * md_info->size + 1] != ' ' ) { - printf("No '%s' hash found on line.\n", md_info->name); + polarssl_printf("No '%s' hash found on line.\n", md_info->name); continue; } @@ -133,7 +142,7 @@ static int generic_check( const md_info_t *md_info, char *filename ) if( diff != 0 ) { nb_err2++; - fprintf( stderr, "wrong checksum: %s\n", line + 66 ); + polarssl_fprintf( stderr, "wrong checksum: %s\n", line + 66 ); } n = sizeof( line ); @@ -141,13 +150,13 @@ static int generic_check( const md_info_t *md_info, char *filename ) if( nb_err1 != 0 ) { - printf( "WARNING: %d (out of %d) input files could " + polarssl_printf( "WARNING: %d (out of %d) input files could " "not be read\n", nb_err1, nb_tot1 ); } if( nb_err2 != 0 ) { - printf( "WARNING: %d (out of %d) computed checksums did " + polarssl_printf( "WARNING: %d (out of %d) computed checksums did " "not match\n", nb_err2, nb_tot2 ); } @@ -168,20 +177,20 @@ int main( int argc, char *argv[] ) { const int *list; - printf( "print mode: generic_sum ...\n" ); - printf( "check mode: generic_sum -c \n" ); + polarssl_printf( "print mode: generic_sum ...\n" ); + polarssl_printf( "check mode: generic_sum -c \n" ); - printf( "\nAvailable message digests:\n" ); + polarssl_printf( "\nAvailable message digests:\n" ); list = md_list(); while( *list ) { md_info = md_info_from_type( *list ); - printf( " %s\n", md_info->name ); + polarssl_printf( " %s\n", md_info->name ); list++; } #if defined(_WIN32) - printf( "\n Press Enter to exit this program.\n" ); + polarssl_printf( "\n Press Enter to exit this program.\n" ); fflush( stdout ); getchar(); #endif @@ -194,12 +203,12 @@ int main( int argc, char *argv[] ) md_info = md_info_from_string( argv[1] ); if( md_info == NULL ) { - fprintf( stderr, "Message Digest '%s' not found\n", argv[1] ); + polarssl_fprintf( stderr, "Message Digest '%s' not found\n", argv[1] ); return( 1 ); } if( md_init_ctx( &md_ctx, md_info) ) { - fprintf( stderr, "Failed to initialize context.\n" ); + polarssl_fprintf( stderr, "Failed to initialize context.\n" ); return( 1 ); } diff --git a/programs/hash/hello.c b/programs/hash/hello.c index 743b66a62..083dc9d95 100644 --- a/programs/hash/hello.c +++ b/programs/hash/hello.c @@ -26,6 +26,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #include #include "polarssl/md5.h" @@ -36,7 +45,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf("POLARSSL_MD5_C not defined.\n"); + polarssl_printf("POLARSSL_MD5_C not defined.\n"); return( 0 ); } #else @@ -49,17 +58,17 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf( "\n MD5('%s') = ", str ); + polarssl_printf( "\n MD5('%s') = ", str ); md5( (unsigned char *) str, 13, digest ); for( i = 0; i < 16; i++ ) - printf( "%02x", digest[i] ); + polarssl_printf( "%02x", digest[i] ); - printf( "\n\n" ); + polarssl_printf( "\n\n" ); #if defined(_WIN32) - printf( " Press Enter to exit this program.\n" ); + polarssl_printf( " Press Enter to exit this program.\n" ); fflush( stdout ); getchar(); #endif diff --git a/programs/hash/md5sum.c b/programs/hash/md5sum.c index 49dddd4ad..2efe8cf29 100644 --- a/programs/hash/md5sum.c +++ b/programs/hash/md5sum.c @@ -26,6 +26,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #include #include @@ -37,7 +46,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf("POLARSSL_MD5_C and/or POLARSSL_FS_IO not defined.\n"); + polarssl_printf("POLARSSL_MD5_C and/or POLARSSL_FS_IO not defined.\n"); return( 0 ); } #else @@ -46,10 +55,10 @@ static int md5_wrapper( char *filename, unsigned char *sum ) int ret = md5_file( filename, sum ); if( ret == 1 ) - fprintf( stderr, "failed to open: %s\n", filename ); + polarssl_fprintf( stderr, "failed to open: %s\n", filename ); if( ret == 2 ) - fprintf( stderr, "failed to read: %s\n", filename ); + polarssl_fprintf( stderr, "failed to read: %s\n", filename ); return( ret ); } @@ -63,9 +72,9 @@ static int md5_print( char *filename ) return( 1 ); for( i = 0; i < 16; i++ ) - printf( "%02x", sum[i] ); + polarssl_printf( "%02x", sum[i] ); - printf( " %s\n", filename ); + polarssl_printf( " %s\n", filename ); return( 0 ); } @@ -82,7 +91,7 @@ static int md5_check( char *filename ) if( ( f = fopen( filename, "rb" ) ) == NULL ) { - printf( "failed to open: %s\n", filename ); + polarssl_printf( "failed to open: %s\n", filename ); return( 1 ); } @@ -127,7 +136,7 @@ static int md5_check( char *filename ) if( diff != 0 ) { nb_err2++; - fprintf( stderr, "wrong checksum: %s\n", line + 34 ); + polarssl_fprintf( stderr, "wrong checksum: %s\n", line + 34 ); } n = sizeof( line ); @@ -137,13 +146,13 @@ static int md5_check( char *filename ) if( nb_err1 != 0 ) { - printf( "WARNING: %d (out of %d) input files could " + polarssl_printf( "WARNING: %d (out of %d) input files could " "not be read\n", nb_err1, nb_tot1 ); } if( nb_err2 != 0 ) { - printf( "WARNING: %d (out of %d) computed checksums did " + polarssl_printf( "WARNING: %d (out of %d) computed checksums did " "not match\n", nb_err2, nb_tot2 ); } @@ -156,11 +165,11 @@ int main( int argc, char *argv[] ) if( argc == 1 ) { - printf( "print mode: md5sum ...\n" ); - printf( "check mode: md5sum -c \n" ); + polarssl_printf( "print mode: md5sum ...\n" ); + polarssl_printf( "check mode: md5sum -c \n" ); #if defined(_WIN32) - printf( "\n Press Enter to exit this program.\n" ); + polarssl_printf( "\n Press Enter to exit this program.\n" ); fflush( stdout ); getchar(); #endif diff --git a/programs/hash/sha1sum.c b/programs/hash/sha1sum.c index 1fc1b0048..b5ad22353 100644 --- a/programs/hash/sha1sum.c +++ b/programs/hash/sha1sum.c @@ -26,6 +26,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #include #include @@ -37,7 +46,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf("POLARSSL_SHA1_C and/or POLARSSL_FS_IO not defined.\n"); + polarssl_printf("POLARSSL_SHA1_C and/or POLARSSL_FS_IO not defined.\n"); return( 0 ); } #else @@ -46,10 +55,10 @@ static int sha1_wrapper( char *filename, unsigned char *sum ) int ret = sha1_file( filename, sum ); if( ret == 1 ) - fprintf( stderr, "failed to open: %s\n", filename ); + polarssl_fprintf( stderr, "failed to open: %s\n", filename ); if( ret == 2 ) - fprintf( stderr, "failed to read: %s\n", filename ); + polarssl_fprintf( stderr, "failed to read: %s\n", filename ); return( ret ); } @@ -63,9 +72,9 @@ static int sha1_print( char *filename ) return( 1 ); for( i = 0; i < 20; i++ ) - printf( "%02x", sum[i] ); + polarssl_printf( "%02x", sum[i] ); - printf( " %s\n", filename ); + polarssl_printf( " %s\n", filename ); return( 0 ); } @@ -82,7 +91,7 @@ static int sha1_check( char *filename ) if( ( f = fopen( filename, "rb" ) ) == NULL ) { - printf( "failed to open: %s\n", filename ); + polarssl_printf( "failed to open: %s\n", filename ); return( 1 ); } @@ -127,7 +136,7 @@ static int sha1_check( char *filename ) if( diff != 0 ) { nb_err2++; - fprintf( stderr, "wrong checksum: %s\n", line + 42 ); + polarssl_fprintf( stderr, "wrong checksum: %s\n", line + 42 ); } n = sizeof( line ); @@ -137,13 +146,13 @@ static int sha1_check( char *filename ) if( nb_err1 != 0 ) { - printf( "WARNING: %d (out of %d) input files could " + polarssl_printf( "WARNING: %d (out of %d) input files could " "not be read\n", nb_err1, nb_tot1 ); } if( nb_err2 != 0 ) { - printf( "WARNING: %d (out of %d) computed checksums did " + polarssl_printf( "WARNING: %d (out of %d) computed checksums did " "not match\n", nb_err2, nb_tot2 ); } @@ -156,11 +165,11 @@ int main( int argc, char *argv[] ) if( argc == 1 ) { - printf( "print mode: sha1sum ...\n" ); - printf( "check mode: sha1sum -c \n" ); + polarssl_printf( "print mode: sha1sum ...\n" ); + polarssl_printf( "check mode: sha1sum -c \n" ); #if defined(_WIN32) - printf( "\n Press Enter to exit this program.\n" ); + polarssl_printf( "\n Press Enter to exit this program.\n" ); fflush( stdout ); getchar(); #endif diff --git a/programs/hash/sha2sum.c b/programs/hash/sha2sum.c index 72e17c94d..aee4e63e0 100644 --- a/programs/hash/sha2sum.c +++ b/programs/hash/sha2sum.c @@ -26,6 +26,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #include #include @@ -37,7 +46,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf("POLARSSL_SHA256_C and/or POLARSSL_FS_IO not defined.\n"); + polarssl_printf("POLARSSL_SHA256_C and/or POLARSSL_FS_IO not defined.\n"); return( 0 ); } #else @@ -46,10 +55,10 @@ static int sha256_wrapper( char *filename, unsigned char *sum ) int ret = sha256_file( filename, sum, 0 ); if( ret == 1 ) - fprintf( stderr, "failed to open: %s\n", filename ); + polarssl_fprintf( stderr, "failed to open: %s\n", filename ); if( ret == 2 ) - fprintf( stderr, "failed to read: %s\n", filename ); + polarssl_fprintf( stderr, "failed to read: %s\n", filename ); return( ret ); } @@ -63,9 +72,9 @@ static int sha256_print( char *filename ) return( 1 ); for( i = 0; i < 32; i++ ) - printf( "%02x", sum[i] ); + polarssl_printf( "%02x", sum[i] ); - printf( " %s\n", filename ); + polarssl_printf( " %s\n", filename ); return( 0 ); } @@ -82,7 +91,7 @@ static int sha256_check( char *filename ) if( ( f = fopen( filename, "rb" ) ) == NULL ) { - printf( "failed to open: %s\n", filename ); + polarssl_printf( "failed to open: %s\n", filename ); return( 1 ); } @@ -127,7 +136,7 @@ static int sha256_check( char *filename ) if( diff != 0 ) { nb_err2++; - fprintf( stderr, "wrong checksum: %s\n", line + 66 ); + polarssl_fprintf( stderr, "wrong checksum: %s\n", line + 66 ); } n = sizeof( line ); @@ -137,13 +146,13 @@ static int sha256_check( char *filename ) if( nb_err1 != 0 ) { - printf( "WARNING: %d (out of %d) input files could " + polarssl_printf( "WARNING: %d (out of %d) input files could " "not be read\n", nb_err1, nb_tot1 ); } if( nb_err2 != 0 ) { - printf( "WARNING: %d (out of %d) computed checksums did " + polarssl_printf( "WARNING: %d (out of %d) computed checksums did " "not match\n", nb_err2, nb_tot2 ); } @@ -156,11 +165,11 @@ int main( int argc, char *argv[] ) if( argc == 1 ) { - printf( "print mode: sha256sum ...\n" ); - printf( "check mode: sha256sum -c \n" ); + polarssl_printf( "print mode: sha256sum ...\n" ); + polarssl_printf( "check mode: sha256sum -c \n" ); #if defined(_WIN32) - printf( "\n Press Enter to exit this program.\n" ); + polarssl_printf( "\n Press Enter to exit this program.\n" ); fflush( stdout ); getchar(); #endif diff --git a/programs/pkey/dh_client.c b/programs/pkey/dh_client.c index 73a59a96e..355810387 100644 --- a/programs/pkey/dh_client.c +++ b/programs/pkey/dh_client.c @@ -26,6 +26,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #include #include @@ -49,7 +58,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf("POLARSSL_AES_C and/or POLARSSL_DHM_C and/or POLARSSL_ENTROPY_C " + polarssl_printf("POLARSSL_AES_C and/or POLARSSL_DHM_C and/or POLARSSL_ENTROPY_C " "and/or POLARSSL_NET_C and/or POLARSSL_RSA_C and/or " "POLARSSL_SHA1_C and/or POLARSSL_FS_IO and/or " "POLARSSL_CTR_DRBG_C not defined.\n"); @@ -85,7 +94,7 @@ int main( int argc, char *argv[] ) /* * 1. Setup the RNG */ - printf( "\n . Seeding the random number generator" ); + polarssl_printf( "\n . Seeding the random number generator" ); fflush( stdout ); entropy_init( &entropy ); @@ -93,20 +102,20 @@ int main( int argc, char *argv[] ) (const unsigned char *) pers, strlen( pers ) ) ) != 0 ) { - printf( " failed\n ! ctr_drbg_init returned %d\n", ret ); + polarssl_printf( " failed\n ! ctr_drbg_init returned %d\n", ret ); goto exit; } /* * 2. Read the server's public RSA key */ - printf( "\n . Reading public key from rsa_pub.txt" ); + polarssl_printf( "\n . Reading public key from rsa_pub.txt" ); fflush( stdout ); if( ( f = fopen( "rsa_pub.txt", "rb" ) ) == NULL ) { ret = 1; - printf( " failed\n ! Could not open rsa_pub.txt\n" \ + polarssl_printf( " failed\n ! Could not open rsa_pub.txt\n" \ " ! Please run rsa_genkey first\n\n" ); goto exit; } @@ -116,7 +125,7 @@ int main( int argc, char *argv[] ) if( ( ret = mpi_read_file( &rsa.N, 16, f ) ) != 0 || ( ret = mpi_read_file( &rsa.E, 16, f ) ) != 0 ) { - printf( " failed\n ! mpi_read_file returned %d\n\n", ret ); + polarssl_printf( " failed\n ! mpi_read_file returned %d\n\n", ret ); goto exit; } @@ -127,35 +136,35 @@ int main( int argc, char *argv[] ) /* * 3. Initiate the connection */ - printf( "\n . Connecting to tcp/%s/%d", SERVER_NAME, + polarssl_printf( "\n . Connecting to tcp/%s/%d", SERVER_NAME, SERVER_PORT ); fflush( stdout ); if( ( ret = net_connect( &server_fd, SERVER_NAME, SERVER_PORT ) ) != 0 ) { - printf( " failed\n ! net_connect returned %d\n\n", ret ); + polarssl_printf( " failed\n ! net_connect returned %d\n\n", ret ); goto exit; } /* * 4a. First get the buffer length */ - printf( "\n . Receiving the server's DH parameters" ); + polarssl_printf( "\n . Receiving the server's DH parameters" ); fflush( stdout ); memset( buf, 0, sizeof( buf ) ); if( ( ret = net_recv( &server_fd, buf, 2 ) ) != 2 ) { - printf( " failed\n ! net_recv returned %d\n\n", ret ); + polarssl_printf( " failed\n ! net_recv returned %d\n\n", ret ); goto exit; } n = buflen = ( buf[0] << 8 ) | buf[1]; if( buflen < 1 || buflen > sizeof( buf ) ) { - printf( " failed\n ! Got an invalid buffer length\n\n" ); + polarssl_printf( " failed\n ! Got an invalid buffer length\n\n" ); goto exit; } @@ -166,7 +175,7 @@ int main( int argc, char *argv[] ) if( ( ret = net_recv( &server_fd, buf, n ) ) != (int) n ) { - printf( " failed\n ! net_recv returned %d\n\n", ret ); + polarssl_printf( " failed\n ! net_recv returned %d\n\n", ret ); goto exit; } @@ -174,14 +183,14 @@ int main( int argc, char *argv[] ) if( ( ret = dhm_read_params( &dhm, &p, end ) ) != 0 ) { - printf( " failed\n ! dhm_read_params returned %d\n\n", ret ); + polarssl_printf( " failed\n ! dhm_read_params returned %d\n\n", ret ); goto exit; } if( dhm.len < 64 || dhm.len > 512 ) { ret = 1; - printf( " failed\n ! Invalid DHM modulus size\n\n" ); + polarssl_printf( " failed\n ! Invalid DHM modulus size\n\n" ); goto exit; } @@ -189,7 +198,7 @@ int main( int argc, char *argv[] ) * 5. Check that the server's RSA signature matches * the SHA-1 hash of (P,G,Ys) */ - printf( "\n . Verifying the server's RSA signature" ); + polarssl_printf( "\n . Verifying the server's RSA signature" ); fflush( stdout ); p += 2; @@ -197,7 +206,7 @@ int main( int argc, char *argv[] ) if( ( n = (size_t) ( end - p ) ) != rsa.len ) { ret = 1; - printf( " failed\n ! Invalid RSA signature size\n\n" ); + polarssl_printf( " failed\n ! Invalid RSA signature size\n\n" ); goto exit; } @@ -206,46 +215,46 @@ int main( int argc, char *argv[] ) if( ( ret = rsa_pkcs1_verify( &rsa, NULL, NULL, RSA_PUBLIC, POLARSSL_MD_SHA1, 0, hash, p ) ) != 0 ) { - printf( " failed\n ! rsa_pkcs1_verify returned %d\n\n", ret ); + polarssl_printf( " failed\n ! rsa_pkcs1_verify returned %d\n\n", ret ); goto exit; } /* * 6. Send our public value: Yc = G ^ Xc mod P */ - printf( "\n . Sending own public value to server" ); + polarssl_printf( "\n . Sending own public value to server" ); fflush( stdout ); n = dhm.len; if( ( ret = dhm_make_public( &dhm, (int) dhm.len, buf, n, ctr_drbg_random, &ctr_drbg ) ) != 0 ) { - printf( " failed\n ! dhm_make_public returned %d\n\n", ret ); + polarssl_printf( " failed\n ! dhm_make_public returned %d\n\n", ret ); goto exit; } if( ( ret = net_send( &server_fd, buf, n ) ) != (int) n ) { - printf( " failed\n ! net_send returned %d\n\n", ret ); + polarssl_printf( " failed\n ! net_send returned %d\n\n", ret ); goto exit; } /* * 7. Derive the shared secret: K = Ys ^ Xc mod P */ - printf( "\n . Shared secret: " ); + polarssl_printf( "\n . Shared secret: " ); fflush( stdout ); n = dhm.len; if( ( ret = dhm_calc_secret( &dhm, buf, &n, ctr_drbg_random, &ctr_drbg ) ) != 0 ) { - printf( " failed\n ! dhm_calc_secret returned %d\n\n", ret ); + polarssl_printf( " failed\n ! dhm_calc_secret returned %d\n\n", ret ); goto exit; } for( n = 0; n < 16; n++ ) - printf( "%02x", buf[n] ); + polarssl_printf( "%02x", buf[n] ); /* * 8. Setup the AES-256 decryption key @@ -255,7 +264,7 @@ int main( int argc, char *argv[] ) * the keying material for the encryption/decryption keys, * IVs and MACs. */ - printf( "...\n . Receiving and decrypting the ciphertext" ); + polarssl_printf( "...\n . Receiving and decrypting the ciphertext" ); fflush( stdout ); aes_setkey_dec( &aes, buf, 256 ); @@ -264,13 +273,13 @@ int main( int argc, char *argv[] ) if( ( ret = net_recv( &server_fd, buf, 16 ) ) != 16 ) { - printf( " failed\n ! net_recv returned %d\n\n", ret ); + polarssl_printf( " failed\n ! net_recv returned %d\n\n", ret ); goto exit; } aes_crypt_ecb( &aes, AES_DECRYPT, buf, buf ); buf[16] = '\0'; - printf( "\n . Plaintext is \"%s\"\n\n", (char *) buf ); + polarssl_printf( "\n . Plaintext is \"%s\"\n\n", (char *) buf ); exit: @@ -284,7 +293,7 @@ exit: entropy_free( &entropy ); #if defined(_WIN32) - printf( " + Press Enter to exit this program.\n" ); + polarssl_printf( " + Press Enter to exit this program.\n" ); fflush( stdout ); getchar(); #endif diff --git a/programs/pkey/dh_genprime.c b/programs/pkey/dh_genprime.c index 978e48af6..df12e185d 100644 --- a/programs/pkey/dh_genprime.c +++ b/programs/pkey/dh_genprime.c @@ -26,6 +26,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #include #include "polarssl/bignum.h" @@ -47,7 +56,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf("POLARSSL_BIGNUM_C and/or POLARSSL_ENTROPY_C and/or " + polarssl_printf("POLARSSL_BIGNUM_C and/or POLARSSL_ENTROPY_C and/or " "POLARSSL_FS_IO and/or POLARSSL_CTR_DRBG_C and/or " "POLARSSL_GENPRIME not defined.\n"); return( 0 ); @@ -70,31 +79,31 @@ int main( int argc, char *argv[] ) if( ( ret = mpi_read_string( &G, 10, GENERATOR ) ) != 0 ) { - printf( " failed\n ! mpi_read_string returned %d\n", ret ); + polarssl_printf( " failed\n ! mpi_read_string returned %d\n", ret ); goto exit; } - printf( "\nWARNING: You should not generate and use your own DHM primes\n" ); - printf( " unless you are very certain of what you are doing!\n" ); - printf( " Failing to follow this instruction may result in\n" ); - printf( " weak security for your connections! Use the\n" ); - printf( " predefined DHM parameters from dhm.h instead!\n\n" ); - printf( "============================================================\n\n" ); + polarssl_printf( "\nWARNING: You should not generate and use your own DHM primes\n" ); + polarssl_printf( " unless you are very certain of what you are doing!\n" ); + polarssl_printf( " Failing to follow this instruction may result in\n" ); + polarssl_printf( " weak security for your connections! Use the\n" ); + polarssl_printf( " predefined DHM parameters from dhm.h instead!\n\n" ); + polarssl_printf( "============================================================\n\n" ); - printf( " ! Generating large primes may take minutes!\n" ); + polarssl_printf( " ! Generating large primes may take minutes!\n" ); - printf( "\n . Seeding the random number generator..." ); + polarssl_printf( "\n . Seeding the random number generator..." ); fflush( stdout ); if( ( ret = ctr_drbg_init( &ctr_drbg, entropy_func, &entropy, (const unsigned char *) pers, strlen( pers ) ) ) != 0 ) { - printf( " failed\n ! ctr_drbg_init returned %d\n", ret ); + polarssl_printf( " failed\n ! ctr_drbg_init returned %d\n", ret ); goto exit; } - printf( " ok\n . Generating the modulus, please wait..." ); + polarssl_printf( " ok\n . Generating the modulus, please wait..." ); fflush( stdout ); /* @@ -103,49 +112,49 @@ int main( int argc, char *argv[] ) if( ( ret = mpi_gen_prime( &P, DH_P_SIZE, 1, ctr_drbg_random, &ctr_drbg ) ) != 0 ) { - printf( " failed\n ! mpi_gen_prime returned %d\n\n", ret ); + polarssl_printf( " failed\n ! mpi_gen_prime returned %d\n\n", ret ); goto exit; } - printf( " ok\n . Verifying that Q = (P-1)/2 is prime..." ); + polarssl_printf( " ok\n . Verifying that Q = (P-1)/2 is prime..." ); fflush( stdout ); if( ( ret = mpi_sub_int( &Q, &P, 1 ) ) != 0 ) { - printf( " failed\n ! mpi_sub_int returned %d\n\n", ret ); + polarssl_printf( " failed\n ! mpi_sub_int returned %d\n\n", ret ); goto exit; } if( ( ret = mpi_div_int( &Q, NULL, &Q, 2 ) ) != 0 ) { - printf( " failed\n ! mpi_div_int returned %d\n\n", ret ); + polarssl_printf( " failed\n ! mpi_div_int returned %d\n\n", ret ); goto exit; } if( ( ret = mpi_is_prime( &Q, ctr_drbg_random, &ctr_drbg ) ) != 0 ) { - printf( " failed\n ! mpi_is_prime returned %d\n\n", ret ); + polarssl_printf( " failed\n ! mpi_is_prime returned %d\n\n", ret ); goto exit; } - printf( " ok\n . Exporting the value in dh_prime.txt..." ); + polarssl_printf( " ok\n . Exporting the value in dh_prime.txt..." ); fflush( stdout ); if( ( fout = fopen( "dh_prime.txt", "wb+" ) ) == NULL ) { ret = 1; - printf( " failed\n ! Could not create dh_prime.txt\n\n" ); + polarssl_printf( " failed\n ! Could not create dh_prime.txt\n\n" ); goto exit; } if( ( ret = mpi_write_file( "P = ", &P, 16, fout ) != 0 ) || ( ret = mpi_write_file( "G = ", &G, 16, fout ) != 0 ) ) { - printf( " failed\n ! mpi_write_file returned %d\n\n", ret ); + polarssl_printf( " failed\n ! mpi_write_file returned %d\n\n", ret ); goto exit; } - printf( " ok\n\n" ); + polarssl_printf( " ok\n\n" ); fclose( fout ); exit: @@ -155,7 +164,7 @@ exit: entropy_free( &entropy ); #if defined(_WIN32) - printf( " Press Enter to exit this program.\n" ); + polarssl_printf( " Press Enter to exit this program.\n" ); fflush( stdout ); getchar(); #endif diff --git a/programs/pkey/dh_server.c b/programs/pkey/dh_server.c index bd8f0e8be..b9b3a50d8 100644 --- a/programs/pkey/dh_server.c +++ b/programs/pkey/dh_server.c @@ -26,6 +26,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #include #include @@ -49,7 +58,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf("POLARSSL_AES_C and/or POLARSSL_DHM_C and/or POLARSSL_ENTROPY_C " + polarssl_printf("POLARSSL_AES_C and/or POLARSSL_DHM_C and/or POLARSSL_ENTROPY_C " "and/or POLARSSL_NET_C and/or POLARSSL_RSA_C and/or " "POLARSSL_SHA1_C and/or POLARSSL_FS_IO and/or " "POLARSSL_CTR_DBRG_C not defined.\n"); @@ -86,7 +95,7 @@ int main( int argc, char *argv[] ) /* * 1. Setup the RNG */ - printf( "\n . Seeding the random number generator" ); + polarssl_printf( "\n . Seeding the random number generator" ); fflush( stdout ); entropy_init( &entropy ); @@ -94,20 +103,20 @@ int main( int argc, char *argv[] ) (const unsigned char *) pers, strlen( pers ) ) ) != 0 ) { - printf( " failed\n ! ctr_drbg_init returned %d\n", ret ); + polarssl_printf( " failed\n ! ctr_drbg_init returned %d\n", ret ); goto exit; } /* * 2a. Read the server's private RSA key */ - printf( "\n . Reading private key from rsa_priv.txt" ); + polarssl_printf( "\n . Reading private key from rsa_priv.txt" ); fflush( stdout ); if( ( f = fopen( "rsa_priv.txt", "rb" ) ) == NULL ) { ret = 1; - printf( " failed\n ! Could not open rsa_priv.txt\n" \ + polarssl_printf( " failed\n ! Could not open rsa_priv.txt\n" \ " ! Please run rsa_genkey first\n\n" ); goto exit; } @@ -123,7 +132,7 @@ int main( int argc, char *argv[] ) ( ret = mpi_read_file( &rsa.DQ, 16, f ) ) != 0 || ( ret = mpi_read_file( &rsa.QP, 16, f ) ) != 0 ) { - printf( " failed\n ! mpi_read_file returned %d\n\n", ret ); + polarssl_printf( " failed\n ! mpi_read_file returned %d\n\n", ret ); goto exit; } @@ -134,13 +143,13 @@ int main( int argc, char *argv[] ) /* * 2b. Get the DHM modulus and generator */ - printf( "\n . Reading DH parameters from dh_prime.txt" ); + polarssl_printf( "\n . Reading DH parameters from dh_prime.txt" ); fflush( stdout ); if( ( f = fopen( "dh_prime.txt", "rb" ) ) == NULL ) { ret = 1; - printf( " failed\n ! Could not open dh_prime.txt\n" \ + polarssl_printf( " failed\n ! Could not open dh_prime.txt\n" \ " ! Please run dh_genprime first\n\n" ); goto exit; } @@ -148,7 +157,7 @@ int main( int argc, char *argv[] ) if( mpi_read_file( &dhm.P, 16, f ) != 0 || mpi_read_file( &dhm.G, 16, f ) != 0 ) { - printf( " failed\n ! Invalid DH parameter file\n\n" ); + polarssl_printf( " failed\n ! Invalid DH parameter file\n\n" ); goto exit; } @@ -157,25 +166,25 @@ int main( int argc, char *argv[] ) /* * 3. Wait for a client to connect */ - printf( "\n . Waiting for a remote connection" ); + polarssl_printf( "\n . Waiting for a remote connection" ); fflush( stdout ); if( ( ret = net_bind( &listen_fd, NULL, SERVER_PORT ) ) != 0 ) { - printf( " failed\n ! net_bind returned %d\n\n", ret ); + polarssl_printf( " failed\n ! net_bind returned %d\n\n", ret ); goto exit; } if( ( ret = net_accept( listen_fd, &client_fd, NULL ) ) != 0 ) { - printf( " failed\n ! net_accept returned %d\n\n", ret ); + polarssl_printf( " failed\n ! net_accept returned %d\n\n", ret ); goto exit; } /* * 4. Setup the DH parameters (P,G,Ys) */ - printf( "\n . Sending the server's DH parameters" ); + polarssl_printf( "\n . Sending the server's DH parameters" ); fflush( stdout ); memset( buf, 0, sizeof( buf ) ); @@ -183,7 +192,7 @@ int main( int argc, char *argv[] ) if( ( ret = dhm_make_params( &dhm, (int) mpi_size( &dhm.P ), buf, &n, ctr_drbg_random, &ctr_drbg ) ) != 0 ) { - printf( " failed\n ! dhm_make_params returned %d\n\n", ret ); + polarssl_printf( " failed\n ! dhm_make_params returned %d\n\n", ret ); goto exit; } @@ -198,7 +207,7 @@ int main( int argc, char *argv[] ) if( ( ret = rsa_pkcs1_sign( &rsa, NULL, NULL, RSA_PRIVATE, POLARSSL_MD_SHA1, 0, hash, buf + n + 2 ) ) != 0 ) { - printf( " failed\n ! rsa_pkcs1_sign returned %d\n\n", ret ); + polarssl_printf( " failed\n ! rsa_pkcs1_sign returned %d\n\n", ret ); goto exit; } @@ -209,14 +218,14 @@ int main( int argc, char *argv[] ) if( ( ret = net_send( &client_fd, buf2, 2 ) ) != 2 || ( ret = net_send( &client_fd, buf, buflen ) ) != (int) buflen ) { - printf( " failed\n ! net_send returned %d\n\n", ret ); + polarssl_printf( " failed\n ! net_send returned %d\n\n", ret ); goto exit; } /* * 6. Get the client's public value: Yc = G ^ Xc mod P */ - printf( "\n . Receiving the client's public value" ); + polarssl_printf( "\n . Receiving the client's public value" ); fflush( stdout ); memset( buf, 0, sizeof( buf ) ); @@ -224,31 +233,31 @@ int main( int argc, char *argv[] ) if( ( ret = net_recv( &client_fd, buf, n ) ) != (int) n ) { - printf( " failed\n ! net_recv returned %d\n\n", ret ); + polarssl_printf( " failed\n ! net_recv returned %d\n\n", ret ); goto exit; } if( ( ret = dhm_read_public( &dhm, buf, dhm.len ) ) != 0 ) { - printf( " failed\n ! dhm_read_public returned %d\n\n", ret ); + polarssl_printf( " failed\n ! dhm_read_public returned %d\n\n", ret ); goto exit; } /* * 7. Derive the shared secret: K = Ys ^ Xc mod P */ - printf( "\n . Shared secret: " ); + polarssl_printf( "\n . Shared secret: " ); fflush( stdout ); if( ( ret = dhm_calc_secret( &dhm, buf, &n, ctr_drbg_random, &ctr_drbg ) ) != 0 ) { - printf( " failed\n ! dhm_calc_secret returned %d\n\n", ret ); + polarssl_printf( " failed\n ! dhm_calc_secret returned %d\n\n", ret ); goto exit; } for( n = 0; n < 16; n++ ) - printf( "%02x", buf[n] ); + polarssl_printf( "%02x", buf[n] ); /* * 8. Setup the AES-256 encryption key @@ -258,7 +267,7 @@ int main( int argc, char *argv[] ) * the keying material for the encryption/decryption keys * and MACs. */ - printf( "...\n . Encrypting and sending the ciphertext" ); + polarssl_printf( "...\n . Encrypting and sending the ciphertext" ); fflush( stdout ); aes_setkey_enc( &aes, buf, 256 ); @@ -267,11 +276,11 @@ int main( int argc, char *argv[] ) if( ( ret = net_send( &client_fd, buf, 16 ) ) != 16 ) { - printf( " failed\n ! net_send returned %d\n\n", ret ); + polarssl_printf( " failed\n ! net_send returned %d\n\n", ret ); goto exit; } - printf( "\n\n" ); + polarssl_printf( "\n\n" ); exit: @@ -285,7 +294,7 @@ exit: entropy_free( &entropy ); #if defined(_WIN32) - printf( " + Press Enter to exit this program.\n" ); + polarssl_printf( " + Press Enter to exit this program.\n" ); fflush( stdout ); getchar(); #endif diff --git a/programs/pkey/ecdsa.c b/programs/pkey/ecdsa.c index 72c8c4dc2..aaec2497b 100644 --- a/programs/pkey/ecdsa.c +++ b/programs/pkey/ecdsa.c @@ -26,6 +26,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #include "polarssl/entropy.h" #include "polarssl/ctr_drbg.h" #include "polarssl/ecdsa.h" @@ -54,7 +63,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf("POLARSSL_ECDSA_C and/or " + polarssl_printf("POLARSSL_ECDSA_C and/or " "POLARSSL_ENTROPY_C and/or POLARSSL_CTR_DRBG_C not defined\n"); return( 0 ); } @@ -65,11 +74,11 @@ static void dump_buf( const char *title, unsigned char *buf, size_t len ) { size_t i; - printf( "%s", title ); + polarssl_printf( "%s", title ); for( i = 0; i < len; i++ ) - printf("%c%c", "0123456789ABCDEF" [buf[i] / 16], + polarssl_printf("%c%c", "0123456789ABCDEF" [buf[i] / 16], "0123456789ABCDEF" [buf[i] % 16] ); - printf( "\n" ); + polarssl_printf( "\n" ); } static void dump_pubkey( const char *title, ecdsa_context *key ) @@ -80,7 +89,7 @@ static void dump_pubkey( const char *title, ecdsa_context *key ) if( ecp_point_write_binary( &key->grp, &key->Q, POLARSSL_ECP_PF_UNCOMPRESSED, &len, buf, sizeof buf ) != 0 ) { - printf("internal error\n"); + polarssl_printf("internal error\n"); return; } @@ -111,10 +120,10 @@ int main( int argc, char *argv[] ) if( argc != 1 ) { - printf( "usage: ecdsa\n" ); + polarssl_printf( "usage: ecdsa\n" ); #if defined(_WIN32) - printf( "\n" ); + polarssl_printf( "\n" ); #endif goto exit; @@ -123,7 +132,7 @@ int main( int argc, char *argv[] ) /* * Generate a key pair for signing */ - printf( "\n . Seeding the random number generator..." ); + polarssl_printf( "\n . Seeding the random number generator..." ); fflush( stdout ); entropy_init( &entropy ); @@ -131,28 +140,28 @@ int main( int argc, char *argv[] ) (const unsigned char *) pers, strlen( pers ) ) ) != 0 ) { - printf( " failed\n ! ctr_drbg_init returned %d\n", ret ); + polarssl_printf( " failed\n ! ctr_drbg_init returned %d\n", ret ); goto exit; } - printf( " ok\n . Generating key pair..." ); + polarssl_printf( " ok\n . Generating key pair..." ); fflush( stdout ); if( ( ret = ecdsa_genkey( &ctx_sign, ECPARAMS, ctr_drbg_random, &ctr_drbg ) ) != 0 ) { - printf( " failed\n ! ecdsa_genkey returned %d\n", ret ); + polarssl_printf( " failed\n ! ecdsa_genkey returned %d\n", ret ); goto exit; } - printf( " ok (key size: %d bits)\n", (int) ctx_sign.grp.pbits ); + polarssl_printf( " ok (key size: %d bits)\n", (int) ctx_sign.grp.pbits ); dump_pubkey( " + Public key: ", &ctx_sign ); /* * Sign some message hash */ - printf( " . Signing message..." ); + polarssl_printf( " . Signing message..." ); fflush( stdout ); if( ( ret = ecdsa_write_signature( &ctx_sign, @@ -160,10 +169,10 @@ int main( int argc, char *argv[] ) sig, &sig_len, ctr_drbg_random, &ctr_drbg ) ) != 0 ) { - printf( " failed\n ! ecdsa_genkey returned %d\n", ret ); + polarssl_printf( " failed\n ! ecdsa_genkey returned %d\n", ret ); goto exit; } - printf( " ok (signature length = %u)\n", (unsigned int) sig_len ); + polarssl_printf( " ok (signature length = %u)\n", (unsigned int) sig_len ); dump_buf( " + Hash: ", hash, sizeof hash ); dump_buf( " + Signature: ", sig, sig_len ); @@ -184,18 +193,18 @@ int main( int argc, char *argv[] ) * chose to use a new one in order to make it clear that the verifying * context only needs the public key (Q), and not the private key (d). */ - printf( " . Preparing verification context..." ); + polarssl_printf( " . Preparing verification context..." ); fflush( stdout ); if( ( ret = ecp_group_copy( &ctx_verify.grp, &ctx_sign.grp ) ) != 0 ) { - printf( " failed\n ! ecp_group_copy returned %d\n", ret ); + polarssl_printf( " failed\n ! ecp_group_copy returned %d\n", ret ); goto exit; } if( ( ret = ecp_copy( &ctx_verify.Q, &ctx_sign.Q ) ) != 0 ) { - printf( " failed\n ! ecp_copy returned %d\n", ret ); + polarssl_printf( " failed\n ! ecp_copy returned %d\n", ret ); goto exit; } @@ -204,23 +213,23 @@ int main( int argc, char *argv[] ) /* * Verify signature */ - printf( " ok\n . Verifying signature..." ); + polarssl_printf( " ok\n . Verifying signature..." ); fflush( stdout ); if( ( ret = ecdsa_read_signature( &ctx_verify, hash, sizeof( hash ), sig, sig_len ) ) != 0 ) { - printf( " failed\n ! ecdsa_read_signature returned %d\n", ret ); + polarssl_printf( " failed\n ! ecdsa_read_signature returned %d\n", ret ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); exit: #if defined(_WIN32) - printf( " + Press Enter to exit this program.\n" ); + polarssl_printf( " + Press Enter to exit this program.\n" ); fflush( stdout ); getchar(); #endif diff --git a/programs/pkey/gen_key.c b/programs/pkey/gen_key.c index 5470b5737..e96878627 100644 --- a/programs/pkey/gen_key.c +++ b/programs/pkey/gen_key.c @@ -26,6 +26,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #include #include #include @@ -49,7 +58,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf( "POLARSSL_PK_WRITE_C and/or POLARSSL_FS_IO and/or " + polarssl_printf( "POLARSSL_PK_WRITE_C and/or POLARSSL_FS_IO and/or " "POLARSSL_ENTROPY_C and/or POLARSSL_CTR_DRBG_C " "not defined.\n" ); return( 0 ); @@ -204,13 +213,13 @@ int main( int argc, char *argv[] ) { usage: ret = 1; - printf( USAGE ); + polarssl_printf( USAGE ); #if defined(POLARSSL_ECP_C) - printf( " availabled ec_curve values:\n" ); + polarssl_printf( " availabled ec_curve values:\n" ); curve_info = ecp_curve_list(); - printf( " %s (default)\n", curve_info->name ); + polarssl_printf( " %s (default)\n", curve_info->name ); while( ( ++curve_info )->name != NULL ) - printf( " %s\n", curve_info->name ); + polarssl_printf( " %s\n", curve_info->name ); #endif goto exit; } @@ -274,7 +283,7 @@ int main( int argc, char *argv[] ) goto usage; } - printf( "\n . Seeding the random number generator..." ); + polarssl_printf( "\n . Seeding the random number generator..." ); fflush( stdout ); entropy_init( &entropy ); @@ -284,11 +293,11 @@ int main( int argc, char *argv[] ) if( ( ret = entropy_add_source( &entropy, dev_random_entropy_poll, NULL, DEV_RANDOM_THRESHOLD ) ) != 0 ) { - printf( " failed\n ! entropy_add_source returned -0x%04x\n", -ret ); + polarssl_printf( " failed\n ! entropy_add_source returned -0x%04x\n", -ret ); goto exit; } - printf("\n Using /dev/random, so can take a long time! " ); + polarssl_printf("\n Using /dev/random, so can take a long time! " ); fflush( stdout ); } #endif /* !_WIN32 && POLARSSL_FS_IO */ @@ -297,19 +306,19 @@ int main( int argc, char *argv[] ) (const unsigned char *) pers, strlen( pers ) ) ) != 0 ) { - printf( " failed\n ! ctr_drbg_init returned -0x%04x\n", -ret ); + polarssl_printf( " failed\n ! ctr_drbg_init returned -0x%04x\n", -ret ); goto exit; } /* * 1.1. Generate the key */ - printf( "\n . Generating the private key ..." ); + polarssl_printf( "\n . Generating the private key ..." ); fflush( stdout ); if( ( ret = pk_init_ctx( &key, pk_info_from_type( opt.type ) ) ) != 0 ) { - printf( " failed\n ! pk_init_ctx returned -0x%04x", -ret ); + polarssl_printf( " failed\n ! pk_init_ctx returned -0x%04x", -ret ); goto exit; } @@ -320,7 +329,7 @@ int main( int argc, char *argv[] ) opt.rsa_keysize, 65537 ); if( ret != 0 ) { - printf( " failed\n ! rsa_gen_key returned -0x%04x", -ret ); + polarssl_printf( " failed\n ! rsa_gen_key returned -0x%04x", -ret ); goto exit; } } @@ -333,21 +342,21 @@ int main( int argc, char *argv[] ) ctr_drbg_random, &ctr_drbg ); if( ret != 0 ) { - printf( " failed\n ! rsa_gen_key returned -0x%04x", -ret ); + polarssl_printf( " failed\n ! rsa_gen_key returned -0x%04x", -ret ); goto exit; } } else #endif /* POLARSSL_ECP_C */ { - printf( " failed\n ! key type not supported\n" ); + polarssl_printf( " failed\n ! key type not supported\n" ); goto exit; } /* * 1.2 Print the key */ - printf( " ok\n . Key information:\n" ); + polarssl_printf( " ok\n . Key information:\n" ); #if defined(POLARSSL_RSA_C) if( pk_get_type( &key ) == POLARSSL_PK_RSA ) @@ -368,7 +377,7 @@ int main( int argc, char *argv[] ) if( pk_get_type( &key ) == POLARSSL_PK_ECKEY ) { ecp_keypair *ecp = pk_ec( key ); - printf( "curve: %s\n", + polarssl_printf( "curve: %s\n", ecp_curve_info_from_grp_id( ecp->grp.id )->name ); mpi_write_file( "X_Q: ", &ecp->Q.X, 16, NULL ); mpi_write_file( "Y_Q: ", &ecp->Q.Y, 16, NULL ); @@ -376,20 +385,20 @@ int main( int argc, char *argv[] ) } else #endif - printf(" ! key type not supported\n"); + polarssl_printf(" ! key type not supported\n"); /* * 1.3 Export key */ - printf( " . Writing key to file..." ); + polarssl_printf( " . Writing key to file..." ); if( ( ret = write_private_key( &key, opt.filename ) ) != 0 ) { - printf( " failed\n" ); + polarssl_printf( " failed\n" ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); exit: @@ -397,9 +406,9 @@ exit: { #ifdef POLARSSL_ERROR_C polarssl_strerror( ret, buf, sizeof( buf ) ); - printf( " - %s\n", buf ); + polarssl_printf( " - %s\n", buf ); #else - printf("\n"); + polarssl_printf("\n"); #endif } @@ -408,7 +417,7 @@ exit: entropy_free( &entropy ); #if defined(_WIN32) - printf( " + Press Enter to exit this program.\n" ); + polarssl_printf( " + Press Enter to exit this program.\n" ); fflush( stdout ); getchar(); #endif diff --git a/programs/pkey/key_app.c b/programs/pkey/key_app.c index 3637d6d5b..a161829f2 100644 --- a/programs/pkey/key_app.c +++ b/programs/pkey/key_app.c @@ -26,6 +26,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #include #include #include @@ -41,7 +50,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf("POLARSSL_BIGNUM_C and/or " + polarssl_printf("POLARSSL_BIGNUM_C and/or " "POLARSSL_PK_PARSE_C and/or POLARSSL_FS_IO not defined.\n"); return( 0 ); } @@ -94,7 +103,7 @@ int main( int argc, char *argv[] ) if( argc == 0 ) { usage: - printf( USAGE ); + polarssl_printf( USAGE ); goto exit; } @@ -133,7 +142,7 @@ int main( int argc, char *argv[] ) { if( strlen( opt.password ) && strlen( opt.password_file ) ) { - printf( "Error: cannot have both password and password_file\n" ); + polarssl_printf( "Error: cannot have both password and password_file\n" ); goto usage; } @@ -141,16 +150,16 @@ int main( int argc, char *argv[] ) { FILE *f; - printf( "\n . Loading the password file ..." ); + polarssl_printf( "\n . Loading the password file ..." ); if( ( f = fopen( opt.password_file, "rb" ) ) == NULL ) { - printf( " failed\n ! fopen returned NULL\n" ); + polarssl_printf( " failed\n ! fopen returned NULL\n" ); goto exit; } if( fgets( buf, sizeof(buf), f ) == NULL ) { fclose( f ); - printf( "Error: fgets() failed to retrieve password\n" ); + polarssl_printf( "Error: fgets() failed to retrieve password\n" ); goto exit; } fclose( f ); @@ -164,23 +173,23 @@ int main( int argc, char *argv[] ) /* * 1.1. Load the key */ - printf( "\n . Loading the private key ..." ); + polarssl_printf( "\n . Loading the private key ..." ); fflush( stdout ); ret = pk_parse_keyfile( &pk, opt.filename, opt.password ); if( ret != 0 ) { - printf( " failed\n ! pk_parse_keyfile returned -0x%04x\n", -ret ); + polarssl_printf( " failed\n ! pk_parse_keyfile returned -0x%04x\n", -ret ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); /* * 1.2 Print the key */ - printf( " . Key information ...\n" ); + polarssl_printf( " . Key information ...\n" ); #if defined(POLARSSL_RSA_C) if( pk_get_type( &pk ) == POLARSSL_PK_RSA ) { @@ -208,7 +217,7 @@ int main( int argc, char *argv[] ) else #endif { - printf("Do not know how to print key information for this type\n" ); + polarssl_printf("Do not know how to print key information for this type\n" ); goto exit; } } @@ -217,20 +226,20 @@ int main( int argc, char *argv[] ) /* * 1.1. Load the key */ - printf( "\n . Loading the public key ..." ); + polarssl_printf( "\n . Loading the public key ..." ); fflush( stdout ); ret = pk_parse_public_keyfile( &pk, opt.filename ); if( ret != 0 ) { - printf( " failed\n ! pk_parse_public_keyfile returned -0x%04x\n", -ret ); + polarssl_printf( " failed\n ! pk_parse_public_keyfile returned -0x%04x\n", -ret ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); - printf( " . Key information ...\n" ); + polarssl_printf( " . Key information ...\n" ); #if defined(POLARSSL_RSA_C) if( pk_get_type( &pk ) == POLARSSL_PK_RSA ) { @@ -251,7 +260,7 @@ int main( int argc, char *argv[] ) else #endif { - printf("Do not know how to print key information for this type\n" ); + polarssl_printf("Do not know how to print key information for this type\n" ); goto exit; } } @@ -262,13 +271,13 @@ exit: #if defined(POLARSSL_ERROR_C) polarssl_strerror( ret, buf, sizeof(buf) ); - printf( " ! Last error was: %s\n", buf ); + polarssl_printf( " ! Last error was: %s\n", buf ); #endif pk_free( &pk ); #if defined(_WIN32) - printf( " + Press Enter to exit this program.\n" ); + polarssl_printf( " + Press Enter to exit this program.\n" ); fflush( stdout ); getchar(); #endif diff --git a/programs/pkey/key_app_writer.c b/programs/pkey/key_app_writer.c index 18e644267..6862835e6 100644 --- a/programs/pkey/key_app_writer.c +++ b/programs/pkey/key_app_writer.c @@ -26,6 +26,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #include #include #include @@ -40,7 +49,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf( "POLARSSL_PK_WRITE_C and/or POLARSSL_FS_IO not defined.\n" ); + polarssl_printf( "POLARSSL_PK_WRITE_C and/or POLARSSL_FS_IO not defined.\n" ); return( 0 ); } #else @@ -201,7 +210,7 @@ int main( int argc, char *argv[] ) { usage: ret = 1; - printf( USAGE ); + polarssl_printf( USAGE ); goto exit; } @@ -258,13 +267,13 @@ int main( int argc, char *argv[] ) if( opt.mode == MODE_NONE && opt.output_mode != OUTPUT_MODE_NONE ) { - printf( "\nCannot output a key without reading one.\n"); + polarssl_printf( "\nCannot output a key without reading one.\n"); goto exit; } if( opt.mode == MODE_PUBLIC && opt.output_mode == OUTPUT_MODE_PRIVATE ) { - printf( "\nCannot output a private key from a public key.\n"); + polarssl_printf( "\nCannot output a private key from a public key.\n"); goto exit; } @@ -273,7 +282,7 @@ int main( int argc, char *argv[] ) /* * 1.1. Load the key */ - printf( "\n . Loading the private key ..." ); + polarssl_printf( "\n . Loading the private key ..." ); fflush( stdout ); ret = pk_parse_keyfile( &key, opt.filename, NULL ); @@ -281,16 +290,16 @@ int main( int argc, char *argv[] ) if( ret != 0 ) { polarssl_strerror( ret, (char *) buf, sizeof(buf) ); - printf( " failed\n ! pk_parse_keyfile returned -0x%04x - %s\n\n", -ret, buf ); + polarssl_printf( " failed\n ! pk_parse_keyfile returned -0x%04x - %s\n\n", -ret, buf ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); /* * 1.2 Print the key */ - printf( " . Key information ...\n" ); + polarssl_printf( " . Key information ...\n" ); #if defined(POLARSSL_RSA_C) if( pk_get_type( &key ) == POLARSSL_PK_RSA ) @@ -318,7 +327,7 @@ int main( int argc, char *argv[] ) } else #endif - printf("key type not supported yet\n"); + polarssl_printf("key type not supported yet\n"); } else if( opt.mode == MODE_PUBLIC ) @@ -326,7 +335,7 @@ int main( int argc, char *argv[] ) /* * 1.1. Load the key */ - printf( "\n . Loading the public key ..." ); + polarssl_printf( "\n . Loading the public key ..." ); fflush( stdout ); ret = pk_parse_public_keyfile( &key, opt.filename ); @@ -334,16 +343,16 @@ int main( int argc, char *argv[] ) if( ret != 0 ) { polarssl_strerror( ret, (char *) buf, sizeof(buf) ); - printf( " failed\n ! pk_parse_public_key returned -0x%04x - %s\n\n", -ret, buf ); + polarssl_printf( " failed\n ! pk_parse_public_key returned -0x%04x - %s\n\n", -ret, buf ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); /* * 1.2 Print the key */ - printf( " . Key information ...\n" ); + polarssl_printf( " . Key information ...\n" ); #if defined(POLARSSL_RSA_C) if( pk_get_type( &key ) == POLARSSL_PK_RSA ) @@ -364,7 +373,7 @@ int main( int argc, char *argv[] ) } else #endif - printf("key type not supported yet\n"); + polarssl_printf("key type not supported yet\n"); } else goto usage; @@ -384,16 +393,16 @@ exit: { #ifdef POLARSSL_ERROR_C polarssl_strerror( ret, buf, sizeof( buf ) ); - printf( " - %s\n", buf ); + polarssl_printf( " - %s\n", buf ); #else - printf("\n"); + polarssl_printf("\n"); #endif } pk_free( &key ); #if defined(_WIN32) - printf( " + Press Enter to exit this program.\n" ); + polarssl_printf( " + Press Enter to exit this program.\n" ); fflush( stdout ); getchar(); #endif diff --git a/programs/pkey/mpi_demo.c b/programs/pkey/mpi_demo.c index b0ece44af..bf277fd58 100644 --- a/programs/pkey/mpi_demo.c +++ b/programs/pkey/mpi_demo.c @@ -26,6 +26,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #include #include "polarssl/bignum.h" @@ -36,7 +45,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf("POLARSSL_BIGNUM_C and/or POLARSSL_FS_IO not defined.\n"); + polarssl_printf("POLARSSL_BIGNUM_C and/or POLARSSL_FS_IO not defined.\n"); return( 0 ); } #else @@ -56,11 +65,11 @@ int main( int argc, char *argv[] ) mpi_read_string( &E, 10, "257" ); mpi_mul_mpi( &N, &P, &Q ); - printf( "\n Public key:\n\n" ); + polarssl_printf( "\n Public key:\n\n" ); mpi_write_file( " N = ", &N, 10, NULL ); mpi_write_file( " E = ", &E, 10, NULL ); - printf( "\n Private key:\n\n" ); + polarssl_printf( "\n Private key:\n\n" ); mpi_write_file( " P = ", &P, 10, NULL ); mpi_write_file( " Q = ", &Q, 10, NULL ); @@ -73,24 +82,24 @@ int main( int argc, char *argv[] ) mpi_write_file( " D = E^-1 mod (P-1)*(Q-1) = ", &D, 10, NULL ); #else - printf("\nTest skipped (POLARSSL_GENPRIME not defined).\n\n"); + polarssl_printf("\nTest skipped (POLARSSL_GENPRIME not defined).\n\n"); #endif mpi_read_string( &X, 10, "55555" ); mpi_exp_mod( &Y, &X, &E, &N, NULL ); mpi_exp_mod( &Z, &Y, &D, &N, NULL ); - printf( "\n RSA operation:\n\n" ); + polarssl_printf( "\n RSA operation:\n\n" ); mpi_write_file( " X (plaintext) = ", &X, 10, NULL ); mpi_write_file( " Y (ciphertext) = X^E mod N = ", &Y, 10, NULL ); mpi_write_file( " Z (decrypted) = Y^D mod N = ", &Z, 10, NULL ); - printf( "\n" ); + polarssl_printf( "\n" ); mpi_free( &E ); mpi_free( &P ); mpi_free( &Q ); mpi_free( &N ); mpi_free( &H ); mpi_free( &D ); mpi_free( &X ); mpi_free( &Y ); mpi_free( &Z ); #if defined(_WIN32) - printf( " Press Enter to exit this program.\n" ); + polarssl_printf( " Press Enter to exit this program.\n" ); fflush( stdout ); getchar(); #endif diff --git a/programs/pkey/pk_decrypt.c b/programs/pkey/pk_decrypt.c index f80c1e234..314aad3ec 100644 --- a/programs/pkey/pk_decrypt.c +++ b/programs/pkey/pk_decrypt.c @@ -26,6 +26,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #include #include @@ -42,7 +51,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf("POLARSSL_BIGNUM_C and/or POLARSSL_PK_PARSE_C and/or " + polarssl_printf("POLARSSL_BIGNUM_C and/or POLARSSL_PK_PARSE_C and/or " "POLARSSL_FS_IO and/or POLARSSL_ENTROPY_C and/or " "POLARSSL_CTR_DRBG_C not defined.\n"); return( 0 ); @@ -66,16 +75,16 @@ int main( int argc, char *argv[] ) if( argc != 2 ) { - printf( "usage: pk_decrypt \n" ); + polarssl_printf( "usage: pk_decrypt \n" ); #if defined(_WIN32) - printf( "\n" ); + polarssl_printf( "\n" ); #endif goto exit; } - printf( "\n . Seeding the random number generator..." ); + polarssl_printf( "\n . Seeding the random number generator..." ); fflush( stdout ); entropy_init( &entropy ); @@ -83,18 +92,18 @@ int main( int argc, char *argv[] ) (const unsigned char *) pers, strlen( pers ) ) ) != 0 ) { - printf( " failed\n ! ctr_drbg_init returned %d\n", ret ); + polarssl_printf( " failed\n ! ctr_drbg_init returned %d\n", ret ); goto exit; } - printf( "\n . Reading private key from '%s'", argv[1] ); + polarssl_printf( "\n . Reading private key from '%s'", argv[1] ); fflush( stdout ); pk_init( &pk ); if( ( ret = pk_parse_keyfile( &pk, argv[1], "" ) ) != 0 ) { - printf( " failed\n ! pk_parse_keyfile returned -0x%04x\n", -ret ); + polarssl_printf( " failed\n ! pk_parse_keyfile returned -0x%04x\n", -ret ); goto exit; } @@ -105,7 +114,7 @@ int main( int argc, char *argv[] ) if( ( f = fopen( "result-enc.txt", "rb" ) ) == NULL ) { - printf( "\n ! Could not open %s\n\n", "result-enc.txt" ); + polarssl_printf( "\n ! Could not open %s\n\n", "result-enc.txt" ); goto exit; } @@ -120,19 +129,19 @@ int main( int argc, char *argv[] ) /* * Decrypt the encrypted RSA data and print the result. */ - printf( "\n . Decrypting the encrypted data" ); + polarssl_printf( "\n . Decrypting the encrypted data" ); fflush( stdout ); if( ( ret = pk_decrypt( &pk, buf, i, result, &olen, sizeof(result), ctr_drbg_random, &ctr_drbg ) ) != 0 ) { - printf( " failed\n ! pk_decrypt returned -0x%04x\n", -ret ); + polarssl_printf( " failed\n ! pk_decrypt returned -0x%04x\n", -ret ); goto exit; } - printf( "\n . OK\n\n" ); + polarssl_printf( "\n . OK\n\n" ); - printf( "The decrypted result is: '%s'\n\n", result ); + polarssl_printf( "The decrypted result is: '%s'\n\n", result ); ret = 0; @@ -142,11 +151,11 @@ exit: #if defined(POLARSSL_ERROR_C) polarssl_strerror( ret, (char *) buf, sizeof(buf) ); - printf( " ! Last error was: %s\n", buf ); + polarssl_printf( " ! Last error was: %s\n", buf ); #endif #if defined(_WIN32) - printf( " + Press Enter to exit this program.\n" ); + polarssl_printf( " + Press Enter to exit this program.\n" ); fflush( stdout ); getchar(); #endif diff --git a/programs/pkey/pk_encrypt.c b/programs/pkey/pk_encrypt.c index 223044bbb..9f2984939 100644 --- a/programs/pkey/pk_encrypt.c +++ b/programs/pkey/pk_encrypt.c @@ -26,6 +26,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #include #include @@ -42,7 +51,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf("POLARSSL_BIGNUM_C and/or POLARSSL_PK_PARSE_C and/or " + polarssl_printf("POLARSSL_BIGNUM_C and/or POLARSSL_PK_PARSE_C and/or " "POLARSSL_ENTROPY_C and/or POLARSSL_FS_IO and/or " "POLARSSL_CTR_DRBG_C not defined.\n"); return( 0 ); @@ -64,16 +73,16 @@ int main( int argc, char *argv[] ) if( argc != 3 ) { - printf( "usage: pk_encrypt \n" ); + polarssl_printf( "usage: pk_encrypt \n" ); #if defined(_WIN32) - printf( "\n" ); + polarssl_printf( "\n" ); #endif goto exit; } - printf( "\n . Seeding the random number generator..." ); + polarssl_printf( "\n . Seeding the random number generator..." ); fflush( stdout ); entropy_init( &entropy ); @@ -81,24 +90,24 @@ int main( int argc, char *argv[] ) (const unsigned char *) pers, strlen( pers ) ) ) != 0 ) { - printf( " failed\n ! ctr_drbg_init returned -0x%04x\n", -ret ); + polarssl_printf( " failed\n ! ctr_drbg_init returned -0x%04x\n", -ret ); goto exit; } - printf( "\n . Reading public key from '%s'", argv[1] ); + polarssl_printf( "\n . Reading public key from '%s'", argv[1] ); fflush( stdout ); pk_init( &pk ); if( ( ret = pk_parse_public_keyfile( &pk, argv[1] ) ) != 0 ) { - printf( " failed\n ! pk_parse_public_keyfile returned -0x%04x\n", -ret ); + polarssl_printf( " failed\n ! pk_parse_public_keyfile returned -0x%04x\n", -ret ); goto exit; } if( strlen( argv[2] ) > 100 ) { - printf( " Input data larger than 100 characters.\n\n" ); + polarssl_printf( " Input data larger than 100 characters.\n\n" ); goto exit; } @@ -107,14 +116,14 @@ int main( int argc, char *argv[] ) /* * Calculate the RSA encryption of the hash. */ - printf( "\n . Generating the encrypted value" ); + polarssl_printf( "\n . Generating the encrypted value" ); fflush( stdout ); if( ( ret = pk_encrypt( &pk, input, strlen( argv[2] ), buf, &olen, sizeof(buf), ctr_drbg_random, &ctr_drbg ) ) != 0 ) { - printf( " failed\n ! pk_encrypt returned -0x%04x\n", -ret ); + polarssl_printf( " failed\n ! pk_encrypt returned -0x%04x\n", -ret ); goto exit; } @@ -124,17 +133,17 @@ int main( int argc, char *argv[] ) if( ( f = fopen( "result-enc.txt", "wb+" ) ) == NULL ) { ret = 1; - printf( " failed\n ! Could not create %s\n\n", "result-enc.txt" ); + polarssl_printf( " failed\n ! Could not create %s\n\n", "result-enc.txt" ); goto exit; } for( i = 0; i < olen; i++ ) - fprintf( f, "%02X%s", buf[i], + polarssl_fprintf( f, "%02X%s", buf[i], ( i + 1 ) % 16 == 0 ? "\r\n" : " " ); fclose( f ); - printf( "\n . Done (created \"%s\")\n\n", "result-enc.txt" ); + polarssl_printf( "\n . Done (created \"%s\")\n\n", "result-enc.txt" ); exit: ctr_drbg_free( &ctr_drbg ); @@ -142,11 +151,11 @@ exit: #if defined(POLARSSL_ERROR_C) polarssl_strerror( ret, (char *) buf, sizeof(buf) ); - printf( " ! Last error was: %s\n", buf ); + polarssl_printf( " ! Last error was: %s\n", buf ); #endif #if defined(_WIN32) - printf( " + Press Enter to exit this program.\n" ); + polarssl_printf( " + Press Enter to exit this program.\n" ); fflush( stdout ); getchar(); #endif diff --git a/programs/pkey/pk_sign.c b/programs/pkey/pk_sign.c index 151e26325..d03269113 100644 --- a/programs/pkey/pk_sign.c +++ b/programs/pkey/pk_sign.c @@ -26,6 +26,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #include #include @@ -49,7 +58,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf("POLARSSL_BIGNUM_C and/or POLARSSL_ENTROPY_C and/or " + polarssl_printf("POLARSSL_BIGNUM_C and/or POLARSSL_ENTROPY_C and/or " "POLARSSL_SHA1_C and/or " "POLARSSL_PK_PARSE_C and/or POLARSSL_FS_IO and/or " "POLARSSL_CTR_DRBG_C not defined.\n"); @@ -74,33 +83,33 @@ int main( int argc, char *argv[] ) if( argc != 3 ) { - printf( "usage: pk_sign \n" ); + polarssl_printf( "usage: pk_sign \n" ); #if defined(_WIN32) - printf( "\n" ); + polarssl_printf( "\n" ); #endif goto exit; } - printf( "\n . Seeding the random number generator..." ); + polarssl_printf( "\n . Seeding the random number generator..." ); fflush( stdout ); if( ( ret = ctr_drbg_init( &ctr_drbg, entropy_func, &entropy, (const unsigned char *) pers, strlen( pers ) ) ) != 0 ) { - printf( " failed\n ! ctr_drbg_init returned -0x%04x\n", -ret ); + polarssl_printf( " failed\n ! ctr_drbg_init returned -0x%04x\n", -ret ); goto exit; } - printf( "\n . Reading private key from '%s'", argv[1] ); + polarssl_printf( "\n . Reading private key from '%s'", argv[1] ); fflush( stdout ); if( ( ret = pk_parse_keyfile( &pk, argv[1], "" ) ) != 0 ) { ret = 1; - printf( " failed\n ! Could not open '%s'\n", argv[1] ); + polarssl_printf( " failed\n ! Could not open '%s'\n", argv[1] ); goto exit; } @@ -108,19 +117,19 @@ int main( int argc, char *argv[] ) * Compute the SHA-1 hash of the input file, * then calculate the signature of the hash. */ - printf( "\n . Generating the SHA-1 signature" ); + polarssl_printf( "\n . Generating the SHA-1 signature" ); fflush( stdout ); if( ( ret = sha1_file( argv[2], hash ) ) != 0 ) { - printf( " failed\n ! Could not open or read %s\n\n", argv[2] ); + polarssl_printf( " failed\n ! Could not open or read %s\n\n", argv[2] ); goto exit; } if( ( ret = pk_sign( &pk, POLARSSL_MD_SHA1, hash, 0, buf, &olen, ctr_drbg_random, &ctr_drbg ) ) != 0 ) { - printf( " failed\n ! pk_sign returned -0x%04x\n", -ret ); + polarssl_printf( " failed\n ! pk_sign returned -0x%04x\n", -ret ); goto exit; } @@ -132,19 +141,19 @@ int main( int argc, char *argv[] ) if( ( f = fopen( filename, "wb+" ) ) == NULL ) { ret = 1; - printf( " failed\n ! Could not create %s\n\n", filename ); + polarssl_printf( " failed\n ! Could not create %s\n\n", filename ); goto exit; } if( fwrite( buf, 1, olen, f ) != olen ) { - printf( "failed\n ! fwrite failed\n\n" ); + polarssl_printf( "failed\n ! fwrite failed\n\n" ); goto exit; } fclose( f ); - printf( "\n . Done (created \"%s\")\n\n", filename ); + polarssl_printf( "\n . Done (created \"%s\")\n\n", filename ); exit: pk_free( &pk ); @@ -153,11 +162,11 @@ exit: #if defined(POLARSSL_ERROR_C) polarssl_strerror( ret, (char *) buf, sizeof(buf) ); - printf( " ! Last error was: %s\n", buf ); + polarssl_printf( " ! Last error was: %s\n", buf ); #endif #if defined(_WIN32) - printf( " + Press Enter to exit this program.\n" ); + polarssl_printf( " + Press Enter to exit this program.\n" ); fflush( stdout ); getchar(); #endif diff --git a/programs/pkey/pk_verify.c b/programs/pkey/pk_verify.c index f2e5eb3d4..89e9cc1be 100644 --- a/programs/pkey/pk_verify.c +++ b/programs/pkey/pk_verify.c @@ -26,6 +26,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #include #include @@ -46,7 +55,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf("POLARSSL_BIGNUM_C and/or " + polarssl_printf("POLARSSL_BIGNUM_C and/or " "POLARSSL_SHA1_C and/or POLARSSL_PK_PARSE_C and/or " "POLARSSL_FS_IO not defined.\n"); return( 0 ); @@ -66,21 +75,21 @@ int main( int argc, char *argv[] ) if( argc != 3 ) { - printf( "usage: pk_verify \n" ); + polarssl_printf( "usage: pk_verify \n" ); #if defined(_WIN32) - printf( "\n" ); + polarssl_printf( "\n" ); #endif goto exit; } - printf( "\n . Reading public key from '%s'", argv[1] ); + polarssl_printf( "\n . Reading public key from '%s'", argv[1] ); fflush( stdout ); if( ( ret = pk_parse_public_keyfile( &pk, argv[1] ) ) != 0 ) { - printf( " failed\n ! pk_parse_public_keyfile returned -0x%04x\n", -ret ); + polarssl_printf( " failed\n ! pk_parse_public_keyfile returned -0x%04x\n", -ret ); goto exit; } @@ -92,7 +101,7 @@ int main( int argc, char *argv[] ) if( ( f = fopen( filename, "rb" ) ) == NULL ) { - printf( "\n ! Could not open %s\n\n", filename ); + polarssl_printf( "\n ! Could not open %s\n\n", filename ); goto exit; } @@ -105,23 +114,23 @@ int main( int argc, char *argv[] ) * Compute the SHA-1 hash of the input file and compare * it with the hash decrypted from the signature. */ - printf( "\n . Verifying the SHA-1 signature" ); + polarssl_printf( "\n . Verifying the SHA-1 signature" ); fflush( stdout ); if( ( ret = sha1_file( argv[2], hash ) ) != 0 ) { - printf( " failed\n ! Could not open or read %s\n\n", argv[2] ); + polarssl_printf( " failed\n ! Could not open or read %s\n\n", argv[2] ); goto exit; } if( ( ret = pk_verify( &pk, POLARSSL_MD_SHA1, hash, 0, buf, i ) ) != 0 ) { - printf( " failed\n ! pk_verify returned -0x%04x\n", -ret ); + polarssl_printf( " failed\n ! pk_verify returned -0x%04x\n", -ret ); goto exit; } - printf( "\n . OK (the decrypted SHA-1 hash matches)\n\n" ); + polarssl_printf( "\n . OK (the decrypted SHA-1 hash matches)\n\n" ); ret = 0; @@ -130,11 +139,11 @@ exit: #if defined(POLARSSL_ERROR_C) polarssl_strerror( ret, (char *) buf, sizeof(buf) ); - printf( " ! Last error was: %s\n", buf ); + polarssl_printf( " ! Last error was: %s\n", buf ); #endif #if defined(_WIN32) - printf( " + Press Enter to exit this program.\n" ); + polarssl_printf( " + Press Enter to exit this program.\n" ); fflush( stdout ); getchar(); #endif diff --git a/programs/pkey/rsa_decrypt.c b/programs/pkey/rsa_decrypt.c index 4d42bc182..1e187a83f 100644 --- a/programs/pkey/rsa_decrypt.c +++ b/programs/pkey/rsa_decrypt.c @@ -26,6 +26,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #include #include @@ -41,7 +50,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf("POLARSSL_BIGNUM_C and/or POLARSSL_RSA_C and/or " + polarssl_printf("POLARSSL_BIGNUM_C and/or POLARSSL_RSA_C and/or " "POLARSSL_FS_IO and/or POLARSSL_ENTROPY_C and/or " "POLARSSL_CTR_DRBG_C not defined.\n"); return( 0 ); @@ -65,16 +74,16 @@ int main( int argc, char *argv[] ) if( argc != 1 ) { - printf( "usage: rsa_decrypt\n" ); + polarssl_printf( "usage: rsa_decrypt\n" ); #if defined(_WIN32) - printf( "\n" ); + polarssl_printf( "\n" ); #endif goto exit; } - printf( "\n . Seeding the random number generator..." ); + polarssl_printf( "\n . Seeding the random number generator..." ); fflush( stdout ); entropy_init( &entropy ); @@ -82,16 +91,16 @@ int main( int argc, char *argv[] ) (const unsigned char *) pers, strlen( pers ) ) ) != 0 ) { - printf( " failed\n ! ctr_drbg_init returned %d\n", ret ); + polarssl_printf( " failed\n ! ctr_drbg_init returned %d\n", ret ); goto exit; } - printf( "\n . Reading private key from rsa_priv.txt" ); + polarssl_printf( "\n . Reading private key from rsa_priv.txt" ); fflush( stdout ); if( ( f = fopen( "rsa_priv.txt", "rb" ) ) == NULL ) { - printf( " failed\n ! Could not open rsa_priv.txt\n" \ + polarssl_printf( " failed\n ! Could not open rsa_priv.txt\n" \ " ! Please run rsa_genkey first\n\n" ); goto exit; } @@ -107,7 +116,7 @@ int main( int argc, char *argv[] ) ( ret = mpi_read_file( &rsa.DQ, 16, f ) ) != 0 || ( ret = mpi_read_file( &rsa.QP, 16, f ) ) != 0 ) { - printf( " failed\n ! mpi_read_file returned %d\n\n", ret ); + polarssl_printf( " failed\n ! mpi_read_file returned %d\n\n", ret ); goto exit; } @@ -122,7 +131,7 @@ int main( int argc, char *argv[] ) if( ( f = fopen( "result-enc.txt", "rb" ) ) == NULL ) { - printf( "\n ! Could not open %s\n\n", "result-enc.txt" ); + polarssl_printf( "\n ! Could not open %s\n\n", "result-enc.txt" ); goto exit; } @@ -136,27 +145,27 @@ int main( int argc, char *argv[] ) if( i != rsa.len ) { - printf( "\n ! Invalid RSA signature format\n\n" ); + polarssl_printf( "\n ! Invalid RSA signature format\n\n" ); goto exit; } /* * Decrypt the encrypted RSA data and print the result. */ - printf( "\n . Decrypting the encrypted data" ); + polarssl_printf( "\n . Decrypting the encrypted data" ); fflush( stdout ); if( ( ret = rsa_pkcs1_decrypt( &rsa, ctr_drbg_random, &ctr_drbg, RSA_PRIVATE, &i, buf, result, 1024 ) ) != 0 ) { - printf( " failed\n ! rsa_pkcs1_decrypt returned %d\n\n", ret ); + polarssl_printf( " failed\n ! rsa_pkcs1_decrypt returned %d\n\n", ret ); goto exit; } - printf( "\n . OK\n\n" ); + polarssl_printf( "\n . OK\n\n" ); - printf( "The decrypted result is: '%s'\n\n", result ); + polarssl_printf( "The decrypted result is: '%s'\n\n", result ); ret = 0; @@ -165,7 +174,7 @@ exit: entropy_free( &entropy ); #if defined(_WIN32) - printf( " + Press Enter to exit this program.\n" ); + polarssl_printf( " + Press Enter to exit this program.\n" ); fflush( stdout ); getchar(); #endif diff --git a/programs/pkey/rsa_encrypt.c b/programs/pkey/rsa_encrypt.c index 69ffbcdae..e8c00d33d 100644 --- a/programs/pkey/rsa_encrypt.c +++ b/programs/pkey/rsa_encrypt.c @@ -26,6 +26,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #include #include @@ -41,7 +50,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf("POLARSSL_BIGNUM_C and/or POLARSSL_RSA_C and/or " + polarssl_printf("POLARSSL_BIGNUM_C and/or POLARSSL_RSA_C and/or " "POLARSSL_ENTROPY_C and/or POLARSSL_FS_IO and/or " "POLARSSL_CTR_DRBG_C not defined.\n"); return( 0 ); @@ -63,16 +72,16 @@ int main( int argc, char *argv[] ) if( argc != 2 ) { - printf( "usage: rsa_encrypt \n" ); + polarssl_printf( "usage: rsa_encrypt \n" ); #if defined(_WIN32) - printf( "\n" ); + polarssl_printf( "\n" ); #endif goto exit; } - printf( "\n . Seeding the random number generator..." ); + polarssl_printf( "\n . Seeding the random number generator..." ); fflush( stdout ); entropy_init( &entropy ); @@ -80,17 +89,17 @@ int main( int argc, char *argv[] ) (const unsigned char *) pers, strlen( pers ) ) ) != 0 ) { - printf( " failed\n ! ctr_drbg_init returned %d\n", ret ); + polarssl_printf( " failed\n ! ctr_drbg_init returned %d\n", ret ); goto exit; } - printf( "\n . Reading public key from rsa_pub.txt" ); + polarssl_printf( "\n . Reading public key from rsa_pub.txt" ); fflush( stdout ); if( ( f = fopen( "rsa_pub.txt", "rb" ) ) == NULL ) { ret = 1; - printf( " failed\n ! Could not open rsa_pub.txt\n" \ + polarssl_printf( " failed\n ! Could not open rsa_pub.txt\n" \ " ! Please run rsa_genkey first\n\n" ); goto exit; } @@ -100,7 +109,7 @@ int main( int argc, char *argv[] ) if( ( ret = mpi_read_file( &rsa.N, 16, f ) ) != 0 || ( ret = mpi_read_file( &rsa.E, 16, f ) ) != 0 ) { - printf( " failed\n ! mpi_read_file returned %d\n\n", ret ); + polarssl_printf( " failed\n ! mpi_read_file returned %d\n\n", ret ); goto exit; } @@ -110,7 +119,7 @@ int main( int argc, char *argv[] ) if( strlen( argv[1] ) > 100 ) { - printf( " Input data larger than 100 characters.\n\n" ); + polarssl_printf( " Input data larger than 100 characters.\n\n" ); goto exit; } @@ -119,14 +128,14 @@ int main( int argc, char *argv[] ) /* * Calculate the RSA encryption of the hash. */ - printf( "\n . Generating the RSA encrypted value" ); + polarssl_printf( "\n . Generating the RSA encrypted value" ); fflush( stdout ); if( ( ret = rsa_pkcs1_encrypt( &rsa, ctr_drbg_random, &ctr_drbg, RSA_PUBLIC, strlen( argv[1] ), input, buf ) ) != 0 ) { - printf( " failed\n ! rsa_pkcs1_encrypt returned %d\n\n", ret ); + polarssl_printf( " failed\n ! rsa_pkcs1_encrypt returned %d\n\n", ret ); goto exit; } @@ -136,24 +145,24 @@ int main( int argc, char *argv[] ) if( ( f = fopen( "result-enc.txt", "wb+" ) ) == NULL ) { ret = 1; - printf( " failed\n ! Could not create %s\n\n", "result-enc.txt" ); + polarssl_printf( " failed\n ! Could not create %s\n\n", "result-enc.txt" ); goto exit; } for( i = 0; i < rsa.len; i++ ) - fprintf( f, "%02X%s", buf[i], + polarssl_fprintf( f, "%02X%s", buf[i], ( i + 1 ) % 16 == 0 ? "\r\n" : " " ); fclose( f ); - printf( "\n . Done (created \"%s\")\n\n", "result-enc.txt" ); + polarssl_printf( "\n . Done (created \"%s\")\n\n", "result-enc.txt" ); exit: ctr_drbg_free( &ctr_drbg ); entropy_free( &entropy ); #if defined(_WIN32) - printf( " + Press Enter to exit this program.\n" ); + polarssl_printf( " + Press Enter to exit this program.\n" ); fflush( stdout ); getchar(); #endif diff --git a/programs/pkey/rsa_genkey.c b/programs/pkey/rsa_genkey.c index 556718cd1..955f819f7 100644 --- a/programs/pkey/rsa_genkey.c +++ b/programs/pkey/rsa_genkey.c @@ -26,6 +26,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #include #include "polarssl/entropy.h" @@ -45,7 +54,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf("POLARSSL_BIGNUM_C and/or POLARSSL_ENTROPY_C and/or " + polarssl_printf("POLARSSL_BIGNUM_C and/or POLARSSL_ENTROPY_C and/or " "POLARSSL_RSA_C and/or POLARSSL_GENPRIME and/or " "POLARSSL_FS_IO and/or POLARSSL_CTR_DRBG_C not defined.\n"); return( 0 ); @@ -64,7 +73,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf( "\n . Seeding the random number generator..." ); + polarssl_printf( "\n . Seeding the random number generator..." ); fflush( stdout ); entropy_init( &entropy ); @@ -72,11 +81,11 @@ int main( int argc, char *argv[] ) (const unsigned char *) pers, strlen( pers ) ) ) != 0 ) { - printf( " failed\n ! ctr_drbg_init returned %d\n", ret ); + polarssl_printf( " failed\n ! ctr_drbg_init returned %d\n", ret ); goto exit; } - printf( " ok\n . Generating the RSA key [ %d-bit ]...", KEY_SIZE ); + polarssl_printf( " ok\n . Generating the RSA key [ %d-bit ]...", KEY_SIZE ); fflush( stdout ); rsa_init( &rsa, RSA_PKCS_V15, 0 ); @@ -84,16 +93,16 @@ int main( int argc, char *argv[] ) if( ( ret = rsa_gen_key( &rsa, ctr_drbg_random, &ctr_drbg, KEY_SIZE, EXPONENT ) ) != 0 ) { - printf( " failed\n ! rsa_gen_key returned %d\n\n", ret ); + polarssl_printf( " failed\n ! rsa_gen_key returned %d\n\n", ret ); goto exit; } - printf( " ok\n . Exporting the public key in rsa_pub.txt...." ); + polarssl_printf( " ok\n . Exporting the public key in rsa_pub.txt...." ); fflush( stdout ); if( ( fpub = fopen( "rsa_pub.txt", "wb+" ) ) == NULL ) { - printf( " failed\n ! could not open rsa_pub.txt for writing\n\n" ); + polarssl_printf( " failed\n ! could not open rsa_pub.txt for writing\n\n" ); ret = 1; goto exit; } @@ -101,16 +110,16 @@ int main( int argc, char *argv[] ) if( ( ret = mpi_write_file( "N = ", &rsa.N, 16, fpub ) ) != 0 || ( ret = mpi_write_file( "E = ", &rsa.E, 16, fpub ) ) != 0 ) { - printf( " failed\n ! mpi_write_file returned %d\n\n", ret ); + polarssl_printf( " failed\n ! mpi_write_file returned %d\n\n", ret ); goto exit; } - printf( " ok\n . Exporting the private key in rsa_priv.txt..." ); + polarssl_printf( " ok\n . Exporting the private key in rsa_priv.txt..." ); fflush( stdout ); if( ( fpriv = fopen( "rsa_priv.txt", "wb+" ) ) == NULL ) { - printf( " failed\n ! could not open rsa_priv.txt for writing\n" ); + polarssl_printf( " failed\n ! could not open rsa_priv.txt for writing\n" ); ret = 1; goto exit; } @@ -124,11 +133,11 @@ int main( int argc, char *argv[] ) ( ret = mpi_write_file( "DQ = ", &rsa.DQ, 16, fpriv ) ) != 0 || ( ret = mpi_write_file( "QP = ", &rsa.QP, 16, fpriv ) ) != 0 ) { - printf( " failed\n ! mpi_write_file returned %d\n\n", ret ); + polarssl_printf( " failed\n ! mpi_write_file returned %d\n\n", ret ); goto exit; } /* - printf( " ok\n . Generating the certificate..." ); + polarssl_printf( " ok\n . Generating the certificate..." ); x509write_init_raw( &cert ); x509write_add_pubkey( &cert, &rsa ); @@ -140,7 +149,7 @@ int main( int argc, char *argv[] ) x509write_crtfile( &cert, "cert.pem", X509_OUTPUT_PEM ); x509write_free_raw( &cert ); */ - printf( " ok\n\n" ); + polarssl_printf( " ok\n\n" ); exit: @@ -155,7 +164,7 @@ exit: entropy_free( &entropy ); #if defined(_WIN32) - printf( " Press Enter to exit this program.\n" ); + polarssl_printf( " Press Enter to exit this program.\n" ); fflush( stdout ); getchar(); #endif diff --git a/programs/pkey/rsa_sign.c b/programs/pkey/rsa_sign.c index c466919c7..27d14743b 100644 --- a/programs/pkey/rsa_sign.c +++ b/programs/pkey/rsa_sign.c @@ -26,6 +26,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #include #include @@ -39,7 +48,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf("POLARSSL_BIGNUM_C and/or POLARSSL_RSA_C and/or " + polarssl_printf("POLARSSL_BIGNUM_C and/or POLARSSL_RSA_C and/or " "POLARSSL_SHA1_C and/or POLARSSL_FS_IO not defined.\n"); return( 0 ); } @@ -57,22 +66,22 @@ int main( int argc, char *argv[] ) if( argc != 2 ) { - printf( "usage: rsa_sign \n" ); + polarssl_printf( "usage: rsa_sign \n" ); #if defined(_WIN32) - printf( "\n" ); + polarssl_printf( "\n" ); #endif goto exit; } - printf( "\n . Reading private key from rsa_priv.txt" ); + polarssl_printf( "\n . Reading private key from rsa_priv.txt" ); fflush( stdout ); if( ( f = fopen( "rsa_priv.txt", "rb" ) ) == NULL ) { ret = 1; - printf( " failed\n ! Could not open rsa_priv.txt\n" \ + polarssl_printf( " failed\n ! Could not open rsa_priv.txt\n" \ " ! Please run rsa_genkey first\n\n" ); goto exit; } @@ -88,7 +97,7 @@ int main( int argc, char *argv[] ) ( ret = mpi_read_file( &rsa.DQ, 16, f ) ) != 0 || ( ret = mpi_read_file( &rsa.QP, 16, f ) ) != 0 ) { - printf( " failed\n ! mpi_read_file returned %d\n\n", ret ); + polarssl_printf( " failed\n ! mpi_read_file returned %d\n\n", ret ); goto exit; } @@ -96,11 +105,11 @@ int main( int argc, char *argv[] ) fclose( f ); - printf( "\n . Checking the private key" ); + polarssl_printf( "\n . Checking the private key" ); fflush( stdout ); if( ( ret = rsa_check_privkey( &rsa ) ) != 0 ) { - printf( " failed\n ! rsa_check_privkey failed with -0x%0x\n", -ret ); + polarssl_printf( " failed\n ! rsa_check_privkey failed with -0x%0x\n", -ret ); goto exit; } @@ -108,19 +117,19 @@ int main( int argc, char *argv[] ) * Compute the SHA-1 hash of the input file, * then calculate the RSA signature of the hash. */ - printf( "\n . Generating the RSA/SHA-1 signature" ); + polarssl_printf( "\n . Generating the RSA/SHA-1 signature" ); fflush( stdout ); if( ( ret = sha1_file( argv[1], hash ) ) != 0 ) { - printf( " failed\n ! Could not open or read %s\n\n", argv[1] ); + polarssl_printf( " failed\n ! Could not open or read %s\n\n", argv[1] ); goto exit; } if( ( ret = rsa_pkcs1_sign( &rsa, NULL, NULL, RSA_PRIVATE, POLARSSL_MD_SHA1, 20, hash, buf ) ) != 0 ) { - printf( " failed\n ! rsa_pkcs1_sign returned -0x%0x\n\n", -ret ); + polarssl_printf( " failed\n ! rsa_pkcs1_sign returned -0x%0x\n\n", -ret ); goto exit; } @@ -132,22 +141,22 @@ int main( int argc, char *argv[] ) if( ( f = fopen( argv[1], "wb+" ) ) == NULL ) { ret = 1; - printf( " failed\n ! Could not create %s\n\n", argv[1] ); + polarssl_printf( " failed\n ! Could not create %s\n\n", argv[1] ); goto exit; } for( i = 0; i < rsa.len; i++ ) - fprintf( f, "%02X%s", buf[i], + polarssl_fprintf( f, "%02X%s", buf[i], ( i + 1 ) % 16 == 0 ? "\r\n" : " " ); fclose( f ); - printf( "\n . Done (created \"%s\")\n\n", argv[1] ); + polarssl_printf( "\n . Done (created \"%s\")\n\n", argv[1] ); exit: #if defined(_WIN32) - printf( " + Press Enter to exit this program.\n" ); + polarssl_printf( " + Press Enter to exit this program.\n" ); fflush( stdout ); getchar(); #endif diff --git a/programs/pkey/rsa_sign_pss.c b/programs/pkey/rsa_sign_pss.c index d53761143..3c9cbdb21 100644 --- a/programs/pkey/rsa_sign_pss.c +++ b/programs/pkey/rsa_sign_pss.c @@ -26,6 +26,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #include #include @@ -49,7 +58,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf("POLARSSL_BIGNUM_C and/or POLARSSL_ENTROPY_C and/or " + polarssl_printf("POLARSSL_BIGNUM_C and/or POLARSSL_ENTROPY_C and/or " "POLARSSL_RSA_C and/or POLARSSL_SHA1_C and/or " "POLARSSL_PK_PARSE_C and/or POLARSSL_FS_IO and/or " "POLARSSL_CTR_DRBG_C not defined.\n"); @@ -74,41 +83,41 @@ int main( int argc, char *argv[] ) if( argc != 3 ) { - printf( "usage: rsa_sign_pss \n" ); + polarssl_printf( "usage: rsa_sign_pss \n" ); #if defined(_WIN32) - printf( "\n" ); + polarssl_printf( "\n" ); #endif goto exit; } - printf( "\n . Seeding the random number generator..." ); + polarssl_printf( "\n . Seeding the random number generator..." ); fflush( stdout ); if( ( ret = ctr_drbg_init( &ctr_drbg, entropy_func, &entropy, (const unsigned char *) pers, strlen( pers ) ) ) != 0 ) { - printf( " failed\n ! ctr_drbg_init returned %d\n", ret ); + polarssl_printf( " failed\n ! ctr_drbg_init returned %d\n", ret ); goto exit; } - printf( "\n . Reading private key from '%s'", argv[1] ); + polarssl_printf( "\n . Reading private key from '%s'", argv[1] ); fflush( stdout ); if( ( ret = pk_parse_keyfile( &pk, argv[1], "" ) ) != 0 ) { ret = 1; - printf( " failed\n ! Could not read key from '%s'\n", argv[1] ); - printf( " ! pk_parse_public_keyfile returned %d\n\n", ret ); + polarssl_printf( " failed\n ! Could not read key from '%s'\n", argv[1] ); + polarssl_printf( " ! pk_parse_public_keyfile returned %d\n\n", ret ); goto exit; } if( !pk_can_do( &pk, POLARSSL_PK_RSA ) ) { ret = 1; - printf( " failed\n ! Key is not an RSA key\n" ); + polarssl_printf( " failed\n ! Key is not an RSA key\n" ); goto exit; } @@ -118,19 +127,19 @@ int main( int argc, char *argv[] ) * Compute the SHA-1 hash of the input file, * then calculate the RSA signature of the hash. */ - printf( "\n . Generating the RSA/SHA-1 signature" ); + polarssl_printf( "\n . Generating the RSA/SHA-1 signature" ); fflush( stdout ); if( ( ret = sha1_file( argv[2], hash ) ) != 0 ) { - printf( " failed\n ! Could not open or read %s\n\n", argv[2] ); + polarssl_printf( " failed\n ! Could not open or read %s\n\n", argv[2] ); goto exit; } if( ( ret = pk_sign( &pk, POLARSSL_MD_SHA1, hash, 0, buf, &olen, ctr_drbg_random, &ctr_drbg ) ) != 0 ) { - printf( " failed\n ! pk_sign returned %d\n\n", ret ); + polarssl_printf( " failed\n ! pk_sign returned %d\n\n", ret ); goto exit; } @@ -142,19 +151,19 @@ int main( int argc, char *argv[] ) if( ( f = fopen( filename, "wb+" ) ) == NULL ) { ret = 1; - printf( " failed\n ! Could not create %s\n\n", filename ); + polarssl_printf( " failed\n ! Could not create %s\n\n", filename ); goto exit; } if( fwrite( buf, 1, olen, f ) != olen ) { - printf( "failed\n ! fwrite failed\n\n" ); + polarssl_printf( "failed\n ! fwrite failed\n\n" ); goto exit; } fclose( f ); - printf( "\n . Done (created \"%s\")\n\n", filename ); + polarssl_printf( "\n . Done (created \"%s\")\n\n", filename ); exit: pk_free( &pk ); @@ -162,7 +171,7 @@ exit: entropy_free( &entropy ); #if defined(_WIN32) - printf( " + Press Enter to exit this program.\n" ); + polarssl_printf( " + Press Enter to exit this program.\n" ); fflush( stdout ); getchar(); #endif diff --git a/programs/pkey/rsa_verify.c b/programs/pkey/rsa_verify.c index 7405df77f..43b742edf 100644 --- a/programs/pkey/rsa_verify.c +++ b/programs/pkey/rsa_verify.c @@ -26,6 +26,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #include #include @@ -39,7 +48,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf("POLARSSL_BIGNUM_C and/or POLARSSL_RSA_C and/or " + polarssl_printf("POLARSSL_BIGNUM_C and/or POLARSSL_RSA_C and/or " "POLARSSL_SHA1_C and/or POLARSSL_FS_IO not defined.\n"); return( 0 ); } @@ -56,21 +65,21 @@ int main( int argc, char *argv[] ) ret = 1; if( argc != 2 ) { - printf( "usage: rsa_verify \n" ); + polarssl_printf( "usage: rsa_verify \n" ); #if defined(_WIN32) - printf( "\n" ); + polarssl_printf( "\n" ); #endif goto exit; } - printf( "\n . Reading public key from rsa_pub.txt" ); + polarssl_printf( "\n . Reading public key from rsa_pub.txt" ); fflush( stdout ); if( ( f = fopen( "rsa_pub.txt", "rb" ) ) == NULL ) { - printf( " failed\n ! Could not open rsa_pub.txt\n" \ + polarssl_printf( " failed\n ! Could not open rsa_pub.txt\n" \ " ! Please run rsa_genkey first\n\n" ); goto exit; } @@ -80,7 +89,7 @@ int main( int argc, char *argv[] ) if( ( ret = mpi_read_file( &rsa.N, 16, f ) ) != 0 || ( ret = mpi_read_file( &rsa.E, 16, f ) ) != 0 ) { - printf( " failed\n ! mpi_read_file returned %d\n\n", ret ); + polarssl_printf( " failed\n ! mpi_read_file returned %d\n\n", ret ); goto exit; } @@ -97,7 +106,7 @@ int main( int argc, char *argv[] ) if( ( f = fopen( argv[1], "rb" ) ) == NULL ) { - printf( "\n ! Could not open %s\n\n", argv[1] ); + polarssl_printf( "\n ! Could not open %s\n\n", argv[1] ); goto exit; } @@ -111,7 +120,7 @@ int main( int argc, char *argv[] ) if( i != rsa.len ) { - printf( "\n ! Invalid RSA signature format\n\n" ); + polarssl_printf( "\n ! Invalid RSA signature format\n\n" ); goto exit; } @@ -119,30 +128,30 @@ int main( int argc, char *argv[] ) * Compute the SHA-1 hash of the input file and compare * it with the hash decrypted from the RSA signature. */ - printf( "\n . Verifying the RSA/SHA-1 signature" ); + polarssl_printf( "\n . Verifying the RSA/SHA-1 signature" ); fflush( stdout ); if( ( ret = sha1_file( argv[1], hash ) ) != 0 ) { - printf( " failed\n ! Could not open or read %s\n\n", argv[1] ); + polarssl_printf( " failed\n ! Could not open or read %s\n\n", argv[1] ); goto exit; } if( ( ret = rsa_pkcs1_verify( &rsa, NULL, NULL, RSA_PUBLIC, POLARSSL_MD_SHA1, 20, hash, buf ) ) != 0 ) { - printf( " failed\n ! rsa_pkcs1_verify returned -0x%0x\n\n", -ret ); + polarssl_printf( " failed\n ! rsa_pkcs1_verify returned -0x%0x\n\n", -ret ); goto exit; } - printf( "\n . OK (the decrypted SHA-1 hash matches)\n\n" ); + polarssl_printf( "\n . OK (the decrypted SHA-1 hash matches)\n\n" ); ret = 0; exit: #if defined(_WIN32) - printf( " + Press Enter to exit this program.\n" ); + polarssl_printf( " + Press Enter to exit this program.\n" ); fflush( stdout ); getchar(); #endif diff --git a/programs/pkey/rsa_verify_pss.c b/programs/pkey/rsa_verify_pss.c index f331b2f09..3f792621a 100644 --- a/programs/pkey/rsa_verify_pss.c +++ b/programs/pkey/rsa_verify_pss.c @@ -26,6 +26,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #include #include @@ -47,7 +56,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf("POLARSSL_BIGNUM_C and/or POLARSSL_RSA_C and/or " + polarssl_printf("POLARSSL_BIGNUM_C and/or POLARSSL_RSA_C and/or " "POLARSSL_SHA1_C and/or POLARSSL_PK_PARSE_C and/or " "POLARSSL_FS_IO not defined.\n"); return( 0 ); @@ -67,29 +76,29 @@ int main( int argc, char *argv[] ) if( argc != 3 ) { - printf( "usage: rsa_verify_pss \n" ); + polarssl_printf( "usage: rsa_verify_pss \n" ); #if defined(_WIN32) - printf( "\n" ); + polarssl_printf( "\n" ); #endif goto exit; } - printf( "\n . Reading public key from '%s'", argv[1] ); + polarssl_printf( "\n . Reading public key from '%s'", argv[1] ); fflush( stdout ); if( ( ret = pk_parse_public_keyfile( &pk, argv[1] ) ) != 0 ) { - printf( " failed\n ! Could not read key from '%s'\n", argv[1] ); - printf( " ! pk_parse_public_keyfile returned %d\n\n", ret ); + polarssl_printf( " failed\n ! Could not read key from '%s'\n", argv[1] ); + polarssl_printf( " ! pk_parse_public_keyfile returned %d\n\n", ret ); goto exit; } if( !pk_can_do( &pk, POLARSSL_PK_RSA ) ) { ret = 1; - printf( " failed\n ! Key is not an RSA key\n" ); + polarssl_printf( " failed\n ! Key is not an RSA key\n" ); goto exit; } @@ -103,7 +112,7 @@ int main( int argc, char *argv[] ) if( ( f = fopen( filename, "rb" ) ) == NULL ) { - printf( "\n ! Could not open %s\n\n", filename ); + polarssl_printf( "\n ! Could not open %s\n\n", filename ); goto exit; } @@ -116,23 +125,23 @@ int main( int argc, char *argv[] ) * Compute the SHA-1 hash of the input file and compare * it with the hash decrypted from the RSA signature. */ - printf( "\n . Verifying the RSA/SHA-1 signature" ); + polarssl_printf( "\n . Verifying the RSA/SHA-1 signature" ); fflush( stdout ); if( ( ret = sha1_file( argv[2], hash ) ) != 0 ) { - printf( " failed\n ! Could not open or read %s\n\n", argv[2] ); + polarssl_printf( " failed\n ! Could not open or read %s\n\n", argv[2] ); goto exit; } if( ( ret = pk_verify( &pk, POLARSSL_MD_SHA1, hash, 0, buf, i ) ) != 0 ) { - printf( " failed\n ! pk_verify returned %d\n\n", ret ); + polarssl_printf( " failed\n ! pk_verify returned %d\n\n", ret ); goto exit; } - printf( "\n . OK (the decrypted SHA-1 hash matches)\n\n" ); + polarssl_printf( "\n . OK (the decrypted SHA-1 hash matches)\n\n" ); ret = 0; @@ -140,7 +149,7 @@ exit: pk_free( &pk ); #if defined(_WIN32) - printf( " + Press Enter to exit this program.\n" ); + polarssl_printf( " + Press Enter to exit this program.\n" ); fflush( stdout ); getchar(); #endif diff --git a/programs/random/gen_entropy.c b/programs/random/gen_entropy.c index 38bd42361..5234f0174 100644 --- a/programs/random/gen_entropy.c +++ b/programs/random/gen_entropy.c @@ -26,6 +26,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #include "polarssl/entropy.h" #include @@ -36,7 +45,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf("POLARSSL_ENTROPY_C not defined.\n"); + polarssl_printf("POLARSSL_ENTROPY_C not defined.\n"); return( 0 ); } #else @@ -49,13 +58,13 @@ int main( int argc, char *argv[] ) if( argc < 2 ) { - fprintf( stderr, "usage: %s \n", argv[0] ); + polarssl_fprintf( stderr, "usage: %s \n", argv[0] ); return( 1 ); } if( ( f = fopen( argv[1], "wb+" ) ) == NULL ) { - printf( "failed to open '%s' for writing.\n", argv[0] ); + polarssl_printf( "failed to open '%s' for writing.\n", argv[0] ); return( 1 ); } @@ -66,13 +75,13 @@ int main( int argc, char *argv[] ) ret = entropy_func( &entropy, buf, sizeof( buf ) ); if( ret != 0 ) { - printf("failed!\n"); + polarssl_printf("failed!\n"); goto cleanup; } fwrite( buf, 1, sizeof( buf ), f ); - printf( "Generating 32Mb of data in file '%s'... %04.1f" \ + polarssl_printf( "Generating 32Mb of data in file '%s'... %04.1f" \ "%% done\r", argv[1], (100 * (float) (i + 1)) / k ); fflush( stdout ); } diff --git a/programs/random/gen_random_ctr_drbg.c b/programs/random/gen_random_ctr_drbg.c index 67516077f..5889d1120 100644 --- a/programs/random/gen_random_ctr_drbg.c +++ b/programs/random/gen_random_ctr_drbg.c @@ -26,6 +26,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #include "polarssl/entropy.h" #include "polarssl/ctr_drbg.h" @@ -37,7 +46,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf("POLARSSL_CTR_DRBG_C or POLARSSL_ENTROPY_C not defined.\n"); + polarssl_printf("POLARSSL_CTR_DRBG_C or POLARSSL_ENTROPY_C not defined.\n"); return( 0 ); } #else @@ -51,13 +60,13 @@ int main( int argc, char *argv[] ) if( argc < 2 ) { - fprintf( stderr, "usage: %s \n", argv[0] ); + polarssl_fprintf( stderr, "usage: %s \n", argv[0] ); return( 1 ); } if( ( f = fopen( argv[1], "wb+" ) ) == NULL ) { - printf( "failed to open '%s' for writing.\n", argv[0] ); + polarssl_printf( "failed to open '%s' for writing.\n", argv[0] ); return( 1 ); } @@ -65,7 +74,7 @@ int main( int argc, char *argv[] ) ret = ctr_drbg_init( &ctr_drbg, entropy_func, &entropy, (const unsigned char *) "RANDOM_GEN", 10 ); if( ret != 0 ) { - printf( "failed in ctr_drbg_init: %d\n", ret ); + polarssl_printf( "failed in ctr_drbg_init: %d\n", ret ); goto cleanup; } ctr_drbg_set_prediction_resistance( &ctr_drbg, CTR_DRBG_PR_OFF ); @@ -75,17 +84,17 @@ int main( int argc, char *argv[] ) if( ret == POLARSSL_ERR_CTR_DRBG_FILE_IO_ERROR ) { - printf( "Failed to open seedfile. Generating one.\n" ); + polarssl_printf( "Failed to open seedfile. Generating one.\n" ); ret = ctr_drbg_write_seed_file( &ctr_drbg, "seedfile" ); if( ret != 0 ) { - printf( "failed in ctr_drbg_write_seed_file: %d\n", ret ); + polarssl_printf( "failed in ctr_drbg_write_seed_file: %d\n", ret ); goto cleanup; } } else if( ret != 0 ) { - printf( "failed in ctr_drbg_update_seed_file: %d\n", ret ); + polarssl_printf( "failed in ctr_drbg_update_seed_file: %d\n", ret ); goto cleanup; } #endif @@ -95,13 +104,13 @@ int main( int argc, char *argv[] ) ret = ctr_drbg_random( &ctr_drbg, buf, sizeof( buf ) ); if( ret != 0 ) { - printf("failed!\n"); + polarssl_printf("failed!\n"); goto cleanup; } fwrite( buf, 1, sizeof( buf ), f ); - printf( "Generating 32Mb of data in file '%s'... %04.1f" \ + polarssl_printf( "Generating 32Mb of data in file '%s'... %04.1f" \ "%% done\r", argv[1], (100 * (float) (i + 1)) / k ); fflush( stdout ); } @@ -109,7 +118,7 @@ int main( int argc, char *argv[] ) ret = 0; cleanup: - printf("\n"); + polarssl_printf("\n"); fclose( f ); ctr_drbg_free( &ctr_drbg ); diff --git a/programs/random/gen_random_havege.c b/programs/random/gen_random_havege.c index eba93dd0e..d9b60512c 100644 --- a/programs/random/gen_random_havege.c +++ b/programs/random/gen_random_havege.c @@ -26,6 +26,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #include "polarssl/havege.h" #include @@ -37,7 +46,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf("POLARSSL_HAVEGE_C not defined.\n"); + polarssl_printf("POLARSSL_HAVEGE_C not defined.\n"); return( 0 ); } #else @@ -51,13 +60,13 @@ int main( int argc, char *argv[] ) if( argc < 2 ) { - fprintf( stderr, "usage: %s \n", argv[0] ); + polarssl_fprintf( stderr, "usage: %s \n", argv[0] ); return( 1 ); } if( ( f = fopen( argv[1], "wb+" ) ) == NULL ) { - printf( "failed to open '%s' for writing.\n", argv[0] ); + polarssl_printf( "failed to open '%s' for writing.\n", argv[0] ); return( 1 ); } @@ -69,7 +78,7 @@ int main( int argc, char *argv[] ) { if( havege_random( &hs, buf, sizeof( buf ) ) != 0 ) { - printf( "Failed to get random from source.\n" ); + polarssl_printf( "Failed to get random from source.\n" ); ret = 1; goto exit; @@ -77,7 +86,7 @@ int main( int argc, char *argv[] ) fwrite( buf, sizeof( buf ), 1, f ); - printf( "Generating 32Mb of data in file '%s'... %04.1f" \ + polarssl_printf( "Generating 32Mb of data in file '%s'... %04.1f" \ "%% done\r", argv[1], (100 * (float) (i + 1)) / k ); fflush( stdout ); } @@ -85,7 +94,7 @@ int main( int argc, char *argv[] ) if( t == time( NULL ) ) t--; - printf(" \n "); + polarssl_printf(" \n "); exit: havege_free( &hs ); diff --git a/programs/ssl/ssl_client1.c b/programs/ssl/ssl_client1.c index 0cf5eb695..9964936e8 100644 --- a/programs/ssl/ssl_client1.c +++ b/programs/ssl/ssl_client1.c @@ -26,6 +26,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #include #include @@ -46,7 +55,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf("POLARSSL_BIGNUM_C and/or POLARSSL_ENTROPY_C and/or " + polarssl_printf("POLARSSL_BIGNUM_C and/or POLARSSL_ENTROPY_C and/or " "POLARSSL_SSL_TLS_C and/or POLARSSL_SSL_CLI_C and/or " "POLARSSL_NET_C and/or POLARSSL_RSA_C and/or " "POLARSSL_CTR_DRBG_C and/or POLARSSL_X509_CRT_PARSE_C " @@ -65,7 +74,7 @@ static void my_debug( void *ctx, int level, const char *str ) { ((void) level); - fprintf( (FILE *) ctx, "%s", str ); + polarssl_fprintf( (FILE *) ctx, "%s", str ); fflush( (FILE *) ctx ); } @@ -93,7 +102,7 @@ int main( int argc, char *argv[] ) memset( &ssl, 0, sizeof( ssl_context ) ); x509_crt_init( &cacert ); - printf( "\n . Seeding the random number generator..." ); + polarssl_printf( "\n . Seeding the random number generator..." ); fflush( stdout ); entropy_init( &entropy ); @@ -101,16 +110,16 @@ int main( int argc, char *argv[] ) (const unsigned char *) pers, strlen( pers ) ) ) != 0 ) { - printf( " failed\n ! ctr_drbg_init returned %d\n", ret ); + polarssl_printf( " failed\n ! ctr_drbg_init returned %d\n", ret ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); /* * 0. Initialize certificates */ - printf( " . Loading the CA root certificate ..." ); + polarssl_printf( " . Loading the CA root certificate ..." ); fflush( stdout ); #if defined(POLARSSL_CERTS_C) @@ -118,46 +127,46 @@ int main( int argc, char *argv[] ) strlen( test_ca_list ) ); #else ret = 1; - printf("POLARSSL_CERTS_C not defined."); + polarssl_printf("POLARSSL_CERTS_C not defined."); #endif if( ret < 0 ) { - printf( " failed\n ! x509_crt_parse returned -0x%x\n\n", -ret ); + polarssl_printf( " failed\n ! x509_crt_parse returned -0x%x\n\n", -ret ); goto exit; } - printf( " ok (%d skipped)\n", ret ); + polarssl_printf( " ok (%d skipped)\n", ret ); /* * 1. Start the connection */ - printf( " . Connecting to tcp/%s/%4d...", SERVER_NAME, + polarssl_printf( " . Connecting to tcp/%s/%4d...", SERVER_NAME, SERVER_PORT ); fflush( stdout ); if( ( ret = net_connect( &server_fd, SERVER_NAME, SERVER_PORT ) ) != 0 ) { - printf( " failed\n ! net_connect returned %d\n\n", ret ); + polarssl_printf( " failed\n ! net_connect returned %d\n\n", ret ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); /* * 2. Setup stuff */ - printf( " . Setting up the SSL/TLS structure..." ); + polarssl_printf( " . Setting up the SSL/TLS structure..." ); fflush( stdout ); if( ( ret = ssl_init( &ssl ) ) != 0 ) { - printf( " failed\n ! ssl_init returned %d\n\n", ret ); + polarssl_printf( " failed\n ! ssl_init returned %d\n\n", ret ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); ssl_set_endpoint( &ssl, SSL_IS_CLIENT ); /* OPTIONAL is not optimal for security, @@ -178,51 +187,51 @@ int main( int argc, char *argv[] ) /* * 4. Handshake */ - printf( " . Performing the SSL/TLS handshake..." ); + polarssl_printf( " . Performing the SSL/TLS handshake..." ); fflush( stdout ); while( ( ret = ssl_handshake( &ssl ) ) != 0 ) { if( ret != POLARSSL_ERR_NET_WANT_READ && ret != POLARSSL_ERR_NET_WANT_WRITE ) { - printf( " failed\n ! ssl_handshake returned -0x%x\n\n", -ret ); + polarssl_printf( " failed\n ! ssl_handshake returned -0x%x\n\n", -ret ); goto exit; } } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); /* * 5. Verify the server certificate */ - printf( " . Verifying peer X.509 certificate..." ); + polarssl_printf( " . Verifying peer X.509 certificate..." ); /* In real life, we may want to bail out when ret != 0 */ if( ( ret = ssl_get_verify_result( &ssl ) ) != 0 ) { - printf( " failed\n" ); + polarssl_printf( " failed\n" ); if( ( ret & BADCERT_EXPIRED ) != 0 ) - printf( " ! server certificate has expired\n" ); + polarssl_printf( " ! server certificate has expired\n" ); if( ( ret & BADCERT_REVOKED ) != 0 ) - printf( " ! server certificate has been revoked\n" ); + polarssl_printf( " ! server certificate has been revoked\n" ); if( ( ret & BADCERT_CN_MISMATCH ) != 0 ) - printf( " ! CN mismatch (expected CN=%s)\n", "PolarSSL Server 1" ); + polarssl_printf( " ! CN mismatch (expected CN=%s)\n", "PolarSSL Server 1" ); if( ( ret & BADCERT_NOT_TRUSTED ) != 0 ) - printf( " ! self-signed or not signed by a trusted CA\n" ); + polarssl_printf( " ! self-signed or not signed by a trusted CA\n" ); - printf( "\n" ); + polarssl_printf( "\n" ); } else - printf( " ok\n" ); + polarssl_printf( " ok\n" ); /* * 3. Write the GET request */ - printf( " > Write to server:" ); + polarssl_printf( " > Write to server:" ); fflush( stdout ); len = sprintf( (char *) buf, GET_REQUEST ); @@ -231,18 +240,18 @@ int main( int argc, char *argv[] ) { if( ret != POLARSSL_ERR_NET_WANT_READ && ret != POLARSSL_ERR_NET_WANT_WRITE ) { - printf( " failed\n ! ssl_write returned %d\n\n", ret ); + polarssl_printf( " failed\n ! ssl_write returned %d\n\n", ret ); goto exit; } } len = ret; - printf( " %d bytes written\n\n%s", len, (char *) buf ); + polarssl_printf( " %d bytes written\n\n%s", len, (char *) buf ); /* * 7. Read the HTTP response */ - printf( " < Read from server:" ); + polarssl_printf( " < Read from server:" ); fflush( stdout ); do @@ -259,18 +268,18 @@ int main( int argc, char *argv[] ) if( ret < 0 ) { - printf( "failed\n ! ssl_read returned %d\n\n", ret ); + polarssl_printf( "failed\n ! ssl_read returned %d\n\n", ret ); break; } if( ret == 0 ) { - printf( "\n\nEOF\n\n" ); + polarssl_printf( "\n\nEOF\n\n" ); break; } len = ret; - printf( " %d bytes read\n\n%s", len, (char *) buf ); + polarssl_printf( " %d bytes read\n\n%s", len, (char *) buf ); } while( 1 ); @@ -283,7 +292,7 @@ exit: { char error_buf[100]; polarssl_strerror( ret, error_buf, 100 ); - printf("Last error was: %d - %s\n\n", ret, error_buf ); + polarssl_printf("Last error was: %d - %s\n\n", ret, error_buf ); } #endif @@ -298,7 +307,7 @@ exit: memset( &ssl, 0, sizeof( ssl ) ); #if defined(_WIN32) - printf( " + Press Enter to exit this program.\n" ); + polarssl_printf( " + Press Enter to exit this program.\n" ); fflush( stdout ); getchar(); #endif diff --git a/programs/ssl/ssl_client2.c b/programs/ssl/ssl_client2.c index d4f715c7e..247d14936 100644 --- a/programs/ssl/ssl_client2.c +++ b/programs/ssl/ssl_client2.c @@ -26,6 +26,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #if !defined(POLARSSL_ENTROPY_C) || \ !defined(POLARSSL_SSL_TLS_C) || !defined(POLARSSL_SSL_CLI_C) || \ !defined(POLARSSL_NET_C) || !defined(POLARSSL_CTR_DRBG_C) @@ -35,7 +44,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf("POLARSSL_ENTROPY_C and/or " + polarssl_printf("POLARSSL_ENTROPY_C and/or " "POLARSSL_SSL_TLS_C and/or POLARSSL_SSL_CLI_C and/or " "POLARSSL_NET_C and/or POLARSSL_CTR_DRBG_C not defined.\n"); return( 0 ); @@ -145,7 +154,7 @@ static void my_debug( void *ctx, int level, const char *str ) { ((void) level); - fprintf( (FILE *) ctx, "%s", str ); + polarssl_fprintf( (FILE *) ctx, "%s", str ); fflush( (FILE *) ctx ); } @@ -196,33 +205,33 @@ static int my_verify( void *data, x509_crt *crt, int depth, int *flags ) char buf[1024]; ((void) data); - printf( "\nVerify requested for (Depth %d):\n", depth ); + polarssl_printf( "\nVerify requested for (Depth %d):\n", depth ); x509_crt_info( buf, sizeof( buf ) - 1, "", crt ); - printf( "%s", buf ); + polarssl_printf( "%s", buf ); if( ( (*flags) & BADCERT_EXPIRED ) != 0 ) - printf( " ! server certificate has expired\n" ); + polarssl_printf( " ! server certificate has expired\n" ); if( ( (*flags) & BADCERT_REVOKED ) != 0 ) - printf( " ! server certificate has been revoked\n" ); + polarssl_printf( " ! server certificate has been revoked\n" ); if( ( (*flags) & BADCERT_CN_MISMATCH ) != 0 ) - printf( " ! CN mismatch\n" ); + polarssl_printf( " ! CN mismatch\n" ); if( ( (*flags) & BADCERT_NOT_TRUSTED ) != 0 ) - printf( " ! self-signed or not signed by a trusted CA\n" ); + polarssl_printf( " ! self-signed or not signed by a trusted CA\n" ); if( ( (*flags) & BADCRL_NOT_TRUSTED ) != 0 ) - printf( " ! CRL not trusted\n" ); + polarssl_printf( " ! CRL not trusted\n" ); if( ( (*flags) & BADCRL_EXPIRED ) != 0 ) - printf( " ! CRL expired\n" ); + polarssl_printf( " ! CRL expired\n" ); if( ( (*flags) & BADCERT_OTHER ) != 0 ) - printf( " ! other (unknown) flag\n" ); + polarssl_printf( " ! other (unknown) flag\n" ); if ( ( *flags ) == 0 ) - printf( " This certificate has no flags\n" ); + polarssl_printf( " This certificate has no flags\n" ); return( 0 ); } @@ -417,19 +426,19 @@ int main( int argc, char *argv[] ) if( ret == 0 ) ret = 1; - printf( USAGE ); + polarssl_printf( USAGE ); list = ssl_list_ciphersuites(); while( *list ) { - printf(" %-42s", ssl_get_ciphersuite_name( *list ) ); + polarssl_printf(" %-42s", ssl_get_ciphersuite_name( *list ) ); list++; if( !*list ) break; - printf(" %s\n", ssl_get_ciphersuite_name( *list ) ); + polarssl_printf(" %s\n", ssl_get_ciphersuite_name( *list ) ); list++; } - printf("\n"); + polarssl_printf("\n"); goto exit; } @@ -717,14 +726,14 @@ int main( int argc, char *argv[] ) if( opt.max_version != -1 && ciphersuite_info->min_minor_ver > opt.max_version ) { - printf("forced ciphersuite not allowed with this protocol version\n"); + polarssl_printf("forced ciphersuite not allowed with this protocol version\n"); ret = 2; goto usage; } if( opt.min_version != -1 && ciphersuite_info->max_minor_ver < opt.min_version ) { - printf("forced ciphersuite not allowed with this protocol version\n"); + polarssl_printf("forced ciphersuite not allowed with this protocol version\n"); ret = 2; goto usage; } @@ -745,7 +754,7 @@ int main( int argc, char *argv[] ) if( strlen( opt.psk ) % 2 != 0 ) { - printf("pre-shared key not valid hex\n"); + polarssl_printf("pre-shared key not valid hex\n"); goto exit; } @@ -762,7 +771,7 @@ int main( int argc, char *argv[] ) c -= 'A' - 10; else { - printf("pre-shared key not valid hex\n"); + polarssl_printf("pre-shared key not valid hex\n"); goto exit; } psk[ j / 2 ] = c << 4; @@ -776,7 +785,7 @@ int main( int argc, char *argv[] ) c -= 'A' - 10; else { - printf("pre-shared key not valid hex\n"); + polarssl_printf("pre-shared key not valid hex\n"); goto exit; } psk[ j / 2 ] |= c; @@ -807,7 +816,7 @@ int main( int argc, char *argv[] ) /* * 0. Initialize the RNG and the session data */ - printf( "\n . Seeding the random number generator..." ); + polarssl_printf( "\n . Seeding the random number generator..." ); fflush( stdout ); entropy_init( &entropy ); @@ -815,17 +824,17 @@ int main( int argc, char *argv[] ) (const unsigned char *) pers, strlen( pers ) ) ) != 0 ) { - printf( " failed\n ! ctr_drbg_init returned -0x%x\n", -ret ); + polarssl_printf( " failed\n ! ctr_drbg_init returned -0x%x\n", -ret ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); #if defined(POLARSSL_X509_CRT_PARSE_C) /* * 1.1. Load the trusted CA */ - printf( " . Loading the CA root certificate ..." ); + polarssl_printf( " . Loading the CA root certificate ..." ); fflush( stdout ); #if defined(POLARSSL_FS_IO) @@ -847,23 +856,23 @@ int main( int argc, char *argv[] ) #else { ret = 1; - printf("POLARSSL_CERTS_C not defined."); + polarssl_printf("POLARSSL_CERTS_C not defined."); } #endif if( ret < 0 ) { - printf( " failed\n ! x509_crt_parse returned -0x%x\n\n", -ret ); + polarssl_printf( " failed\n ! x509_crt_parse returned -0x%x\n\n", -ret ); goto exit; } - printf( " ok (%d skipped)\n", ret ); + polarssl_printf( " ok (%d skipped)\n", ret ); /* * 1.2. Load own certificate and private key * * (can be skipped if client authentication is not required) */ - printf( " . Loading the client cert. and key..." ); + polarssl_printf( " . Loading the client cert. and key..." ); fflush( stdout ); #if defined(POLARSSL_FS_IO) @@ -880,12 +889,12 @@ int main( int argc, char *argv[] ) #else { ret = 1; - printf("POLARSSL_CERTS_C not defined."); + polarssl_printf("POLARSSL_CERTS_C not defined."); } #endif if( ret != 0 ) { - printf( " failed\n ! x509_crt_parse returned -0x%x\n\n", -ret ); + polarssl_printf( " failed\n ! x509_crt_parse returned -0x%x\n\n", -ret ); goto exit; } @@ -903,16 +912,16 @@ int main( int argc, char *argv[] ) #else { ret = 1; - printf("POLARSSL_CERTS_C not defined."); + polarssl_printf("POLARSSL_CERTS_C not defined."); } #endif if( ret != 0 ) { - printf( " failed\n ! pk_parse_key returned -0x%x\n\n", -ret ); + polarssl_printf( " failed\n ! pk_parse_key returned -0x%x\n\n", -ret ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); #endif /* POLARSSL_X509_CRT_PARSE_C */ /* @@ -921,14 +930,14 @@ int main( int argc, char *argv[] ) if( opt.server_addr == NULL) opt.server_addr = opt.server_name; - printf( " . Connecting to tcp/%s/%-4d...", opt.server_addr, + polarssl_printf( " . Connecting to tcp/%s/%-4d...", opt.server_addr, opt.server_port ); fflush( stdout ); if( ( ret = net_connect( &server_fd, opt.server_addr, opt.server_port ) ) != 0 ) { - printf( " failed\n ! net_connect returned -0x%x\n\n", -ret ); + polarssl_printf( " failed\n ! net_connect returned -0x%x\n\n", -ret ); goto exit; } @@ -938,25 +947,25 @@ int main( int argc, char *argv[] ) ret = net_set_block( server_fd ); if( ret != 0 ) { - printf( " failed\n ! net_set_(non)block() returned -0x%x\n\n", -ret ); + polarssl_printf( " failed\n ! net_set_(non)block() returned -0x%x\n\n", -ret ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); /* * 3. Setup stuff */ - printf( " . Setting up the SSL/TLS structure..." ); + polarssl_printf( " . Setting up the SSL/TLS structure..." ); fflush( stdout ); if( ( ret = ssl_init( &ssl ) ) != 0 ) { - printf( " failed\n ! ssl_init returned -0x%x\n\n", -ret ); + polarssl_printf( " failed\n ! ssl_init returned -0x%x\n\n", -ret ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); #if defined(POLARSSL_X509_CRT_PARSE_C) if( opt.debug_level > 0 ) @@ -969,7 +978,7 @@ int main( int argc, char *argv[] ) #if defined(POLARSSL_SSL_MAX_FRAGMENT_LENGTH) if( ( ret = ssl_set_max_frag_len( &ssl, opt.mfl_code ) ) != 0 ) { - printf( " failed\n ! ssl_set_max_frag_len returned %d\n\n", ret ); + polarssl_printf( " failed\n ! ssl_set_max_frag_len returned %d\n\n", ret ); goto exit; } #endif @@ -1000,7 +1009,7 @@ int main( int argc, char *argv[] ) if( opt.alpn_string != NULL ) if( ( ret = ssl_set_alpn_protocols( &ssl, alpn_list ) ) != 0 ) { - printf( " failed\n ! ssl_set_alpn_protocols returned %d\n\n", ret ); + polarssl_printf( " failed\n ! ssl_set_alpn_protocols returned %d\n\n", ret ); goto exit; } #endif @@ -1016,7 +1025,7 @@ int main( int argc, char *argv[] ) #if defined(POLARSSL_SSL_SESSION_TICKETS) if( ( ret = ssl_set_session_tickets( &ssl, opt.tickets ) ) != 0 ) { - printf( " failed\n ! ssl_set_session_tickets returned %d\n\n", ret ); + polarssl_printf( " failed\n ! ssl_set_session_tickets returned %d\n\n", ret ); goto exit; } #endif @@ -1044,7 +1053,7 @@ int main( int argc, char *argv[] ) { if( ( ret = ssl_set_own_cert( &ssl, &clicert, &pkey ) ) != 0 ) { - printf( " failed\n ! ssl_set_own_cert returned %d\n\n", ret ); + polarssl_printf( " failed\n ! ssl_set_own_cert returned %d\n\n", ret ); goto exit; } } @@ -1055,7 +1064,7 @@ int main( int argc, char *argv[] ) (const unsigned char *) opt.psk_identity, strlen( opt.psk_identity ) ) ) != 0 ) { - printf( " failed\n ! ssl_set_psk returned %d\n\n", ret ); + polarssl_printf( " failed\n ! ssl_set_psk returned %d\n\n", ret ); goto exit; } #endif @@ -1063,7 +1072,7 @@ int main( int argc, char *argv[] ) #if defined(POLARSSL_SSL_SERVER_NAME_INDICATION) if( ( ret = ssl_set_hostname( &ssl, opt.server_name ) ) != 0 ) { - printf( " failed\n ! ssl_set_hostname returned %d\n\n", ret ); + polarssl_printf( " failed\n ! ssl_set_hostname returned %d\n\n", ret ); goto exit; } #endif @@ -1080,86 +1089,86 @@ int main( int argc, char *argv[] ) /* * 4. Handshake */ - printf( " . Performing the SSL/TLS handshake..." ); + polarssl_printf( " . Performing the SSL/TLS handshake..." ); fflush( stdout ); while( ( ret = ssl_handshake( &ssl ) ) != 0 ) { if( ret != POLARSSL_ERR_NET_WANT_READ && ret != POLARSSL_ERR_NET_WANT_WRITE ) { - printf( " failed\n ! ssl_handshake returned -0x%x\n", -ret ); + polarssl_printf( " failed\n ! ssl_handshake returned -0x%x\n", -ret ); if( ret == POLARSSL_ERR_X509_CERT_VERIFY_FAILED ) - printf( + polarssl_printf( " Unable to verify the server's certificate. " "Either it is invalid,\n" " or you didn't set ca_file or ca_path " "to an appropriate value.\n" " Alternatively, you may want to use " "auth_mode=optional for testing purposes.\n" ); - printf( "\n" ); + polarssl_printf( "\n" ); goto exit; } } - printf( " ok\n [ Protocol is %s ]\n [ Ciphersuite is %s ]\n", + polarssl_printf( " ok\n [ Protocol is %s ]\n [ Ciphersuite is %s ]\n", ssl_get_version( &ssl ), ssl_get_ciphersuite( &ssl ) ); #if defined(POLARSSL_SSL_ALPN) if( opt.alpn_string != NULL ) { const char *alp = ssl_get_alpn_protocol( &ssl ); - printf( " [ Application Layer Protocol is %s ]\n", + polarssl_printf( " [ Application Layer Protocol is %s ]\n", alp ? alp : "(none)" ); } #endif if( opt.reconnect != 0 ) { - printf(" . Saving session for reuse..." ); + polarssl_printf(" . Saving session for reuse..." ); fflush( stdout ); if( ( ret = ssl_get_session( &ssl, &saved_session ) ) != 0 ) { - printf( " failed\n ! ssl_get_session returned -0x%x\n\n", -ret ); + polarssl_printf( " failed\n ! ssl_get_session returned -0x%x\n\n", -ret ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); } #if defined(POLARSSL_X509_CRT_PARSE_C) /* * 5. Verify the server certificate */ - printf( " . Verifying peer X.509 certificate..." ); + polarssl_printf( " . Verifying peer X.509 certificate..." ); if( ( ret = ssl_get_verify_result( &ssl ) ) != 0 ) { - printf( " failed\n" ); + polarssl_printf( " failed\n" ); if( ( ret & BADCERT_EXPIRED ) != 0 ) - printf( " ! server certificate has expired\n" ); + polarssl_printf( " ! server certificate has expired\n" ); if( ( ret & BADCERT_REVOKED ) != 0 ) - printf( " ! server certificate has been revoked\n" ); + polarssl_printf( " ! server certificate has been revoked\n" ); if( ( ret & BADCERT_CN_MISMATCH ) != 0 ) - printf( " ! CN mismatch (expected CN=%s)\n", opt.server_name ); + polarssl_printf( " ! CN mismatch (expected CN=%s)\n", opt.server_name ); if( ( ret & BADCERT_NOT_TRUSTED ) != 0 ) - printf( " ! self-signed or not signed by a trusted CA\n" ); + polarssl_printf( " ! self-signed or not signed by a trusted CA\n" ); - printf( "\n" ); + polarssl_printf( "\n" ); } else - printf( " ok\n" ); + polarssl_printf( " ok\n" ); if( ssl_get_peer_cert( &ssl ) != NULL ) { - printf( " . Peer certificate information ...\n" ); + polarssl_printf( " . Peer certificate information ...\n" ); x509_crt_info( (char *) buf, sizeof( buf ) - 1, " ", ssl_get_peer_cert( &ssl ) ); - printf( "%s\n", buf ); + polarssl_printf( "%s\n", buf ); } #endif /* POLARSSL_X509_CRT_PARSE_C */ @@ -1170,18 +1179,18 @@ int main( int argc, char *argv[] ) * Perform renegotiation (this must be done when the server is waiting * for input from our side). */ - printf( " . Performing renegotiation..." ); + polarssl_printf( " . Performing renegotiation..." ); fflush( stdout ); while( ( ret = ssl_renegotiate( &ssl ) ) != 0 ) { if( ret != POLARSSL_ERR_NET_WANT_READ && ret != POLARSSL_ERR_NET_WANT_WRITE ) { - printf( " failed\n ! ssl_renegotiate returned %d\n\n", ret ); + polarssl_printf( " failed\n ! ssl_renegotiate returned %d\n\n", ret ); goto exit; } } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); } #endif /* POLARSSL_SSL_RENEGOTIATION */ @@ -1189,7 +1198,7 @@ int main( int argc, char *argv[] ) * 6. Write the GET request */ send_request: - printf( " > Write to server:" ); + polarssl_printf( " > Write to server:" ); fflush( stdout ); len = snprintf( (char *) buf, sizeof(buf) - 1, GET_REQUEST, @@ -1224,19 +1233,19 @@ send_request: { if( ret != POLARSSL_ERR_NET_WANT_READ && ret != POLARSSL_ERR_NET_WANT_WRITE ) { - printf( " failed\n ! ssl_write returned -0x%x\n\n", -ret ); + polarssl_printf( " failed\n ! ssl_write returned -0x%x\n\n", -ret ); goto exit; } } } buf[written] = '\0'; - printf( " %d bytes written in %d fragments\n\n%s\n", written, frags, (char *) buf ); + polarssl_printf( " %d bytes written in %d fragments\n\n%s\n", written, frags, (char *) buf ); /* * 7. Read the HTTP response */ - printf( " < Read from server:" ); + polarssl_printf( " < Read from server:" ); fflush( stdout ); do @@ -1254,25 +1263,25 @@ send_request: switch( ret ) { case POLARSSL_ERR_SSL_PEER_CLOSE_NOTIFY: - printf( " connection was closed gracefully\n" ); + polarssl_printf( " connection was closed gracefully\n" ); ret = 0; goto close_notify; case 0: case POLARSSL_ERR_NET_CONN_RESET: - printf( " connection was reset by peer\n" ); + polarssl_printf( " connection was reset by peer\n" ); ret = 0; goto reconnect; default: - printf( " ssl_read returned -0x%x\n", -ret ); + polarssl_printf( " ssl_read returned -0x%x\n", -ret ); goto exit; } } len = ret; buf[len] = '\0'; - printf( " %d bytes read\n\n%s", len, (char *) buf ); + polarssl_printf( " %d bytes read\n\n%s", len, (char *) buf ); /* End of message should be detected according to the syntax of the * application protocol (eg HTTP), just use a dummy test here. */ @@ -1294,14 +1303,14 @@ send_request: * 8. Done, cleanly close the connection */ close_notify: - printf( " . Closing the connection..." ); + polarssl_printf( " . Closing the connection..." ); /* No error checking, the connection might be closed already */ do ret = ssl_close_notify( &ssl ); while( ret == POLARSSL_ERR_NET_WANT_WRITE ); ret = 0; - printf( " done\n" ); + polarssl_printf( " done\n" ); /* * 9. Reconnect? @@ -1318,25 +1327,25 @@ reconnect: m_sleep( 1000 * opt.reco_delay ); #endif - printf( " . Reconnecting with saved session..." ); + polarssl_printf( " . Reconnecting with saved session..." ); fflush( stdout ); if( ( ret = ssl_session_reset( &ssl ) ) != 0 ) { - printf( " failed\n ! ssl_session_reset returned -0x%x\n\n", -ret ); + polarssl_printf( " failed\n ! ssl_session_reset returned -0x%x\n\n", -ret ); goto exit; } if( ( ret = ssl_set_session( &ssl, &saved_session ) ) != 0 ) { - printf( " failed\n ! ssl_set_session returned %d\n\n", ret ); + polarssl_printf( " failed\n ! ssl_set_session returned %d\n\n", ret ); goto exit; } if( ( ret = net_connect( &server_fd, opt.server_addr, opt.server_port ) ) != 0 ) { - printf( " failed\n ! net_connect returned -0x%x\n\n", -ret ); + polarssl_printf( " failed\n ! net_connect returned -0x%x\n\n", -ret ); goto exit; } @@ -1345,12 +1354,12 @@ reconnect: if( ret != POLARSSL_ERR_NET_WANT_READ && ret != POLARSSL_ERR_NET_WANT_WRITE ) { - printf( " failed\n ! ssl_handshake returned -0x%x\n\n", -ret ); + polarssl_printf( " failed\n ! ssl_handshake returned -0x%x\n\n", -ret ); goto exit; } } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); goto send_request; } @@ -1364,7 +1373,7 @@ exit: { char error_buf[100]; polarssl_strerror( ret, error_buf, 100 ); - printf("Last error was: -0x%X - %s\n\n", -ret, error_buf ); + polarssl_printf("Last error was: -0x%X - %s\n\n", -ret, error_buf ); } #endif @@ -1382,7 +1391,7 @@ exit: entropy_free( &entropy ); #if defined(_WIN32) - printf( " + Press Enter to exit this program.\n" ); + polarssl_printf( " + Press Enter to exit this program.\n" ); fflush( stdout ); getchar(); #endif diff --git a/programs/ssl/ssl_fork_server.c b/programs/ssl/ssl_fork_server.c index cd11f1b9d..d1b4a6a6f 100644 --- a/programs/ssl/ssl_fork_server.c +++ b/programs/ssl/ssl_fork_server.c @@ -26,6 +26,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #if defined(_WIN32) #include #endif @@ -62,7 +71,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf("POLARSSL_BIGNUM_C and/or POLARSSL_CERTS_C and/or POLARSSL_ENTROPY_C " + polarssl_printf("POLARSSL_BIGNUM_C and/or POLARSSL_CERTS_C and/or POLARSSL_ENTROPY_C " "and/or POLARSSL_SSL_TLS_C and/or POLARSSL_SSL_SRV_C and/or " "POLARSSL_NET_C and/or POLARSSL_RSA_C and/or " "POLARSSL_CTR_DRBG_C and/or POLARSSL_X509_CRT_PARSE_C and/or " @@ -75,7 +84,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf("_WIN32 defined. This application requires fork() and signals " + polarssl_printf("_WIN32 defined. This application requires fork() and signals " "to work correctly.\n"); return( 0 ); } @@ -87,7 +96,7 @@ static void my_debug( void *ctx, int level, const char *str ) { if( level < DEBUG_LEVEL ) { - fprintf( (FILE *) ctx, "%s", str ); + polarssl_fprintf( (FILE *) ctx, "%s", str ); fflush( (FILE *) ctx ); } } @@ -120,23 +129,23 @@ int main( int argc, char *argv[] ) /* * 0. Initial seeding of the RNG */ - printf( "\n . Initial seeding of the random generator..." ); + polarssl_printf( "\n . Initial seeding of the random generator..." ); fflush( stdout ); if( ( ret = ctr_drbg_init( &ctr_drbg, entropy_func, &entropy, (const unsigned char *) pers, strlen( pers ) ) ) != 0 ) { - printf( " failed\n ! ctr_drbg_init returned %d\n", ret ); + polarssl_printf( " failed\n ! ctr_drbg_init returned %d\n", ret ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); /* * 1. Load the certificates and private RSA key */ - printf( " . Loading the server cert. and key..." ); + polarssl_printf( " . Loading the server cert. and key..." ); fflush( stdout ); /* @@ -148,7 +157,7 @@ int main( int argc, char *argv[] ) strlen( test_srv_crt ) ); if( ret != 0 ) { - printf( " failed\n ! x509_crt_parse returned %d\n\n", ret ); + polarssl_printf( " failed\n ! x509_crt_parse returned %d\n\n", ret ); goto exit; } @@ -156,7 +165,7 @@ int main( int argc, char *argv[] ) strlen( test_ca_list ) ); if( ret != 0 ) { - printf( " failed\n ! x509_crt_parse returned %d\n\n", ret ); + polarssl_printf( " failed\n ! x509_crt_parse returned %d\n\n", ret ); goto exit; } @@ -164,25 +173,25 @@ int main( int argc, char *argv[] ) strlen( test_srv_key ), NULL, 0 ); if( ret != 0 ) { - printf( " failed\n ! pk_parse_key returned %d\n\n", ret ); + polarssl_printf( " failed\n ! pk_parse_key returned %d\n\n", ret ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); /* * 2. Setup the listening TCP socket */ - printf( " . Bind on https://localhost:4433/ ..." ); + polarssl_printf( " . Bind on https://localhost:4433/ ..." ); fflush( stdout ); if( ( ret = net_bind( &listen_fd, NULL, 4433 ) ) != 0 ) { - printf( " failed\n ! net_bind returned %d\n\n", ret ); + polarssl_printf( " failed\n ! net_bind returned %d\n\n", ret ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); while( 1 ) { @@ -192,16 +201,16 @@ int main( int argc, char *argv[] ) client_fd = -1; memset( &ssl, 0, sizeof( ssl ) ); - printf( " . Waiting for a remote connection ..." ); + polarssl_printf( " . Waiting for a remote connection ..." ); fflush( stdout ); if( ( ret = net_accept( listen_fd, &client_fd, NULL ) ) != 0 ) { - printf( " failed\n ! net_accept returned %d\n\n", ret ); + polarssl_printf( " failed\n ! net_accept returned %d\n\n", ret ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); /* * 3.5. Forking server thread @@ -209,16 +218,16 @@ int main( int argc, char *argv[] ) pid = fork(); - printf( " . Forking to handle connection ..." ); + polarssl_printf( " . Forking to handle connection ..." ); fflush( stdout ); if( pid < 0 ) { - printf(" failed\n ! fork returned %d\n\n", pid ); + polarssl_printf(" failed\n ! fork returned %d\n\n", pid ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); if( pid != 0 ) { @@ -226,7 +235,7 @@ int main( int argc, char *argv[] ) (const unsigned char *) "parent", 6 ) ) != 0 ) { - printf( " failed\n ! ctr_drbg_reseed returned %d\n", ret ); + polarssl_printf( " failed\n ! ctr_drbg_reseed returned %d\n", ret ); goto exit; } @@ -239,24 +248,24 @@ int main( int argc, char *argv[] ) /* * 4. Setup stuff */ - printf( " . Setting up the SSL data...." ); + polarssl_printf( " . Setting up the SSL data...." ); fflush( stdout ); if( ( ret = ctr_drbg_reseed( &ctr_drbg, (const unsigned char *) "child", 5 ) ) != 0 ) { - printf( " failed\n ! ctr_drbg_reseed returned %d\n", ret ); + polarssl_printf( " failed\n ! ctr_drbg_reseed returned %d\n", ret ); goto exit; } if( ( ret = ssl_init( &ssl ) ) != 0 ) { - printf( " failed\n ! ssl_init returned %d\n\n", ret ); + polarssl_printf( " failed\n ! ssl_init returned %d\n\n", ret ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); ssl_set_endpoint( &ssl, SSL_IS_SERVER ); ssl_set_authmode( &ssl, SSL_VERIFY_NONE ); @@ -275,31 +284,31 @@ int main( int argc, char *argv[] ) ssl_set_ca_chain( &ssl, srvcert.next, NULL, NULL ); if( ( ret = ssl_set_own_cert( &ssl, &srvcert, &pkey ) ) != 0 ) { - printf( " failed\n ! ssl_set_own_cert returned %d\n\n", ret ); + polarssl_printf( " failed\n ! ssl_set_own_cert returned %d\n\n", ret ); goto exit; } /* * 5. Handshake */ - printf( " . Performing the SSL/TLS handshake..." ); + polarssl_printf( " . Performing the SSL/TLS handshake..." ); fflush( stdout ); while( ( ret = ssl_handshake( &ssl ) ) != 0 ) { if( ret != POLARSSL_ERR_NET_WANT_READ && ret != POLARSSL_ERR_NET_WANT_WRITE ) { - printf( " failed\n ! ssl_handshake returned %d\n\n", ret ); + polarssl_printf( " failed\n ! ssl_handshake returned %d\n\n", ret ); goto exit; } } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); /* * 6. Read the HTTP Request */ - printf( " < Read from client:" ); + polarssl_printf( " < Read from client:" ); fflush( stdout ); do @@ -316,15 +325,15 @@ int main( int argc, char *argv[] ) switch( ret ) { case POLARSSL_ERR_SSL_PEER_CLOSE_NOTIFY: - printf( " connection was closed gracefully\n" ); + polarssl_printf( " connection was closed gracefully\n" ); break; case POLARSSL_ERR_NET_CONN_RESET: - printf( " connection was reset by peer\n" ); + polarssl_printf( " connection was reset by peer\n" ); break; default: - printf( " ssl_read returned %d\n", ret ); + polarssl_printf( " ssl_read returned %d\n", ret ); break; } @@ -332,14 +341,14 @@ int main( int argc, char *argv[] ) } len = ret; - printf( " %d bytes read\n\n%s", len, (char *) buf ); + polarssl_printf( " %d bytes read\n\n%s", len, (char *) buf ); } while( 0 ); /* * 7. Write the 200 Response */ - printf( " > Write to client:" ); + polarssl_printf( " > Write to client:" ); fflush( stdout ); len = sprintf( (char *) buf, HTTP_RESPONSE, @@ -351,18 +360,18 @@ int main( int argc, char *argv[] ) { if( ret == POLARSSL_ERR_NET_CONN_RESET ) { - printf( " failed\n ! peer closed the connection\n\n" ); + polarssl_printf( " failed\n ! peer closed the connection\n\n" ); goto exit; } if( ret != POLARSSL_ERR_NET_WANT_READ && ret != POLARSSL_ERR_NET_WANT_WRITE ) { - printf( " failed\n ! ssl_write returned %d\n\n", ret ); + polarssl_printf( " failed\n ! ssl_write returned %d\n\n", ret ); goto exit; } } len = ret; - printf( " %d bytes written\n\n%s\n", len, (char *) buf ); + polarssl_printf( " %d bytes written\n\n%s\n", len, (char *) buf ); m_sleep( 1000 ); } @@ -383,7 +392,7 @@ exit: entropy_free( &entropy ); #if defined(_WIN32) - printf( " Press Enter to exit this program.\n" ); + polarssl_printf( " Press Enter to exit this program.\n" ); fflush( stdout ); getchar(); #endif diff --git a/programs/ssl/ssl_mail_client.c b/programs/ssl/ssl_mail_client.c index 03d66a65a..00d12ca96 100644 --- a/programs/ssl/ssl_mail_client.c +++ b/programs/ssl/ssl_mail_client.c @@ -26,6 +26,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #include #include #include @@ -70,7 +79,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf("POLARSSL_BIGNUM_C and/or POLARSSL_ENTROPY_C and/or " + polarssl_printf("POLARSSL_BIGNUM_C and/or POLARSSL_ENTROPY_C and/or " "POLARSSL_SSL_TLS_C and/or POLARSSL_SSL_CLI_C and/or " "POLARSSL_NET_C and/or POLARSSL_RSA_C and/or " "POLARSSL_CTR_DRBG_C and/or POLARSSL_X509_CRT_PARSE_C " @@ -120,7 +129,7 @@ static void my_debug( void *ctx, int level, const char *str ) { if( level < opt.debug_level ) { - fprintf( (FILE *) ctx, "%s", str ); + polarssl_fprintf( (FILE *) ctx, "%s", str ); fflush( (FILE *) ctx ); } } @@ -134,7 +143,7 @@ static int do_handshake( ssl_context *ssl, struct options *opt ) /* * 4. Handshake */ - printf( " . Performing the SSL/TLS handshake..." ); + polarssl_printf( " . Performing the SSL/TLS handshake..." ); fflush( stdout ); while( ( ret = ssl_handshake( ssl ) ) != 0 ) @@ -144,45 +153,45 @@ static int do_handshake( ssl_context *ssl, struct options *opt ) #if defined(POLARSSL_ERROR_C) polarssl_strerror( ret, (char *) buf, 1024 ); #endif - printf( " failed\n ! ssl_handshake returned %d: %s\n\n", ret, buf ); + polarssl_printf( " failed\n ! ssl_handshake returned %d: %s\n\n", ret, buf ); return( -1 ); } } - printf( " ok\n [ Ciphersuite is %s ]\n", + polarssl_printf( " ok\n [ Ciphersuite is %s ]\n", ssl_get_ciphersuite( ssl ) ); /* * 5. Verify the server certificate */ - printf( " . Verifying peer X.509 certificate..." ); + polarssl_printf( " . Verifying peer X.509 certificate..." ); /* In real life, we may want to bail out when ret != 0 */ if( ( ret = ssl_get_verify_result( ssl ) ) != 0 ) { - printf( " failed\n" ); + polarssl_printf( " failed\n" ); if( ( ret & BADCERT_EXPIRED ) != 0 ) - printf( " ! server certificate has expired\n" ); + polarssl_printf( " ! server certificate has expired\n" ); if( ( ret & BADCERT_REVOKED ) != 0 ) - printf( " ! server certificate has been revoked\n" ); + polarssl_printf( " ! server certificate has been revoked\n" ); if( ( ret & BADCERT_CN_MISMATCH ) != 0 ) - printf( " ! CN mismatch (expected CN=%s)\n", opt->server_name ); + polarssl_printf( " ! CN mismatch (expected CN=%s)\n", opt->server_name ); if( ( ret & BADCERT_NOT_TRUSTED ) != 0 ) - printf( " ! self-signed or not signed by a trusted CA\n" ); + polarssl_printf( " ! self-signed or not signed by a trusted CA\n" ); - printf( "\n" ); + polarssl_printf( "\n" ); } else - printf( " ok\n" ); + polarssl_printf( " ok\n" ); - printf( " . Peer certificate information ...\n" ); + polarssl_printf( " . Peer certificate information ...\n" ); x509_crt_info( (char *) buf, sizeof( buf ) - 1, " ", ssl_get_peer_cert( ssl ) ); - printf( "%s\n", buf ); + polarssl_printf( "%s\n", buf ); return( 0 ); } @@ -191,12 +200,12 @@ static int write_ssl_data( ssl_context *ssl, unsigned char *buf, size_t len ) { int ret; - printf("\n%s", buf); + polarssl_printf("\n%s", buf); while( len && ( ret = ssl_write( ssl, buf, len ) ) <= 0 ) { if( ret != POLARSSL_ERR_NET_WANT_READ && ret != POLARSSL_ERR_NET_WANT_WRITE ) { - printf( " failed\n ! ssl_write returned %d\n\n", ret ); + polarssl_printf( " failed\n ! ssl_write returned %d\n\n", ret ); return -1; } } @@ -211,12 +220,12 @@ static int write_ssl_and_get_response( ssl_context *ssl, unsigned char *buf, siz char code[4]; size_t i, idx = 0; - printf("\n%s", buf); + polarssl_printf("\n%s", buf); while( len && ( ret = ssl_write( ssl, buf, len ) ) <= 0 ) { if( ret != POLARSSL_ERR_NET_WANT_READ && ret != POLARSSL_ERR_NET_WANT_WRITE ) { - printf( " failed\n ! ssl_write returned %d\n\n", ret ); + polarssl_printf( " failed\n ! ssl_write returned %d\n\n", ret ); return -1; } } @@ -235,11 +244,11 @@ static int write_ssl_and_get_response( ssl_context *ssl, unsigned char *buf, siz if( ret <= 0 ) { - printf( "failed\n ! ssl_read returned %d\n\n", ret ); + polarssl_printf( "failed\n ! ssl_read returned %d\n\n", ret ); return -1; } - printf("\n%s", data); + polarssl_printf("\n%s", data); len = ret; for( i = 0; i < len; i++ ) { @@ -269,10 +278,10 @@ static int write_and_get_response( int sock_fd, unsigned char *buf, size_t len ) char code[4]; size_t i, idx = 0; - printf("\n%s", buf); + polarssl_printf("\n%s", buf); if( len && ( ret = write( sock_fd, buf, len ) ) <= 0 ) { - printf( " failed\n ! ssl_write returned %d\n\n", ret ); + polarssl_printf( " failed\n ! ssl_write returned %d\n\n", ret ); return -1; } @@ -284,12 +293,12 @@ static int write_and_get_response( int sock_fd, unsigned char *buf, size_t len ) if( ret <= 0 ) { - printf( "failed\n ! read returned %d\n\n", ret ); + polarssl_printf( "failed\n ! read returned %d\n\n", ret ); return -1; } data[len] = '\0'; - printf("\n%s", data); + polarssl_printf("\n%s", data); len = ret; for( i = 0; i < len; i++ ) { @@ -380,15 +389,15 @@ int main( int argc, char *argv[] ) if( argc == 0 ) { usage: - printf( USAGE ); + polarssl_printf( USAGE ); list = ssl_list_ciphersuites(); while( *list ) { - printf(" %s\n", ssl_get_ciphersuite_name( *list ) ); + polarssl_printf(" %s\n", ssl_get_ciphersuite_name( *list ) ); list++; } - printf("\n"); + polarssl_printf("\n"); goto exit; } @@ -471,7 +480,7 @@ int main( int argc, char *argv[] ) /* * 0. Initialize the RNG and the session data */ - printf( "\n . Seeding the random number generator..." ); + polarssl_printf( "\n . Seeding the random number generator..." ); fflush( stdout ); entropy_init( &entropy ); @@ -479,16 +488,16 @@ int main( int argc, char *argv[] ) (const unsigned char *) pers, strlen( pers ) ) ) != 0 ) { - printf( " failed\n ! ctr_drbg_init returned %d\n", ret ); + polarssl_printf( " failed\n ! ctr_drbg_init returned %d\n", ret ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); /* * 1.1. Load the trusted CA */ - printf( " . Loading the CA root certificate ..." ); + polarssl_printf( " . Loading the CA root certificate ..." ); fflush( stdout ); #if defined(POLARSSL_FS_IO) @@ -502,23 +511,23 @@ int main( int argc, char *argv[] ) #else { ret = 1; - printf("POLARSSL_CERTS_C not defined."); + polarssl_printf("POLARSSL_CERTS_C not defined."); } #endif if( ret < 0 ) { - printf( " failed\n ! x509_crt_parse returned %d\n\n", ret ); + polarssl_printf( " failed\n ! x509_crt_parse returned %d\n\n", ret ); goto exit; } - printf( " ok (%d skipped)\n", ret ); + polarssl_printf( " ok (%d skipped)\n", ret ); /* * 1.2. Load own certificate and private key * * (can be skipped if client authentication is not required) */ - printf( " . Loading the client cert. and key..." ); + polarssl_printf( " . Loading the client cert. and key..." ); fflush( stdout ); #if defined(POLARSSL_FS_IO) @@ -532,12 +541,12 @@ int main( int argc, char *argv[] ) #else { ret = -1; - printf("POLARSSL_CERTS_C not defined."); + polarssl_printf("POLARSSL_CERTS_C not defined."); } #endif if( ret != 0 ) { - printf( " failed\n ! x509_crt_parse returned %d\n\n", ret ); + polarssl_printf( " failed\n ! x509_crt_parse returned %d\n\n", ret ); goto exit; } @@ -552,46 +561,46 @@ int main( int argc, char *argv[] ) #else { ret = -1; - printf("POLARSSL_CERTS_C not defined."); + polarssl_printf("POLARSSL_CERTS_C not defined."); } #endif if( ret != 0 ) { - printf( " failed\n ! pk_parse_key returned %d\n\n", ret ); + polarssl_printf( " failed\n ! pk_parse_key returned %d\n\n", ret ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); /* * 2. Start the connection */ - printf( " . Connecting to tcp/%s/%-4d...", opt.server_name, + polarssl_printf( " . Connecting to tcp/%s/%-4d...", opt.server_name, opt.server_port ); fflush( stdout ); if( ( ret = net_connect( &server_fd, opt.server_name, opt.server_port ) ) != 0 ) { - printf( " failed\n ! net_connect returned %d\n\n", ret ); + polarssl_printf( " failed\n ! net_connect returned %d\n\n", ret ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); /* * 3. Setup stuff */ - printf( " . Setting up the SSL/TLS structure..." ); + polarssl_printf( " . Setting up the SSL/TLS structure..." ); fflush( stdout ); if( ( ret = ssl_init( &ssl ) ) != 0 ) { - printf( " failed\n ! ssl_init returned %d\n\n", ret ); + polarssl_printf( " failed\n ! ssl_init returned %d\n\n", ret ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); ssl_set_endpoint( &ssl, SSL_IS_CLIENT ); /* OPTIONAL is not optimal for security, @@ -614,14 +623,14 @@ int main( int argc, char *argv[] ) ssl_set_ca_chain( &ssl, &cacert, NULL, opt.server_name ); if( ( ret = ssl_set_own_cert( &ssl, &clicert, &pkey ) ) != 0 ) { - printf( " failed\n ! ssl_set_own_cert returned %d\n\n", ret ); + polarssl_printf( " failed\n ! ssl_set_own_cert returned %d\n\n", ret ); goto exit; } #if defined(POLARSSL_SSL_SERVER_NAME_INDICATION) if( ( ret = ssl_set_hostname( &ssl, opt.server_name ) ) != 0 ) { - printf( " failed\n ! ssl_set_hostname returned %d\n\n", ret ); + polarssl_printf( " failed\n ! ssl_set_hostname returned %d\n\n", ret ); goto exit; } #endif @@ -631,19 +640,19 @@ int main( int argc, char *argv[] ) if( do_handshake( &ssl, &opt ) != 0 ) goto exit; - printf( " > Get header from server:" ); + polarssl_printf( " > Get header from server:" ); fflush( stdout ); ret = write_ssl_and_get_response( &ssl, buf, 0 ); if( ret < 200 || ret > 299 ) { - printf( " failed\n ! server responded with %d\n\n", ret ); + polarssl_printf( " failed\n ! server responded with %d\n\n", ret ); goto exit; } - printf(" ok\n" ); + polarssl_printf(" ok\n" ); - printf( " > Write EHLO to server:" ); + polarssl_printf( " > Write EHLO to server:" ); fflush( stdout ); gethostname( hostname, 32 ); @@ -651,25 +660,25 @@ int main( int argc, char *argv[] ) ret = write_ssl_and_get_response( &ssl, buf, len ); if( ret < 200 || ret > 299 ) { - printf( " failed\n ! server responded with %d\n\n", ret ); + polarssl_printf( " failed\n ! server responded with %d\n\n", ret ); goto exit; } } else { - printf( " > Get header from server:" ); + polarssl_printf( " > Get header from server:" ); fflush( stdout ); ret = write_and_get_response( server_fd, buf, 0 ); if( ret < 200 || ret > 299 ) { - printf( " failed\n ! server responded with %d\n\n", ret ); + polarssl_printf( " failed\n ! server responded with %d\n\n", ret ); goto exit; } - printf(" ok\n" ); + polarssl_printf(" ok\n" ); - printf( " > Write EHLO to server:" ); + polarssl_printf( " > Write EHLO to server:" ); fflush( stdout ); gethostname( hostname, 32 ); @@ -677,13 +686,13 @@ int main( int argc, char *argv[] ) ret = write_and_get_response( server_fd, buf, len ); if( ret < 200 || ret > 299 ) { - printf( " failed\n ! server responded with %d\n\n", ret ); + polarssl_printf( " failed\n ! server responded with %d\n\n", ret ); goto exit; } - printf(" ok\n" ); + polarssl_printf(" ok\n" ); - printf( " > Write STARTTLS to server:" ); + polarssl_printf( " > Write STARTTLS to server:" ); fflush( stdout ); gethostname( hostname, 32 ); @@ -691,11 +700,11 @@ int main( int argc, char *argv[] ) ret = write_and_get_response( server_fd, buf, len ); if( ret < 200 || ret > 299 ) { - printf( " failed\n ! server responded with %d\n\n", ret ); + polarssl_printf( " failed\n ! server responded with %d\n\n", ret ); goto exit; } - printf(" ok\n" ); + polarssl_printf(" ok\n" ); if( do_handshake( &ssl, &opt ) != 0 ) goto exit; @@ -704,20 +713,20 @@ int main( int argc, char *argv[] ) #if defined(POLARSSL_BASE64_C) if( opt.authentication ) { - printf( " > Write AUTH LOGIN to server:" ); + polarssl_printf( " > Write AUTH LOGIN to server:" ); fflush( stdout ); len = sprintf( (char *) buf, "AUTH LOGIN\r\n" ); ret = write_ssl_and_get_response( &ssl, buf, len ); if( ret < 200 || ret > 399 ) { - printf( " failed\n ! server responded with %d\n\n", ret ); + polarssl_printf( " failed\n ! server responded with %d\n\n", ret ); goto exit; } - printf(" ok\n" ); + polarssl_printf(" ok\n" ); - printf( " > Write username to server: %s", opt.user_name ); + polarssl_printf( " > Write username to server: %s", opt.user_name ); fflush( stdout ); n = sizeof( buf ); @@ -725,81 +734,81 @@ int main( int argc, char *argv[] ) strlen( opt.user_name ) ); if( ret != 0 ) { - printf( " failed\n ! base64_encode returned %d\n\n", ret ); + polarssl_printf( " failed\n ! base64_encode returned %d\n\n", ret ); goto exit; } len = sprintf( (char *) buf, "%s\r\n", base ); ret = write_ssl_and_get_response( &ssl, buf, len ); if( ret < 300 || ret > 399 ) { - printf( " failed\n ! server responded with %d\n\n", ret ); + polarssl_printf( " failed\n ! server responded with %d\n\n", ret ); goto exit; } - printf(" ok\n" ); + polarssl_printf(" ok\n" ); - printf( " > Write password to server: %s", opt.user_pwd ); + polarssl_printf( " > Write password to server: %s", opt.user_pwd ); fflush( stdout ); ret = base64_encode( base, &n, (const unsigned char *) opt.user_pwd, strlen( opt.user_pwd ) ); if( ret != 0 ) { - printf( " failed\n ! base64_encode returned %d\n\n", ret ); + polarssl_printf( " failed\n ! base64_encode returned %d\n\n", ret ); goto exit; } len = sprintf( (char *) buf, "%s\r\n", base ); ret = write_ssl_and_get_response( &ssl, buf, len ); if( ret < 200 || ret > 399 ) { - printf( " failed\n ! server responded with %d\n\n", ret ); + polarssl_printf( " failed\n ! server responded with %d\n\n", ret ); goto exit; } - printf(" ok\n" ); + polarssl_printf(" ok\n" ); } #endif - printf( " > Write MAIL FROM to server:" ); + polarssl_printf( " > Write MAIL FROM to server:" ); fflush( stdout ); len = sprintf( (char *) buf, "MAIL FROM:<%s>\r\n", opt.mail_from ); ret = write_ssl_and_get_response( &ssl, buf, len ); if( ret < 200 || ret > 299 ) { - printf( " failed\n ! server responded with %d\n\n", ret ); + polarssl_printf( " failed\n ! server responded with %d\n\n", ret ); goto exit; } - printf(" ok\n" ); + polarssl_printf(" ok\n" ); - printf( " > Write RCPT TO to server:" ); + polarssl_printf( " > Write RCPT TO to server:" ); fflush( stdout ); len = sprintf( (char *) buf, "RCPT TO:<%s>\r\n", opt.mail_to ); ret = write_ssl_and_get_response( &ssl, buf, len ); if( ret < 200 || ret > 299 ) { - printf( " failed\n ! server responded with %d\n\n", ret ); + polarssl_printf( " failed\n ! server responded with %d\n\n", ret ); goto exit; } - printf(" ok\n" ); + polarssl_printf(" ok\n" ); - printf( " > Write DATA to server:" ); + polarssl_printf( " > Write DATA to server:" ); fflush( stdout ); len = sprintf( (char *) buf, "DATA\r\n" ); ret = write_ssl_and_get_response( &ssl, buf, len ); if( ret < 300 || ret > 399 ) { - printf( " failed\n ! server responded with %d\n\n", ret ); + polarssl_printf( " failed\n ! server responded with %d\n\n", ret ); goto exit; } - printf(" ok\n" ); + polarssl_printf(" ok\n" ); - printf( " > Write content to server:" ); + polarssl_printf( " > Write content to server:" ); fflush( stdout ); len = sprintf( (char *) buf, "From: %s\r\nSubject: mbed TLS Test mail\r\n\r\n" @@ -813,11 +822,11 @@ int main( int argc, char *argv[] ) ret = write_ssl_and_get_response( &ssl, buf, len ); if( ret < 200 || ret > 299 ) { - printf( " failed\n ! server responded with %d\n\n", ret ); + polarssl_printf( " failed\n ! server responded with %d\n\n", ret ); goto exit; } - printf(" ok\n" ); + polarssl_printf(" ok\n" ); ssl_close_notify( &ssl ); @@ -833,7 +842,7 @@ exit: entropy_free( &entropy ); #if defined(_WIN32) - printf( " + Press Enter to exit this program.\n" ); + polarssl_printf( " + Press Enter to exit this program.\n" ); fflush( stdout ); getchar(); #endif diff --git a/programs/ssl/ssl_pthread_server.c b/programs/ssl/ssl_pthread_server.c index 96e872a60..9e59e7ce5 100644 --- a/programs/ssl/ssl_pthread_server.c +++ b/programs/ssl/ssl_pthread_server.c @@ -27,6 +27,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #if defined(_WIN32) #include #endif @@ -62,7 +71,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf("POLARSSL_BIGNUM_C and/or POLARSSL_CERTS_C and/or POLARSSL_ENTROPY_C " + polarssl_printf("POLARSSL_BIGNUM_C and/or POLARSSL_CERTS_C and/or POLARSSL_ENTROPY_C " "and/or POLARSSL_SSL_TLS_C and/or POLARSSL_SSL_SRV_C and/or " "POLARSSL_NET_C and/or POLARSSL_RSA_C and/or " "POLARSSL_CTR_DRBG_C and/or POLARSSL_X509_CRT_PARSE_C and/or " @@ -86,7 +95,7 @@ static void my_mutexed_debug( void *ctx, int level, const char *str ) polarssl_mutex_lock( &debug_mutex ); if( level < DEBUG_LEVEL ) { - fprintf( (FILE *) ctx, "%s", str ); + polarssl_fprintf( (FILE *) ctx, "%s", str ); fflush( (FILE *) ctx ); } polarssl_mutex_unlock( &debug_mutex ); @@ -131,8 +140,8 @@ static void *handle_ssl_connection( void *data ) memset( &ctr_drbg, 0, sizeof( ctr_drbg_context ) ); snprintf( pers, sizeof(pers), "SSL Pthread Thread %d", thread_id ); - printf( " [ #%d ] Client FD %d\n", thread_id, client_fd ); - printf( " [ #%d ] Seeding the random number generator...\n", thread_id ); + polarssl_printf( " [ #%d ] Client FD %d\n", thread_id, client_fd ); + polarssl_printf( " [ #%d ] Seeding the random number generator...\n", thread_id ); /* entropy_func() is thread-safe if POLARSSL_THREADING_C is set */ @@ -140,21 +149,21 @@ static void *handle_ssl_connection( void *data ) (const unsigned char *) pers, strlen( pers ) ) ) != 0 ) { - printf( " [ #%d ] failed: ctr_drbg_init returned -0x%04x\n", + polarssl_printf( " [ #%d ] failed: ctr_drbg_init returned -0x%04x\n", thread_id, -ret ); goto thread_exit; } - printf( " [ #%d ] ok\n", thread_id ); + polarssl_printf( " [ #%d ] ok\n", thread_id ); /* * 4. Setup stuff */ - printf( " [ #%d ] Setting up the SSL data....\n", thread_id ); + polarssl_printf( " [ #%d ] Setting up the SSL data....\n", thread_id ); if( ( ret = ssl_init( &ssl ) ) != 0 ) { - printf( " [ #%d ] failed: ssl_init returned -0x%04x\n", + polarssl_printf( " [ #%d ] failed: ssl_init returned -0x%04x\n", thread_id, -ret ); goto thread_exit; } @@ -181,38 +190,38 @@ static void *handle_ssl_connection( void *data ) ssl_set_ca_chain( &ssl, thread_info->ca_chain, NULL, NULL ); if( ( ret = ssl_set_own_cert( &ssl, thread_info->server_cert, thread_info->server_key ) ) != 0 ) { - printf( " failed\n ! ssl_set_own_cert returned %d\n\n", ret ); + polarssl_printf( " failed\n ! ssl_set_own_cert returned %d\n\n", ret ); goto thread_exit; } - printf( " [ #%d ] ok\n", thread_id ); + polarssl_printf( " [ #%d ] ok\n", thread_id ); ssl_set_bio( &ssl, net_recv, &client_fd, net_send, &client_fd ); - printf( " [ #%d ] ok\n", thread_id ); + polarssl_printf( " [ #%d ] ok\n", thread_id ); /* * 5. Handshake */ - printf( " [ #%d ] Performing the SSL/TLS handshake\n", thread_id ); + polarssl_printf( " [ #%d ] Performing the SSL/TLS handshake\n", thread_id ); while( ( ret = ssl_handshake( &ssl ) ) != 0 ) { if( ret != POLARSSL_ERR_NET_WANT_READ && ret != POLARSSL_ERR_NET_WANT_WRITE ) { - printf( " [ #%d ] failed: ssl_handshake returned -0x%04x\n", + polarssl_printf( " [ #%d ] failed: ssl_handshake returned -0x%04x\n", thread_id, -ret ); goto thread_exit; } } - printf( " [ #%d ] ok\n", thread_id ); + polarssl_printf( " [ #%d ] ok\n", thread_id ); /* * 6. Read the HTTP Request */ - printf( " [ #%d ] < Read from client\n", thread_id ); + polarssl_printf( " [ #%d ] < Read from client\n", thread_id ); do { @@ -228,24 +237,24 @@ static void *handle_ssl_connection( void *data ) switch( ret ) { case POLARSSL_ERR_SSL_PEER_CLOSE_NOTIFY: - printf( " [ #%d ] connection was closed gracefully\n", + polarssl_printf( " [ #%d ] connection was closed gracefully\n", thread_id ); goto thread_exit; case POLARSSL_ERR_NET_CONN_RESET: - printf( " [ #%d ] connection was reset by peer\n", + polarssl_printf( " [ #%d ] connection was reset by peer\n", thread_id ); goto thread_exit; default: - printf( " [ #%d ] ssl_read returned -0x%04x\n", + polarssl_printf( " [ #%d ] ssl_read returned -0x%04x\n", thread_id, -ret ); goto thread_exit; } } len = ret; - printf( " [ #%d ] %d bytes read\n=====\n%s\n=====\n", + polarssl_printf( " [ #%d ] %d bytes read\n=====\n%s\n=====\n", thread_id, len, (char *) buf ); if( ret > 0 ) @@ -256,7 +265,7 @@ static void *handle_ssl_connection( void *data ) /* * 7. Write the 200 Response */ - printf( " [ #%d ] > Write to client:\n", thread_id ); + polarssl_printf( " [ #%d ] > Write to client:\n", thread_id ); len = sprintf( (char *) buf, HTTP_RESPONSE, ssl_get_ciphersuite( &ssl ) ); @@ -265,37 +274,37 @@ static void *handle_ssl_connection( void *data ) { if( ret == POLARSSL_ERR_NET_CONN_RESET ) { - printf( " [ #%d ] failed: peer closed the connection\n", + polarssl_printf( " [ #%d ] failed: peer closed the connection\n", thread_id ); goto thread_exit; } if( ret != POLARSSL_ERR_NET_WANT_READ && ret != POLARSSL_ERR_NET_WANT_WRITE ) { - printf( " [ #%d ] failed: ssl_write returned -0x%04x\n", + polarssl_printf( " [ #%d ] failed: ssl_write returned -0x%04x\n", thread_id, ret ); goto thread_exit; } } len = ret; - printf( " [ #%d ] %d bytes written\n=====\n%s\n=====\n", + polarssl_printf( " [ #%d ] %d bytes written\n=====\n%s\n=====\n", thread_id, len, (char *) buf ); - printf( " [ #%d ] . Closing the connection...", thread_id ); + polarssl_printf( " [ #%d ] . Closing the connection...", thread_id ); while( ( ret = ssl_close_notify( &ssl ) ) < 0 ) { if( ret != POLARSSL_ERR_NET_WANT_READ && ret != POLARSSL_ERR_NET_WANT_WRITE ) { - printf( " [ #%d ] failed: ssl_close_notify returned -0x%04x\n", + polarssl_printf( " [ #%d ] failed: ssl_close_notify returned -0x%04x\n", thread_id, ret ); goto thread_exit; } } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); ret = 0; @@ -306,7 +315,7 @@ thread_exit: { char error_buf[100]; polarssl_strerror( ret, error_buf, 100 ); - printf(" [ #%d ] Last error was: -0x%04x - %s\n\n", + polarssl_printf(" [ #%d ] Last error was: -0x%04x - %s\n\n", thread_id, -ret, error_buf ); } #endif @@ -334,7 +343,7 @@ static int thread_create( int client_fd ) if( threads[i].data.thread_complete == 1 ) { - printf( " [ main ] Cleaning up thread %d\n", i ); + polarssl_printf( " [ main ] Cleaning up thread %d\n", i ); pthread_join(threads[i].thread, NULL ); memset( &threads[i], 0, sizeof(pthread_info_t) ); break; @@ -400,7 +409,7 @@ int main( int argc, char *argv[] ) /* * 1. Load the certificates and private RSA key */ - printf( "\n . Loading the server cert. and key..." ); + polarssl_printf( "\n . Loading the server cert. and key..." ); fflush( stdout ); x509_crt_init( &srvcert ); @@ -414,7 +423,7 @@ int main( int argc, char *argv[] ) strlen( test_srv_crt ) ); if( ret != 0 ) { - printf( " failed\n ! x509_crt_parse returned %d\n\n", ret ); + polarssl_printf( " failed\n ! x509_crt_parse returned %d\n\n", ret ); goto exit; } @@ -422,7 +431,7 @@ int main( int argc, char *argv[] ) strlen( test_ca_list ) ); if( ret != 0 ) { - printf( " failed\n ! x509_crt_parse returned %d\n\n", ret ); + polarssl_printf( " failed\n ! x509_crt_parse returned %d\n\n", ret ); goto exit; } @@ -431,7 +440,7 @@ int main( int argc, char *argv[] ) strlen( test_srv_key ), NULL, 0 ); if( ret != 0 ) { - printf( " failed\n ! pk_parse_key returned %d\n\n", ret ); + polarssl_printf( " failed\n ! pk_parse_key returned %d\n\n", ret ); goto exit; } @@ -439,21 +448,21 @@ int main( int argc, char *argv[] ) base_info.server_cert = &srvcert; base_info.server_key = &pkey; - printf( " ok\n" ); + polarssl_printf( " ok\n" ); /* * 2. Setup the listening TCP socket */ - printf( " . Bind on https://localhost:4433/ ..." ); + polarssl_printf( " . Bind on https://localhost:4433/ ..." ); fflush( stdout ); if( ( ret = net_bind( &listen_fd, NULL, 4433 ) ) != 0 ) { - printf( " failed\n ! net_bind returned %d\n\n", ret ); + polarssl_printf( " failed\n ! net_bind returned %d\n\n", ret ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); reset: #ifdef POLARSSL_ERROR_C @@ -461,7 +470,7 @@ reset: { char error_buf[100]; polarssl_strerror( ret, error_buf, 100 ); - printf( " [ main ] Last error was: -0x%04x - %s\n", -ret, error_buf ); + polarssl_printf( " [ main ] Last error was: -0x%04x - %s\n", -ret, error_buf ); } #endif @@ -470,20 +479,20 @@ reset: */ client_fd = -1; - printf( " [ main ] Waiting for a remote connection\n" ); + polarssl_printf( " [ main ] Waiting for a remote connection\n" ); if( ( ret = net_accept( listen_fd, &client_fd, NULL ) ) != 0 ) { - printf( " [ main ] failed: net_accept returned -0x%04x\n", ret ); + polarssl_printf( " [ main ] failed: net_accept returned -0x%04x\n", ret ); goto exit; } - printf( " [ main ] ok\n" ); - printf( " [ main ] Creating a new thread\n" ); + polarssl_printf( " [ main ] ok\n" ); + polarssl_printf( " [ main ] Creating a new thread\n" ); if( ( ret = thread_create( client_fd ) ) != 0 ) { - printf( " [ main ] failed: thread_create returned %d\n", ret ); + polarssl_printf( " [ main ] failed: thread_create returned %d\n", ret ); net_close( client_fd ); goto reset; } @@ -506,7 +515,7 @@ exit: #endif #if defined(_WIN32) - printf( " Press Enter to exit this program.\n" ); + polarssl_printf( " Press Enter to exit this program.\n" ); fflush( stdout ); getchar(); #endif diff --git a/programs/ssl/ssl_server.c b/programs/ssl/ssl_server.c index 5c37b1da1..7c6a25584 100644 --- a/programs/ssl/ssl_server.c +++ b/programs/ssl/ssl_server.c @@ -26,6 +26,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #if defined(_WIN32) #include #endif @@ -57,7 +66,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf("POLARSSL_BIGNUM_C and/or POLARSSL_CERTS_C and/or POLARSSL_ENTROPY_C " + polarssl_printf("POLARSSL_BIGNUM_C and/or POLARSSL_CERTS_C and/or POLARSSL_ENTROPY_C " "and/or POLARSSL_SSL_TLS_C and/or POLARSSL_SSL_SRV_C and/or " "POLARSSL_NET_C and/or POLARSSL_RSA_C and/or " "POLARSSL_CTR_DRBG_C and/or POLARSSL_X509_CRT_PARSE_C " @@ -77,7 +86,7 @@ static void my_debug( void *ctx, int level, const char *str ) { ((void) level); - fprintf( (FILE *) ctx, "%s", str ); + polarssl_fprintf( (FILE *) ctx, "%s", str ); fflush( (FILE *) ctx ); } @@ -116,7 +125,7 @@ int main( int argc, char *argv[] ) /* * 1. Load the certificates and private RSA key */ - printf( "\n . Loading the server cert. and key..." ); + polarssl_printf( "\n . Loading the server cert. and key..." ); fflush( stdout ); /* @@ -128,7 +137,7 @@ int main( int argc, char *argv[] ) strlen( test_srv_crt ) ); if( ret != 0 ) { - printf( " failed\n ! x509_crt_parse returned %d\n\n", ret ); + polarssl_printf( " failed\n ! x509_crt_parse returned %d\n\n", ret ); goto exit; } @@ -136,7 +145,7 @@ int main( int argc, char *argv[] ) strlen( test_ca_list ) ); if( ret != 0 ) { - printf( " failed\n ! x509_crt_parse returned %d\n\n", ret ); + polarssl_printf( " failed\n ! x509_crt_parse returned %d\n\n", ret ); goto exit; } @@ -144,51 +153,51 @@ int main( int argc, char *argv[] ) strlen( test_srv_key ), NULL, 0 ); if( ret != 0 ) { - printf( " failed\n ! pk_parse_key returned %d\n\n", ret ); + polarssl_printf( " failed\n ! pk_parse_key returned %d\n\n", ret ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); /* * 2. Setup the listening TCP socket */ - printf( " . Bind on https://localhost:4433/ ..." ); + polarssl_printf( " . Bind on https://localhost:4433/ ..." ); fflush( stdout ); if( ( ret = net_bind( &listen_fd, NULL, 4433 ) ) != 0 ) { - printf( " failed\n ! net_bind returned %d\n\n", ret ); + polarssl_printf( " failed\n ! net_bind returned %d\n\n", ret ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); /* * 3. Seed the RNG */ - printf( " . Seeding the random number generator..." ); + polarssl_printf( " . Seeding the random number generator..." ); fflush( stdout ); if( ( ret = ctr_drbg_init( &ctr_drbg, entropy_func, &entropy, (const unsigned char *) pers, strlen( pers ) ) ) != 0 ) { - printf( " failed\n ! ctr_drbg_init returned %d\n", ret ); + polarssl_printf( " failed\n ! ctr_drbg_init returned %d\n", ret ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); /* * 4. Setup stuff */ - printf( " . Setting up the SSL data...." ); + polarssl_printf( " . Setting up the SSL data...." ); fflush( stdout ); if( ( ret = ssl_init( &ssl ) ) != 0 ) { - printf( " failed\n ! ssl_init returned %d\n\n", ret ); + polarssl_printf( " failed\n ! ssl_init returned %d\n\n", ret ); goto exit; } @@ -211,11 +220,11 @@ int main( int argc, char *argv[] ) ssl_set_ca_chain( &ssl, srvcert.next, NULL, NULL ); if( ( ret = ssl_set_own_cert( &ssl, &srvcert, &pkey ) ) != 0 ) { - printf( " failed\n ! ssl_set_own_cert returned %d\n\n", ret ); + polarssl_printf( " failed\n ! ssl_set_own_cert returned %d\n\n", ret ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); reset: #ifdef POLARSSL_ERROR_C @@ -223,7 +232,7 @@ reset: { char error_buf[100]; polarssl_strerror( ret, error_buf, 100 ); - printf("Last error was: %d - %s\n\n", ret, error_buf ); + polarssl_printf("Last error was: %d - %s\n\n", ret, error_buf ); } #endif @@ -237,41 +246,41 @@ reset: */ client_fd = -1; - printf( " . Waiting for a remote connection ..." ); + polarssl_printf( " . Waiting for a remote connection ..." ); fflush( stdout ); if( ( ret = net_accept( listen_fd, &client_fd, NULL ) ) != 0 ) { - printf( " failed\n ! net_accept returned %d\n\n", ret ); + polarssl_printf( " failed\n ! net_accept returned %d\n\n", ret ); goto exit; } ssl_set_bio( &ssl, net_recv, &client_fd, net_send, &client_fd ); - printf( " ok\n" ); + polarssl_printf( " ok\n" ); /* * 5. Handshake */ - printf( " . Performing the SSL/TLS handshake..." ); + polarssl_printf( " . Performing the SSL/TLS handshake..." ); fflush( stdout ); while( ( ret = ssl_handshake( &ssl ) ) != 0 ) { if( ret != POLARSSL_ERR_NET_WANT_READ && ret != POLARSSL_ERR_NET_WANT_WRITE ) { - printf( " failed\n ! ssl_handshake returned %d\n\n", ret ); + polarssl_printf( " failed\n ! ssl_handshake returned %d\n\n", ret ); goto reset; } } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); /* * 6. Read the HTTP Request */ - printf( " < Read from client:" ); + polarssl_printf( " < Read from client:" ); fflush( stdout ); do @@ -288,15 +297,15 @@ reset: switch( ret ) { case POLARSSL_ERR_SSL_PEER_CLOSE_NOTIFY: - printf( " connection was closed gracefully\n" ); + polarssl_printf( " connection was closed gracefully\n" ); break; case POLARSSL_ERR_NET_CONN_RESET: - printf( " connection was reset by peer\n" ); + polarssl_printf( " connection was reset by peer\n" ); break; default: - printf( " ssl_read returned -0x%x\n", -ret ); + polarssl_printf( " ssl_read returned -0x%x\n", -ret ); break; } @@ -304,7 +313,7 @@ reset: } len = ret; - printf( " %d bytes read\n\n%s", len, (char *) buf ); + polarssl_printf( " %d bytes read\n\n%s", len, (char *) buf ); if( ret > 0 ) break; @@ -314,7 +323,7 @@ reset: /* * 7. Write the 200 Response */ - printf( " > Write to client:" ); + polarssl_printf( " > Write to client:" ); fflush( stdout ); len = sprintf( (char *) buf, HTTP_RESPONSE, @@ -324,33 +333,33 @@ reset: { if( ret == POLARSSL_ERR_NET_CONN_RESET ) { - printf( " failed\n ! peer closed the connection\n\n" ); + polarssl_printf( " failed\n ! peer closed the connection\n\n" ); goto reset; } if( ret != POLARSSL_ERR_NET_WANT_READ && ret != POLARSSL_ERR_NET_WANT_WRITE ) { - printf( " failed\n ! ssl_write returned %d\n\n", ret ); + polarssl_printf( " failed\n ! ssl_write returned %d\n\n", ret ); goto exit; } } len = ret; - printf( " %d bytes written\n\n%s\n", len, (char *) buf ); + polarssl_printf( " %d bytes written\n\n%s\n", len, (char *) buf ); - printf( " . Closing the connection..." ); + polarssl_printf( " . Closing the connection..." ); while( ( ret = ssl_close_notify( &ssl ) ) < 0 ) { if( ret != POLARSSL_ERR_NET_WANT_READ && ret != POLARSSL_ERR_NET_WANT_WRITE ) { - printf( " failed\n ! ssl_close_notify returned %d\n\n", ret ); + polarssl_printf( " failed\n ! ssl_close_notify returned %d\n\n", ret ); goto reset; } } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); ret = 0; goto reset; @@ -362,7 +371,7 @@ exit: { char error_buf[100]; polarssl_strerror( ret, error_buf, 100 ); - printf("Last error was: %d - %s\n\n", ret, error_buf ); + polarssl_printf("Last error was: %d - %s\n\n", ret, error_buf ); } #endif @@ -379,7 +388,7 @@ exit: entropy_free( &entropy ); #if defined(_WIN32) - printf( " Press Enter to exit this program.\n" ); + polarssl_printf( " Press Enter to exit this program.\n" ); fflush( stdout ); getchar(); #endif diff --git a/programs/ssl/ssl_server2.c b/programs/ssl/ssl_server2.c index 7e0af496d..15166d22b 100644 --- a/programs/ssl/ssl_server2.c +++ b/programs/ssl/ssl_server2.c @@ -26,6 +26,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #if !defined(POLARSSL_ENTROPY_C) || \ !defined(POLARSSL_SSL_TLS_C) || !defined(POLARSSL_SSL_SRV_C) || \ !defined(POLARSSL_NET_C) || !defined(POLARSSL_CTR_DRBG_C) @@ -35,7 +44,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf("POLARSSL_ENTROPY_C and/or " + polarssl_printf("POLARSSL_ENTROPY_C and/or " "POLARSSL_SSL_TLS_C and/or POLARSSL_SSL_SRV_C and/or " "POLARSSL_NET_C and/or POLARSSL_CTR_DRBG_C not defined.\n"); return( 0 ); @@ -46,13 +55,6 @@ int main( int argc, char *argv[] ) #define POLARSSL_SNI #endif -#if defined(POLARSSL_PLATFORM_C) -#include "polarssl/platform.h" -#else -#define polarssl_malloc malloc -#define polarssl_free free -#endif - #if defined(_WIN32) #include #endif @@ -189,7 +191,7 @@ static void my_debug( void *ctx, int level, const char *str ) { ((void) level); - fprintf( (FILE *) ctx, "%s", str ); + polarssl_fprintf( (FILE *) ctx, "%s", str ); fflush( (FILE *) ctx ); } @@ -710,19 +712,19 @@ int main( int argc, char *argv[] ) if( ret == 0 ) ret = 1; - printf( USAGE ); + polarssl_printf( USAGE ); list = ssl_list_ciphersuites(); while( *list ) { - printf(" %-42s", ssl_get_ciphersuite_name( *list ) ); + polarssl_printf(" %-42s", ssl_get_ciphersuite_name( *list ) ); list++; if( !*list ) break; - printf(" %s\n", ssl_get_ciphersuite_name( *list ) ); + polarssl_printf(" %s\n", ssl_get_ciphersuite_name( *list ) ); list++; } - printf("\n"); + polarssl_printf("\n"); goto exit; } @@ -1019,14 +1021,14 @@ int main( int argc, char *argv[] ) if( opt.max_version != -1 && ciphersuite_info->min_minor_ver > opt.max_version ) { - printf("forced ciphersuite not allowed with this protocol version\n"); + polarssl_printf("forced ciphersuite not allowed with this protocol version\n"); ret = 2; goto usage; } if( opt.min_version != -1 && ciphersuite_info->max_minor_ver < opt.min_version ) { - printf("forced ciphersuite not allowed with this protocol version\n"); + polarssl_printf("forced ciphersuite not allowed with this protocol version\n"); ret = 2; goto usage; } @@ -1056,7 +1058,7 @@ int main( int argc, char *argv[] ) if( i != 4 ) { - printf( "too few values for version_suites\n" ); + polarssl_printf( "too few values for version_suites\n" ); ret = 1; goto exit; } @@ -1070,7 +1072,7 @@ int main( int argc, char *argv[] ) if( version_suites[i][0] == 0 ) { - printf( "unknown ciphersuite: '%s'\n", name[i] ); + polarssl_printf( "unknown ciphersuite: '%s'\n", name[i] ); ret = 2; goto usage; } @@ -1083,7 +1085,7 @@ int main( int argc, char *argv[] ) */ if( unhexify( psk, opt.psk, &psk_len ) != 0 ) { - printf( "pre-shared key not valid hex\n" ); + polarssl_printf( "pre-shared key not valid hex\n" ); goto exit; } @@ -1091,7 +1093,7 @@ int main( int argc, char *argv[] ) { if( ( psk_info = psk_parse( opt.psk_list ) ) == NULL ) { - printf( "psk_list invalid" ); + polarssl_printf( "psk_list invalid" ); goto exit; } } @@ -1120,7 +1122,7 @@ int main( int argc, char *argv[] ) /* * 0. Initialize the RNG and the session data */ - printf( "\n . Seeding the random number generator..." ); + polarssl_printf( "\n . Seeding the random number generator..." ); fflush( stdout ); entropy_init( &entropy ); @@ -1128,17 +1130,17 @@ int main( int argc, char *argv[] ) (const unsigned char *) pers, strlen( pers ) ) ) != 0 ) { - printf( " failed\n ! ctr_drbg_init returned -0x%x\n", -ret ); + polarssl_printf( " failed\n ! ctr_drbg_init returned -0x%x\n", -ret ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); #if defined(POLARSSL_X509_CRT_PARSE_C) /* * 1.1. Load the trusted CA */ - printf( " . Loading the CA root certificate ..." ); + polarssl_printf( " . Loading the CA root certificate ..." ); fflush( stdout ); #if defined(POLARSSL_FS_IO) @@ -1160,21 +1162,21 @@ int main( int argc, char *argv[] ) #else { ret = 1; - printf("POLARSSL_CERTS_C not defined."); + polarssl_printf("POLARSSL_CERTS_C not defined."); } #endif if( ret < 0 ) { - printf( " failed\n ! x509_crt_parse returned -0x%x\n\n", -ret ); + polarssl_printf( " failed\n ! x509_crt_parse returned -0x%x\n\n", -ret ); goto exit; } - printf( " ok (%d skipped)\n", ret ); + polarssl_printf( " ok (%d skipped)\n", ret ); /* * 1.2. Load own certificate and private key */ - printf( " . Loading the server cert. and key..." ); + polarssl_printf( " . Loading the server cert. and key..." ); fflush( stdout ); #if defined(POLARSSL_FS_IO) @@ -1183,7 +1185,7 @@ int main( int argc, char *argv[] ) key_cert_init++; if( ( ret = x509_crt_parse_file( &srvcert, opt.crt_file ) ) != 0 ) { - printf( " failed\n ! x509_crt_parse_file returned -0x%x\n\n", + polarssl_printf( " failed\n ! x509_crt_parse_file returned -0x%x\n\n", -ret ); goto exit; } @@ -1193,13 +1195,13 @@ int main( int argc, char *argv[] ) key_cert_init++; if( ( ret = pk_parse_keyfile( &pkey, opt.key_file, "" ) ) != 0 ) { - printf( " failed\n ! pk_parse_keyfile returned -0x%x\n\n", -ret ); + polarssl_printf( " failed\n ! pk_parse_keyfile returned -0x%x\n\n", -ret ); goto exit; } } if( key_cert_init == 1 ) { - printf( " failed\n ! crt_file without key_file or vice-versa\n\n" ); + polarssl_printf( " failed\n ! crt_file without key_file or vice-versa\n\n" ); goto exit; } @@ -1208,7 +1210,7 @@ int main( int argc, char *argv[] ) key_cert_init2++; if( ( ret = x509_crt_parse_file( &srvcert2, opt.crt_file2 ) ) != 0 ) { - printf( " failed\n ! x509_crt_parse_file(2) returned -0x%x\n\n", + polarssl_printf( " failed\n ! x509_crt_parse_file(2) returned -0x%x\n\n", -ret ); goto exit; } @@ -1218,14 +1220,14 @@ int main( int argc, char *argv[] ) key_cert_init2++; if( ( ret = pk_parse_keyfile( &pkey2, opt.key_file2, "" ) ) != 0 ) { - printf( " failed\n ! pk_parse_keyfile(2) returned -0x%x\n\n", + polarssl_printf( " failed\n ! pk_parse_keyfile(2) returned -0x%x\n\n", -ret ); goto exit; } } if( key_cert_init2 == 1 ) { - printf( " failed\n ! crt_file2 without key_file2 or vice-versa\n\n" ); + polarssl_printf( " failed\n ! crt_file2 without key_file2 or vice-versa\n\n" ); goto exit; } #endif @@ -1237,7 +1239,7 @@ int main( int argc, char *argv[] ) strcmp( opt.key_file2, "none" ) != 0 ) { #if !defined(POLARSSL_CERTS_C) - printf( "Not certificated or key provided, and \n" + polarssl_printf( "Not certificated or key provided, and \n" "POLARSSL_CERTS_C not defined!\n" ); goto exit; #else @@ -1246,14 +1248,14 @@ int main( int argc, char *argv[] ) (const unsigned char *) test_srv_crt_rsa, strlen( test_srv_crt_rsa ) ) ) != 0 ) { - printf( " failed\n ! x509_crt_parse returned -0x%x\n\n", -ret ); + polarssl_printf( " failed\n ! x509_crt_parse returned -0x%x\n\n", -ret ); goto exit; } if( ( ret = pk_parse_key( &pkey, (const unsigned char *) test_srv_key_rsa, strlen( test_srv_key_rsa ), NULL, 0 ) ) != 0 ) { - printf( " failed\n ! pk_parse_key returned -0x%x\n\n", -ret ); + polarssl_printf( " failed\n ! pk_parse_key returned -0x%x\n\n", -ret ); goto exit; } key_cert_init = 2; @@ -1263,14 +1265,14 @@ int main( int argc, char *argv[] ) (const unsigned char *) test_srv_crt_ec, strlen( test_srv_crt_ec ) ) ) != 0 ) { - printf( " failed\n ! x509_crt_parse2 returned -0x%x\n\n", -ret ); + polarssl_printf( " failed\n ! x509_crt_parse2 returned -0x%x\n\n", -ret ); goto exit; } if( ( ret = pk_parse_key( &pkey2, (const unsigned char *) test_srv_key_ec, strlen( test_srv_key_ec ), NULL, 0 ) ) != 0 ) { - printf( " failed\n ! pk_parse_key2 returned -0x%x\n\n", -ret ); + polarssl_printf( " failed\n ! pk_parse_key2 returned -0x%x\n\n", -ret ); goto exit; } key_cert_init2 = 2; @@ -1278,66 +1280,66 @@ int main( int argc, char *argv[] ) #endif /* POLARSSL_CERTS_C */ } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); #endif /* POLARSSL_X509_CRT_PARSE_C */ #if defined(POLARSSL_DHM_C) && defined(POLARSSL_FS_IO) if( opt.dhm_file != NULL ) { - printf( " . Loading DHM parameters..." ); + polarssl_printf( " . Loading DHM parameters..." ); fflush( stdout ); if( ( ret = dhm_parse_dhmfile( &dhm, opt.dhm_file ) ) != 0 ) { - printf( " failed\n ! dhm_parse_dhmfile returned -0x%04X\n\n", + polarssl_printf( " failed\n ! dhm_parse_dhmfile returned -0x%04X\n\n", -ret ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); } #endif #if defined(POLARSSL_SNI) if( opt.sni != NULL ) { - printf( " . Setting up SNI information..." ); + polarssl_printf( " . Setting up SNI information..." ); fflush( stdout ); if( ( sni_info = sni_parse( opt.sni ) ) == NULL ) { - printf( " failed\n" ); + polarssl_printf( " failed\n" ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); } #endif /* POLARSSL_SNI */ /* * 2. Setup the listening TCP socket */ - printf( " . Bind on tcp://localhost:%-4d/ ...", opt.server_port ); + polarssl_printf( " . Bind on tcp://localhost:%-4d/ ...", opt.server_port ); fflush( stdout ); if( ( ret = net_bind( &listen_fd, opt.server_addr, opt.server_port ) ) != 0 ) { - printf( " failed\n ! net_bind returned -0x%x\n\n", -ret ); + polarssl_printf( " failed\n ! net_bind returned -0x%x\n\n", -ret ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); /* * 3. Setup stuff */ - printf( " . Setting up the SSL/TLS structure..." ); + polarssl_printf( " . Setting up the SSL/TLS structure..." ); fflush( stdout ); if( ( ret = ssl_init( &ssl ) ) != 0 ) { - printf( " failed\n ! ssl_init returned -0x%x\n\n", -ret ); + polarssl_printf( " failed\n ! ssl_init returned -0x%x\n\n", -ret ); goto exit; } @@ -1347,7 +1349,7 @@ int main( int argc, char *argv[] ) #if defined(POLARSSL_SSL_MAX_FRAGMENT_LENGTH) if( ( ret = ssl_set_max_frag_len( &ssl, opt.mfl_code ) ) != 0 ) { - printf( " failed\n ! ssl_set_max_frag_len returned %d\n\n", ret ); + polarssl_printf( " failed\n ! ssl_set_max_frag_len returned %d\n\n", ret ); goto exit; }; #endif @@ -1371,7 +1373,7 @@ int main( int argc, char *argv[] ) if( opt.alpn_string != NULL ) if( ( ret = ssl_set_alpn_protocols( &ssl, alpn_list ) ) != 0 ) { - printf( " failed\n ! ssl_set_alpn_protocols returned %d\n\n", ret ); + polarssl_printf( " failed\n ! ssl_set_alpn_protocols returned %d\n\n", ret ); goto exit; } #endif @@ -1393,7 +1395,7 @@ int main( int argc, char *argv[] ) #if defined(POLARSSL_SSL_SESSION_TICKETS) if( ( ret = ssl_set_session_tickets( &ssl, opt.tickets ) ) != 0 ) { - printf( " failed\n ! ssl_set_session_tickets returned %d\n\n", ret ); + polarssl_printf( " failed\n ! ssl_set_session_tickets returned %d\n\n", ret ); goto exit; } @@ -1446,13 +1448,13 @@ int main( int argc, char *argv[] ) if( key_cert_init ) if( ( ret = ssl_set_own_cert( &ssl, &srvcert, &pkey ) ) != 0 ) { - printf( " failed\n ! ssl_set_own_cert returned %d\n\n", ret ); + polarssl_printf( " failed\n ! ssl_set_own_cert returned %d\n\n", ret ); goto exit; } if( key_cert_init2 ) if( ( ret = ssl_set_own_cert( &ssl, &srvcert2, &pkey2 ) ) != 0 ) { - printf( " failed\n ! ssl_set_own_cert returned %d\n\n", ret ); + polarssl_printf( " failed\n ! ssl_set_own_cert returned %d\n\n", ret ); goto exit; } #endif @@ -1470,7 +1472,7 @@ int main( int argc, char *argv[] ) strlen( opt.psk_identity ) ); if( ret != 0 ) { - printf( " failed\n ssl_set_psk returned -0x%04X\n\n", - ret ); + polarssl_printf( " failed\n ssl_set_psk returned -0x%04X\n\n", - ret ); goto exit; } } @@ -1493,7 +1495,7 @@ int main( int argc, char *argv[] ) if( ret != 0 ) { - printf( " failed\n ssl_set_dh_param returned -0x%04X\n\n", - ret ); + polarssl_printf( " failed\n ssl_set_dh_param returned -0x%04X\n\n", - ret ); goto exit; } #endif @@ -1504,7 +1506,7 @@ int main( int argc, char *argv[] ) if( opt.max_version != -1 ) ssl_set_max_version( &ssl, SSL_MAJOR_VERSION_3, opt.max_version ); - printf( " ok\n" ); + polarssl_printf( " ok\n" ); reset: #if !defined(_WIN32) @@ -1521,7 +1523,7 @@ reset: { char error_buf[100]; polarssl_strerror( ret, error_buf, 100 ); - printf("Last error was: %d - %s\n\n", ret, error_buf ); + polarssl_printf("Last error was: %d - %s\n\n", ret, error_buf ); } #endif @@ -1535,7 +1537,7 @@ reset: */ client_fd = -1; - printf( " . Waiting for a remote connection ..." ); + polarssl_printf( " . Waiting for a remote connection ..." ); fflush( stdout ); if( ( ret = net_accept( listen_fd, &client_fd, NULL ) ) != 0 ) @@ -1543,13 +1545,13 @@ reset: #if !defined(_WIN32) if( received_sigterm ) { - printf( " interrupted by signal\n" ); + polarssl_printf( " interrupted by signal\n" ); ret = 0; goto exit; } #endif - printf( " failed\n ! net_accept returned -0x%x\n\n", -ret ); + polarssl_printf( " failed\n ! net_accept returned -0x%x\n\n", -ret ); goto exit; } @@ -1559,7 +1561,7 @@ reset: ret = net_set_block( client_fd ); if( ret != 0 ) { - printf( " failed\n ! net_set_(non)block() returned -0x%x\n\n", -ret ); + polarssl_printf( " failed\n ! net_set_(non)block() returned -0x%x\n\n", -ret ); goto exit; } @@ -1568,31 +1570,31 @@ reset: else ssl_set_bio( &ssl, net_recv, &client_fd, net_send, &client_fd ); - printf( " ok\n" ); + polarssl_printf( " ok\n" ); /* * 4. Handshake */ - printf( " . Performing the SSL/TLS handshake..." ); + polarssl_printf( " . Performing the SSL/TLS handshake..." ); fflush( stdout ); while( ( ret = ssl_handshake( &ssl ) ) != 0 ) { if( ret != POLARSSL_ERR_NET_WANT_READ && ret != POLARSSL_ERR_NET_WANT_WRITE ) { - printf( " failed\n ! ssl_handshake returned -0x%x\n\n", -ret ); + polarssl_printf( " failed\n ! ssl_handshake returned -0x%x\n\n", -ret ); goto reset; } } - printf( " ok\n [ Protocol is %s ]\n [ Ciphersuite is %s ]\n", + polarssl_printf( " ok\n [ Protocol is %s ]\n [ Ciphersuite is %s ]\n", ssl_get_version( &ssl ), ssl_get_ciphersuite( &ssl ) ); #if defined(POLARSSL_SSL_ALPN) if( opt.alpn_string != NULL ) { const char *alp = ssl_get_alpn_protocol( &ssl ); - printf( " [ Application Layer Protocol is %s ]\n", + polarssl_printf( " [ Application Layer Protocol is %s ]\n", alp ? alp : "(none)" ); } #endif @@ -1601,35 +1603,35 @@ reset: /* * 5. Verify the server certificate */ - printf( " . Verifying peer X.509 certificate..." ); + polarssl_printf( " . Verifying peer X.509 certificate..." ); if( ( ret = ssl_get_verify_result( &ssl ) ) != 0 ) { - printf( " failed\n" ); + polarssl_printf( " failed\n" ); if( !ssl_get_peer_cert( &ssl ) ) - printf( " ! no client certificate sent\n" ); + polarssl_printf( " ! no client certificate sent\n" ); if( ( ret & BADCERT_EXPIRED ) != 0 ) - printf( " ! client certificate has expired\n" ); + polarssl_printf( " ! client certificate has expired\n" ); if( ( ret & BADCERT_REVOKED ) != 0 ) - printf( " ! client certificate has been revoked\n" ); + polarssl_printf( " ! client certificate has been revoked\n" ); if( ( ret & BADCERT_NOT_TRUSTED ) != 0 ) - printf( " ! self-signed or not signed by a trusted CA\n" ); + polarssl_printf( " ! self-signed or not signed by a trusted CA\n" ); - printf( "\n" ); + polarssl_printf( "\n" ); } else - printf( " ok\n" ); + polarssl_printf( " ok\n" ); if( ssl_get_peer_cert( &ssl ) ) { - printf( " . Peer certificate information ...\n" ); + polarssl_printf( " . Peer certificate information ...\n" ); x509_crt_info( (char *) buf, sizeof( buf ) - 1, " ", ssl_get_peer_cert( &ssl ) ); - printf( "%s\n", buf ); + polarssl_printf( "%s\n", buf ); } #endif /* POLARSSL_X509_CRT_PARSE_C */ @@ -1638,7 +1640,7 @@ data_exchange: /* * 6. Read the HTTP Request */ - printf( " < Read from client:" ); + polarssl_printf( " < Read from client:" ); fflush( stdout ); do @@ -1657,17 +1659,17 @@ data_exchange: switch( ret ) { case POLARSSL_ERR_SSL_PEER_CLOSE_NOTIFY: - printf( " connection was closed gracefully\n" ); + polarssl_printf( " connection was closed gracefully\n" ); goto close_notify; case 0: case POLARSSL_ERR_NET_CONN_RESET: - printf( " connection was reset by peer\n" ); + polarssl_printf( " connection was reset by peer\n" ); ret = POLARSSL_ERR_NET_CONN_RESET; goto reset; default: - printf( " ssl_read returned -0x%x\n", -ret ); + polarssl_printf( " ssl_read returned -0x%x\n", -ret ); goto reset; } } @@ -1676,7 +1678,7 @@ data_exchange: { len = ret; buf[len] = '\0'; - printf( " %d bytes read\n\n%s\n", len, (char *) buf ); + polarssl_printf( " %d bytes read\n\n%s\n", len, (char *) buf ); /* End of message should be detected according to the syntax of the * application protocol (eg HTTP), just use a dummy test here. */ @@ -1694,7 +1696,7 @@ data_exchange: larger_buf = polarssl_malloc( ori_len + extra_len + 1 ); if( larger_buf == NULL ) { - printf( " ! memory allocation failed\n" ); + polarssl_printf( " ! memory allocation failed\n" ); ret = 1; goto reset; } @@ -1707,13 +1709,13 @@ data_exchange: if( ret != extra_len || ssl_get_bytes_avail( &ssl ) != 0 ) { - printf( " ! ssl_read failed on cached data\n" ); + polarssl_printf( " ! ssl_read failed on cached data\n" ); ret = 1; goto reset; } larger_buf[ori_len + extra_len] = '\0'; - printf( " %u bytes read (%u + %u)\n\n%s\n", + polarssl_printf( " %u bytes read (%u + %u)\n\n%s\n", ori_len + extra_len, ori_len, extra_len, (char *) larger_buf ); @@ -1740,7 +1742,7 @@ data_exchange: #if defined(POLARSSL_SSL_RENEGOTIATION) if( opt.renegotiate && exchanges_left > 1 ) { - printf( " . Requestion renegotiation..." ); + polarssl_printf( " . Requestion renegotiation..." ); fflush( stdout ); while( ( ret = ssl_renegotiate( &ssl ) ) != 0 ) @@ -1748,19 +1750,19 @@ data_exchange: if( ret != POLARSSL_ERR_NET_WANT_READ && ret != POLARSSL_ERR_NET_WANT_WRITE ) { - printf( " failed\n ! ssl_renegotiate returned %d\n\n", ret ); + polarssl_printf( " failed\n ! ssl_renegotiate returned %d\n\n", ret ); goto reset; } } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); } #endif /* POLARSSL_SSL_RENEGOTIATION */ /* * 7. Write the 200 Response */ - printf( " > Write to client:" ); + polarssl_printf( " > Write to client:" ); fflush( stdout ); len = sprintf( (char *) buf, HTTP_RESPONSE, @@ -1772,13 +1774,13 @@ data_exchange: { if( ret == POLARSSL_ERR_NET_CONN_RESET ) { - printf( " failed\n ! peer closed the connection\n\n" ); + polarssl_printf( " failed\n ! peer closed the connection\n\n" ); goto reset; } if( ret != POLARSSL_ERR_NET_WANT_READ && ret != POLARSSL_ERR_NET_WANT_WRITE ) { - printf( " failed\n ! ssl_write returned %d\n\n", ret ); + polarssl_printf( " failed\n ! ssl_write returned %d\n\n", ret ); goto reset; } } @@ -1786,6 +1788,7 @@ data_exchange: buf[written] = '\0'; printf( " %d bytes written in %d fragments\n\n%s\n", written, frags, (char *) buf ); + polarssl_printf( " %d bytes written in %d fragments\n\n%s\n", written, frags, (char *) buf ); ret = 0; /* @@ -1798,14 +1801,15 @@ data_exchange: * 8. Done, cleanly close the connection */ close_notify: - printf( " . Closing the connection..." ); + polarssl_printf( " . Closing the connection..." ); /* No error checking, the connection might be closed already */ do ret = ssl_close_notify( &ssl ); while( ret == POLARSSL_ERR_NET_WANT_WRITE ); ret = 0; - printf( " done\n" ); + polarssl_printf( " done\n" ); + goto reset; /* @@ -1817,7 +1821,7 @@ exit: { char error_buf[100]; polarssl_strerror( ret, error_buf, 100 ); - printf("Last error was: -0x%X - %s\n\n", -ret, error_buf ); + polarssl_printf("Last error was: -0x%X - %s\n\n", -ret, error_buf ); } #endif @@ -1865,7 +1869,7 @@ exit: printf( " done.\n" ); #if defined(_WIN32) - printf( " + Press Enter to exit this program.\n" ); + polarssl_printf( " + Press Enter to exit this program.\n" ); fflush( stdout ); getchar(); #endif diff --git a/programs/test/benchmark.c b/programs/test/benchmark.c index 239d96850..6b505e962 100644 --- a/programs/test/benchmark.c +++ b/programs/test/benchmark.c @@ -26,6 +26,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #include #include #include @@ -68,7 +77,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf("POLARSSL_TIMING_C not defined.\n"); + polarssl_printf("POLARSSL_TIMING_C not defined.\n"); return( 0 ); } #else @@ -100,7 +109,7 @@ static int myrand( void *rng_state, unsigned char *output, size_t len ) do { \ unsigned long i, j, tsc; \ \ - printf( HEADER_FORMAT, TITLE ); \ + polarssl_printf( HEADER_FORMAT, TITLE ); \ fflush( stdout ); \ \ set_alarm( 1 ); \ @@ -115,17 +124,17 @@ do { \ CODE; \ } \ \ - printf( "%9lu Kb/s, %9lu cycles/byte\n", i * BUFSIZE / 1024, \ + polarssl_printf( "%9lu Kb/s, %9lu cycles/byte\n", i * BUFSIZE / 1024, \ ( hardclock() - tsc ) / ( j * BUFSIZE ) ); \ } while( 0 ) #if defined(POLARSSL_ERROR_C) #define PRINT_ERROR \ polarssl_strerror( ret, ( char * )tmp, sizeof( tmp ) ); \ - printf( "FAILED: %s\n", tmp ); + polarssl_printf( "FAILED: %s\n", tmp ); #else #define PRINT_ERROR \ - printf( "FAILED: -0x%04x\n", -ret ); + polarssl_printf( "FAILED: -0x%04x\n", -ret ); #endif #define TIME_PUBLIC( TITLE, TYPE, CODE ) \ @@ -133,7 +142,7 @@ do { \ unsigned long i; \ int ret; \ \ - printf( HEADER_FORMAT, TITLE ); \ + polarssl_printf( HEADER_FORMAT, TITLE ); \ fflush( stdout ); \ set_alarm( 3 ); \ \ @@ -148,7 +157,7 @@ do { \ PRINT_ERROR; \ } \ else \ - printf( "%9lu " TYPE "/s\n", i / 3 ); \ + polarssl_printf( "%9lu " TYPE "/s\n", i / 3 ); \ } while( 0 ) unsigned char buf[BUFSIZE]; @@ -225,13 +234,13 @@ int main( int argc, char *argv[] ) todo.ecdh = 1; else { - printf( "Unrecognized option: %s\n", argv[i] ); - printf( "Available options: " OPTIONS ); + polarssl_printf( "Unrecognized option: %s\n", argv[i] ); + polarssl_printf( "Available options: " OPTIONS ); } } } - printf( "\n" ); + polarssl_printf( "\n" ); memset( buf, 0xAA, sizeof( buf ) ); memset( tmp, 0xBB, sizeof( tmp ) ); @@ -631,10 +640,10 @@ int main( int argc, char *argv[] ) } } #endif - printf( "\n" ); + polarssl_printf( "\n" ); #if defined(_WIN32) - printf( " Press Enter to exit this program.\n" ); + polarssl_printf( " Press Enter to exit this program.\n" ); fflush( stdout ); getchar(); #endif diff --git a/programs/test/o_p_test.c b/programs/test/o_p_test.c index 7f0f00b7e..6cbf299c3 100644 --- a/programs/test/o_p_test.c +++ b/programs/test/o_p_test.c @@ -26,6 +26,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #include #include #include @@ -51,7 +60,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf("POLARSSL_BIGNUM_C and/or POLARSSL_RSA_C and/or " + polarssl_printf("POLARSSL_BIGNUM_C and/or POLARSSL_RSA_C and/or " "POLARSSL_PK_PARSE_C and/or POLARSSL_FS_IO not defined.\n"); return( 0 ); } @@ -82,7 +91,7 @@ int main( int argc, char *argv[] ) (const unsigned char *) pers, strlen( pers ) ) ) != 0 ) { - printf( " failed\n ! ctr_drbg_init returned %d\n", ret ); + polarssl_printf( " failed\n ! ctr_drbg_init returned %d\n", ret ); goto exit; } ERR_load_crypto_strings(); @@ -91,38 +100,38 @@ int main( int argc, char *argv[] ) if( argc != 3 ) { - printf( "usage: o_p_test \n" ); + polarssl_printf( "usage: o_p_test \n" ); #ifdef WIN32 - printf( "\n" ); + polarssl_printf( "\n" ); #endif goto exit; } - printf( " . Reading private key from %s into mbed TLS ...", argv[1] ); + polarssl_printf( " . Reading private key from %s into mbed TLS ...", argv[1] ); fflush( stdout ); pk_init( &p_pk ); if( pk_parse_keyfile( &p_pk, argv[1], NULL ) != 0 ) { ret = 1; - printf( " failed\n ! Could not load key.\n\n" ); + polarssl_printf( " failed\n ! Could not load key.\n\n" ); goto exit; } if( !pk_can_do( &p_pk, POLARSSL_PK_RSA ) ) { ret = 1; - printf( " failed\n ! Key is not an RSA key\n" ); + polarssl_printf( " failed\n ! Key is not an RSA key\n" ); goto exit; } p_rsa = pk_rsa( p_pk ); - printf( " passed\n"); + polarssl_printf( " passed\n"); - printf( " . Reading private key from %s into OpenSSL ...", argv[1] ); + polarssl_printf( " . Reading private key from %s into OpenSSL ...", argv[1] ); fflush( stdout ); key_file = fopen( argv[1], "r" ); @@ -131,16 +140,16 @@ int main( int argc, char *argv[] ) if( o_rsa == NULL ) { ret = 1; - printf( " failed\n ! Could not load key.\n\n" ); + polarssl_printf( " failed\n ! Could not load key.\n\n" ); goto exit; } - printf( " passed\n"); - printf( "\n" ); + polarssl_printf( " passed\n"); + polarssl_printf( "\n" ); if( strlen( argv[1] ) > 100 ) { - printf( " Input data larger than 100 characters.\n\n" ); + polarssl_printf( " Input data larger than 100 characters.\n\n" ); goto exit; } @@ -149,117 +158,117 @@ int main( int argc, char *argv[] ) /* * Calculate the RSA encryption with public key. */ - printf( " . Generating the RSA encrypted value with mbed TLS (RSA_PUBLIC) ..." ); + polarssl_printf( " . Generating the RSA encrypted value with mbed TLS (RSA_PUBLIC) ..." ); fflush( stdout ); if( ( ret = rsa_pkcs1_encrypt( p_rsa, ctr_drbg_random, &ctr_drbg, RSA_PUBLIC, strlen( argv[2] ), input, p_pub_encrypted ) ) != 0 ) { - printf( " failed\n ! rsa_pkcs1_encrypt returned %d\n\n", ret ); + polarssl_printf( " failed\n ! rsa_pkcs1_encrypt returned %d\n\n", ret ); goto exit; } else - printf( " passed\n"); + polarssl_printf( " passed\n"); - printf( " . Generating the RSA encrypted value with OpenSSL (PUBLIC) ..." ); + polarssl_printf( " . Generating the RSA encrypted value with OpenSSL (PUBLIC) ..." ); fflush( stdout ); if( ( ret = RSA_public_encrypt( strlen( argv[2] ), input, o_pub_encrypted, o_rsa, RSA_PKCS1_PADDING ) ) == -1 ) { unsigned long code = ERR_get_error(); - printf( " failed\n ! RSA_public_encrypt returned %d %s\n\n", ret, ERR_error_string( code, NULL ) ); + polarssl_printf( " failed\n ! RSA_public_encrypt returned %d %s\n\n", ret, ERR_error_string( code, NULL ) ); goto exit; } else - printf( " passed\n"); + polarssl_printf( " passed\n"); /* * Calculate the RSA encryption with private key. */ - printf( " . Generating the RSA encrypted value with mbed TLS (RSA_PRIVATE) ..." ); + polarssl_printf( " . Generating the RSA encrypted value with mbed TLS (RSA_PRIVATE) ..." ); fflush( stdout ); if( ( ret = rsa_pkcs1_encrypt( p_rsa, ctr_drbg_random, &ctr_drbg, RSA_PRIVATE, strlen( argv[2] ), input, p_priv_encrypted ) ) != 0 ) { - printf( " failed\n ! rsa_pkcs1_encrypt returned %d\n\n", ret ); + polarssl_printf( " failed\n ! rsa_pkcs1_encrypt returned %d\n\n", ret ); goto exit; } else - printf( " passed\n"); + polarssl_printf( " passed\n"); - printf( " . Generating the RSA encrypted value with OpenSSL (PRIVATE) ..." ); + polarssl_printf( " . Generating the RSA encrypted value with OpenSSL (PRIVATE) ..." ); fflush( stdout ); if( ( ret = RSA_private_encrypt( strlen( argv[2] ), input, o_priv_encrypted, o_rsa, RSA_PKCS1_PADDING ) ) == -1 ) { unsigned long code = ERR_get_error(); - printf( " failed\n ! RSA_private_encrypt returned %d %s\n\n", ret, ERR_error_string( code, NULL ) ); + polarssl_printf( " failed\n ! RSA_private_encrypt returned %d %s\n\n", ret, ERR_error_string( code, NULL ) ); goto exit; } else - printf( " passed\n"); + polarssl_printf( " passed\n"); - printf( "\n" ); + polarssl_printf( "\n" ); /* * Calculate the RSA decryption with private key. */ - printf( " . Generating the RSA decrypted value for OpenSSL (PUBLIC) with mbed TLS (PRIVATE) ..." ); + polarssl_printf( " . Generating the RSA decrypted value for OpenSSL (PUBLIC) with mbed TLS (PRIVATE) ..." ); fflush( stdout ); if( ( ret = rsa_pkcs1_decrypt( p_rsa, ctr_drbg_random, &ctr_drbg, RSA_PRIVATE, &olen, o_pub_encrypted, p_pub_decrypted, 1024 ) ) != 0 ) { - printf( " failed\n ! rsa_pkcs1_decrypt returned %d\n\n", ret ); + polarssl_printf( " failed\n ! rsa_pkcs1_decrypt returned %d\n\n", ret ); } else - printf( " passed\n"); + polarssl_printf( " passed\n"); - printf( " . Generating the RSA decrypted value for mbed TLS (PUBLIC) with OpenSSL (PRIVATE) ..." ); + polarssl_printf( " . Generating the RSA decrypted value for mbed TLS (PUBLIC) with OpenSSL (PRIVATE) ..." ); fflush( stdout ); if( ( ret = RSA_private_decrypt( p_rsa->len, p_pub_encrypted, o_pub_decrypted, o_rsa, RSA_PKCS1_PADDING ) ) == -1 ) { unsigned long code = ERR_get_error(); - printf( " failed\n ! RSA_private_decrypt returned %d %s\n\n", ret, ERR_error_string( code, NULL ) ); + polarssl_printf( " failed\n ! RSA_private_decrypt returned %d %s\n\n", ret, ERR_error_string( code, NULL ) ); } else - printf( " passed\n"); + polarssl_printf( " passed\n"); /* * Calculate the RSA decryption with public key. */ - printf( " . Generating the RSA decrypted value for OpenSSL (PRIVATE) with mbed TLS (PUBLIC) ..." ); + polarssl_printf( " . Generating the RSA decrypted value for OpenSSL (PRIVATE) with mbed TLS (PUBLIC) ..." ); fflush( stdout ); if( ( ret = rsa_pkcs1_decrypt( p_rsa, NULL, NULL, RSA_PUBLIC, &olen, o_priv_encrypted, p_priv_decrypted, 1024 ) ) != 0 ) { - printf( " failed\n ! rsa_pkcs1_decrypt returned %d\n\n", ret ); + polarssl_printf( " failed\n ! rsa_pkcs1_decrypt returned %d\n\n", ret ); } else - printf( " passed\n"); + polarssl_printf( " passed\n"); - printf( " . Generating the RSA decrypted value for mbed TLS (PRIVATE) with OpenSSL (PUBLIC) ..." ); + polarssl_printf( " . Generating the RSA decrypted value for mbed TLS (PRIVATE) with OpenSSL (PUBLIC) ..." ); fflush( stdout ); if( ( ret = RSA_public_decrypt( p_rsa->len, p_priv_encrypted, o_priv_decrypted, o_rsa, RSA_PKCS1_PADDING ) ) == -1 ) { unsigned long code = ERR_get_error(); - printf( " failed\n ! RSA_public_decrypt returned %d %s\n\n", ret, ERR_error_string( code, NULL ) ); + polarssl_printf( " failed\n ! RSA_public_decrypt returned %d %s\n\n", ret, ERR_error_string( code, NULL ) ); } else - printf( " passed\n"); + polarssl_printf( " passed\n"); - printf( "\n" ); - printf( "String value (OpenSSL Public Encrypt, mbed TLS Private Decrypt): '%s'\n", p_pub_decrypted ); - printf( "String value (mbed TLS Public Encrypt, OpenSSL Private Decrypt): '%s'\n", o_pub_decrypted ); - printf( "String value (OpenSSL Private Encrypt, mbed TLS Public Decrypt): '%s'\n", p_priv_decrypted ); - printf( "String value (mbed TLS Private Encrypt, OpenSSL Public Decrypt): '%s'\n", o_priv_decrypted ); + polarssl_printf( "\n" ); + polarssl_printf( "String value (OpenSSL Public Encrypt, mbed TLS Private Decrypt): '%s'\n", p_pub_decrypted ); + polarssl_printf( "String value (mbed TLS Public Encrypt, OpenSSL Private Decrypt): '%s'\n", o_pub_decrypted ); + polarssl_printf( "String value (OpenSSL Private Encrypt, mbed TLS Public Decrypt): '%s'\n", p_priv_decrypted ); + polarssl_printf( "String value (mbed TLS Private Encrypt, OpenSSL Public Decrypt): '%s'\n", o_priv_decrypted ); exit: ctr_drbg_free( &ctr_drbg ); entropy_free( &entropy ); #ifdef WIN32 - printf( " + Press Enter to exit this program.\n" ); + polarssl_printf( " + Press Enter to exit this program.\n" ); fflush( stdout ); getchar(); #endif diff --git a/programs/test/selftest.c b/programs/test/selftest.c index 15a63d004..339b07c34 100644 --- a/programs/test/selftest.c +++ b/programs/test/selftest.c @@ -26,6 +26,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #include #include @@ -72,7 +81,7 @@ int main( int argc, char *argv[] ) else { v = 1; - printf( "\n" ); + polarssl_printf( "\n" ); } #if defined(POLARSSL_SELF_TEST) @@ -215,7 +224,7 @@ int main( int argc, char *argv[] ) #endif #else - printf( " POLARSSL_SELF_TEST not defined.\n" ); + polarssl_printf( " POLARSSL_SELF_TEST not defined.\n" ); #endif if( v != 0 ) @@ -234,9 +243,9 @@ int main( int argc, char *argv[] ) if( v != 0 ) { - printf( " [ All tests passed ]\n\n" ); + polarssl_printf( " [ All tests passed ]\n\n" ); #if defined(_WIN32) - printf( " Press Enter to exit this program.\n" ); + polarssl_printf( " Press Enter to exit this program.\n" ); fflush( stdout ); getchar(); #endif } diff --git a/programs/test/ssl_cert_test.c b/programs/test/ssl_cert_test.c index c41b1be9b..30e95c95e 100644 --- a/programs/test/ssl_cert_test.c +++ b/programs/test/ssl_cert_test.c @@ -26,6 +26,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #include #include @@ -36,7 +45,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf("POLARSSL_RSA_C and/or POLARSSL_X509_CRT_PARSE_C " + polarssl_printf("POLARSSL_RSA_C and/or POLARSSL_X509_CRT_PARSE_C " "POLARSSL_FS_IO and/or POLARSSL_X509_CRL_PARSE_C " "not defined.\n"); return( 0 ); @@ -93,7 +102,7 @@ int main( int argc, char *argv[] ) /* * 1.1. Load the trusted CA */ - printf( "\n . Loading the CA root certificate ..." ); + polarssl_printf( "\n . Loading the CA root certificate ..." ); fflush( stdout ); /* @@ -103,32 +112,32 @@ int main( int argc, char *argv[] ) ret = x509_crt_parse_file( &cacert, "ssl/test-ca/test-ca.crt" ); if( ret != 0 ) { - printf( " failed\n ! x509_crt_parse_file returned %d\n\n", ret ); + polarssl_printf( " failed\n ! x509_crt_parse_file returned %d\n\n", ret ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); x509_crt_info( buf, 1024, "CRT: ", &cacert ); - printf("%s\n", buf ); + polarssl_printf("%s\n", buf ); /* * 1.2. Load the CRL */ - printf( " . Loading the CRL ..." ); + polarssl_printf( " . Loading the CRL ..." ); fflush( stdout ); ret = x509_crl_parse_file( &crl, "ssl/test-ca/crl.pem" ); if( ret != 0 ) { - printf( " failed\n ! x509_crl_parse_file returned %d\n\n", ret ); + polarssl_printf( " failed\n ! x509_crl_parse_file returned %d\n\n", ret ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); x509_crl_info( buf, 1024, "CRL: ", &crl ); - printf("%s\n", buf ); + polarssl_printf("%s\n", buf ); for( i = 0; i < MAX_CLIENT_CERTS; i++ ) { @@ -145,22 +154,22 @@ int main( int argc, char *argv[] ) snprintf(name, 512, "ssl/test-ca/%s", client_certificates[i]); - printf( " . Loading the client certificate %s...", name ); + polarssl_printf( " . Loading the client certificate %s...", name ); fflush( stdout ); ret = x509_crt_parse_file( &clicert, name ); if( ret != 0 ) { - printf( " failed\n ! x509_crt_parse_file returned %d\n\n", ret ); + polarssl_printf( " failed\n ! x509_crt_parse_file returned %d\n\n", ret ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); /* * 1.4. Verify certificate validity with CA certificate */ - printf( " . Verify the client certificate with CA certificate..." ); + polarssl_printf( " . Verify the client certificate with CA certificate..." ); fflush( stdout ); ret = x509_crt_verify( &clicert, &cacert, &crl, NULL, &flags, NULL, @@ -170,53 +179,53 @@ int main( int argc, char *argv[] ) if( ret == POLARSSL_ERR_X509_CERT_VERIFY_FAILED ) { if( flags & BADCERT_CN_MISMATCH ) - printf( " CN_MISMATCH " ); + polarssl_printf( " CN_MISMATCH " ); if( flags & BADCERT_EXPIRED ) - printf( " EXPIRED " ); + polarssl_printf( " EXPIRED " ); if( flags & BADCERT_REVOKED ) - printf( " REVOKED " ); + polarssl_printf( " REVOKED " ); if( flags & BADCERT_NOT_TRUSTED ) - printf( " NOT_TRUSTED " ); + polarssl_printf( " NOT_TRUSTED " ); if( flags & BADCRL_NOT_TRUSTED ) - printf( " CRL_NOT_TRUSTED " ); + polarssl_printf( " CRL_NOT_TRUSTED " ); if( flags & BADCRL_EXPIRED ) - printf( " CRL_EXPIRED " ); + polarssl_printf( " CRL_EXPIRED " ); } else { - printf( " failed\n ! x509_crt_verify returned %d\n\n", ret ); + polarssl_printf( " failed\n ! x509_crt_verify returned %d\n\n", ret ); goto exit; } } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); /* * 1.5. Load own private key */ snprintf(name, 512, "ssl/test-ca/%s", client_private_keys[i]); - printf( " . Loading the client private key %s...", name ); + polarssl_printf( " . Loading the client private key %s...", name ); fflush( stdout ); ret = pk_parse_keyfile( &pk, name, NULL ); if( ret != 0 ) { - printf( " failed\n ! pk_parse_keyfile returned %d\n\n", ret ); + polarssl_printf( " failed\n ! pk_parse_keyfile returned %d\n\n", ret ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); /* * 1.6. Verify certificate validity with private key */ - printf( " . Verify the client certificate with private key..." ); + polarssl_printf( " . Verify the client certificate with private key..." ); fflush( stdout ); /* EC NOT IMPLEMENTED YET */ if( ! pk_can_do( &clicert.pk, POLARSSL_PK_RSA ) ) { - printf( " failed\n ! certificate's key is not RSA\n\n" ); + polarssl_printf( " failed\n ! certificate's key is not RSA\n\n" ); ret = POLARSSL_ERR_X509_FEATURE_UNAVAILABLE; goto exit; } @@ -224,25 +233,25 @@ int main( int argc, char *argv[] ) ret = mpi_cmp_mpi(&pk_rsa( pk )->N, &pk_rsa( clicert.pk )->N); if( ret != 0 ) { - printf( " failed\n ! mpi_cmp_mpi for N returned %d\n\n", ret ); + polarssl_printf( " failed\n ! mpi_cmp_mpi for N returned %d\n\n", ret ); goto exit; } ret = mpi_cmp_mpi(&pk_rsa( pk )->E, &pk_rsa( clicert.pk )->E); if( ret != 0 ) { - printf( " failed\n ! mpi_cmp_mpi for E returned %d\n\n", ret ); + polarssl_printf( " failed\n ! mpi_cmp_mpi for E returned %d\n\n", ret ); goto exit; } ret = rsa_check_privkey( pk_rsa( pk ) ); if( ret != 0 ) { - printf( " failed\n ! rsa_check_privkey returned %d\n\n", ret ); + polarssl_printf( " failed\n ! rsa_check_privkey returned %d\n\n", ret ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); x509_crt_free( &clicert ); pk_free( &pk ); @@ -253,7 +262,7 @@ exit: x509_crl_free( &crl ); #if defined(_WIN32) - printf( " + Press Enter to exit this program.\n" ); + polarssl_printf( " + Press Enter to exit this program.\n" ); fflush( stdout ); getchar(); #endif diff --git a/programs/test/ssl_test.c b/programs/test/ssl_test.c index 3b2e2d7c1..7f58e3dd5 100644 --- a/programs/test/ssl_test.c +++ b/programs/test/ssl_test.c @@ -26,6 +26,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #include #include #include @@ -49,7 +58,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf("POLARSSL_BIGNUM_C and/or POLARSSL_ENTROPY_C and/or " + polarssl_printf("POLARSSL_BIGNUM_C and/or POLARSSL_ENTROPY_C and/or " "POLARSSL_SSL_TLS_C and/or POLARSSL_SSL_SRV_C and/or " "POLARSSL_SSL_CLI_C and/or POLARSSL_NET_C and/or " "POLARSSL_RSA_C and/or POLARSSL_CTR_DRBG_C and/or " @@ -131,7 +140,7 @@ static unsigned long int lcppm5( unsigned long int *state ) static void my_debug( void *ctx, int level, const char *str ) { if( level < ((struct options *) ctx)->debug_level ) - fprintf( stderr, "%s", str ); + polarssl_fprintf( stderr, "%s", str ); } /* @@ -175,7 +184,7 @@ static int ssl_test( struct options *opt ) (const unsigned char *) pers, strlen( pers ) ) ) != 0 ) { - printf( " ! ctr_drbg_init returned %d\n", ret ); + polarssl_printf( " ! ctr_drbg_init returned %d\n", ret ); goto exit; } @@ -192,13 +201,13 @@ static int ssl_test( struct options *opt ) if( ( ret = net_connect( &client_fd, opt->server_name, opt->server_port ) ) != 0 ) { - printf( " ! net_connect returned %d\n\n", ret ); + polarssl_printf( " ! net_connect returned %d\n\n", ret ); return( ret ); } if( ( ret = ssl_init( &ssl ) ) != 0 ) { - printf( " ! ssl_init returned %d\n\n", ret ); + polarssl_printf( " ! ssl_init returned %d\n\n", ret ); goto exit; } @@ -208,14 +217,14 @@ static int ssl_test( struct options *opt ) if( opt->opmode == OPMODE_SERVER ) { #if !defined(POLARSSL_CERTS_C) - printf("POLARSSL_CERTS_C not defined.\n"); + polarssl_printf("POLARSSL_CERTS_C not defined.\n"); goto exit; #else ret = x509_crt_parse( &srvcert, (const unsigned char *) test_srv_crt, strlen( test_srv_crt ) ); if( ret != 0 ) { - printf( " ! x509_crt_parse returned %d\n\n", ret ); + polarssl_printf( " ! x509_crt_parse returned %d\n\n", ret ); goto exit; } @@ -223,7 +232,7 @@ static int ssl_test( struct options *opt ) strlen( test_ca_list ) ); if( ret != 0 ) { - printf( " ! x509_crt_parse returned %d\n\n", ret ); + polarssl_printf( " ! x509_crt_parse returned %d\n\n", ret ); goto exit; } @@ -231,7 +240,7 @@ static int ssl_test( struct options *opt ) strlen( test_srv_key ), NULL, 0 ); if( ret != 0 ) { - printf( " ! pk_parse_key returned %d\n\n", ret ); + polarssl_printf( " ! pk_parse_key returned %d\n\n", ret ); goto exit; } #endif @@ -241,20 +250,20 @@ static int ssl_test( struct options *opt ) if( ( ret = net_bind( &server_fd, NULL, opt->server_port ) ) != 0 ) { - printf( " ! net_bind returned %d\n\n", ret ); + polarssl_printf( " ! net_bind returned %d\n\n", ret ); return( ret ); } } if( ( ret = net_accept( server_fd, &client_fd, NULL ) ) != 0 ) { - printf( " ! net_accept returned %d\n\n", ret ); + polarssl_printf( " ! net_accept returned %d\n\n", ret ); return( ret ); } if( ( ret = ssl_init( &ssl ) ) != 0 ) { - printf( " ! ssl_init returned %d\n\n", ret ); + polarssl_printf( " ! ssl_init returned %d\n\n", ret ); return( ret ); } @@ -262,7 +271,7 @@ static int ssl_test( struct options *opt ) ssl_set_ca_chain( &ssl, srvcert.next, NULL, NULL ); if( ( ret = ssl_set_own_cert( &ssl, &srvcert, &pkey ) ) != 0 ) { - printf( " failed\n ! ssl_set_own_cert returned %d\n\n", ret ); + polarssl_printf( " failed\n ! ssl_set_own_cert returned %d\n\n", ret ); goto exit; } } @@ -281,17 +290,17 @@ static int ssl_test( struct options *opt ) { if( ( ret = net_set_nonblock( client_fd ) ) != 0 ) { - printf( " ! net_set_nonblock returned %d\n\n", ret ); + polarssl_printf( " ! net_set_nonblock returned %d\n\n", ret ); return( ret ); } } - read_buf = (unsigned char *) malloc( opt->buffer_size ); - write_buf = (unsigned char *) malloc( opt->buffer_size ); + read_buf = (unsigned char *) polarssl_malloc( opt->buffer_size ); + write_buf = (unsigned char *) polarssl_malloc( opt->buffer_size ); if( read_buf == NULL || write_buf == NULL ) { - printf( " ! malloc(%d bytes) failed\n\n", opt->buffer_size ); + polarssl_printf( " ! polarssl_malloc(%d bytes) failed\n\n", opt->buffer_size ); goto exit; } @@ -333,7 +342,7 @@ static int ssl_test( struct options *opt ) if( ret < 0 && ret != POLARSSL_ERR_NET_WANT_READ && ret != POLARSSL_ERR_NET_WANT_WRITE ) { - printf( " ! ssl_write returned %d\n\n", ret ); + polarssl_printf( " ! ssl_write returned %d\n\n", ret ); break; } } @@ -357,7 +366,7 @@ static int ssl_test( struct options *opt ) (unsigned char) lcppm5( read_state ) ) { ret = 1; - printf( " ! plaintext mismatch\n\n" ); + polarssl_printf( " ! plaintext mismatch\n\n" ); goto exit; } } @@ -379,7 +388,7 @@ static int ssl_test( struct options *opt ) if( ret < 0 && ret != POLARSSL_ERR_NET_WANT_READ && ret != POLARSSL_ERR_NET_WANT_WRITE ) { - printf( " ! ssl_read returned %d\n\n", ret ); + polarssl_printf( " ! ssl_read returned %d\n\n", ret ); break; } } @@ -458,15 +467,15 @@ int main( int argc, char *argv[] ) if( argc == 1 ) { usage: - printf( USAGE ); + polarssl_printf( USAGE ); list = ssl_list_ciphersuites(); while( *list ) { - printf(" %s\n", ssl_get_ciphersuite_name( *list ) ); + polarssl_printf(" %s\n", ssl_get_ciphersuite_name( *list ) ); list++; } - printf("\n"); + polarssl_printf("\n"); goto exit; } @@ -611,7 +620,7 @@ int main( int argc, char *argv[] ) exit: #if defined(_WIN32) - printf( " Press Enter to exit this program.\n" ); + polarssl_printf( " Press Enter to exit this program.\n" ); fflush( stdout ); getchar(); #endif diff --git a/programs/util/pem2der.c b/programs/util/pem2der.c index 1ba478b32..95543b719 100644 --- a/programs/util/pem2der.c +++ b/programs/util/pem2der.c @@ -26,6 +26,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #include #include #include @@ -42,7 +51,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf("POLARSSL_BASE64_C and/or POLARSSL_FS_IO not defined.\n"); + polarssl_printf("POLARSSL_BASE64_C and/or POLARSSL_FS_IO not defined.\n"); return( 0 ); } #else @@ -121,7 +130,7 @@ static int load_file( const char *path, unsigned char **buf, size_t *n ) *n = (size_t) size; if( *n + 1 == 0 || - ( *buf = (unsigned char *) malloc( *n + 1 ) ) == NULL ) + ( *buf = (unsigned char *) polarssl_malloc( *n + 1 ) ) == NULL ) { fclose( f ); return( -1 ); @@ -188,7 +197,7 @@ int main( int argc, char *argv[] ) if( argc == 0 ) { usage: - printf( USAGE ); + polarssl_printf( USAGE ); goto exit; } @@ -214,7 +223,7 @@ int main( int argc, char *argv[] ) /* * 1.1. Load the PEM file */ - printf( "\n . Loading the PEM file ..." ); + polarssl_printf( "\n . Loading the PEM file ..." ); fflush( stdout ); ret = load_file( opt.filename, &pem_buffer, &pem_size ); @@ -224,16 +233,16 @@ int main( int argc, char *argv[] ) #ifdef POLARSSL_ERROR_C polarssl_strerror( ret, buf, 1024 ); #endif - printf( " failed\n ! load_file returned %d - %s\n\n", ret, buf ); + polarssl_printf( " failed\n ! load_file returned %d - %s\n\n", ret, buf ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); /* * 1.2. Convert from PEM to DER */ - printf( " . Converting from PEM to DER ..." ); + polarssl_printf( " . Converting from PEM to DER ..." ); fflush( stdout ); if( ( ret = convert_pem_to_der( pem_buffer, pem_size, der_buffer, &der_size ) ) != 0 ) @@ -241,16 +250,16 @@ int main( int argc, char *argv[] ) #ifdef POLARSSL_ERROR_C polarssl_strerror( ret, buf, 1024 ); #endif - printf( " failed\n ! convert_pem_to_der %d - %s\n\n", ret, buf ); + polarssl_printf( " failed\n ! convert_pem_to_der %d - %s\n\n", ret, buf ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); /* * 1.3. Write the DER file */ - printf( " . Writing the DER file ..." ); + polarssl_printf( " . Writing the DER file ..." ); fflush( stdout ); ret = write_file( opt.output_file, der_buffer, der_size ); @@ -260,17 +269,17 @@ int main( int argc, char *argv[] ) #ifdef POLARSSL_ERROR_C polarssl_strerror( ret, buf, 1024 ); #endif - printf( " failed\n ! write_file returned %d - %s\n\n", ret, buf ); + polarssl_printf( " failed\n ! write_file returned %d - %s\n\n", ret, buf ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); exit: free( pem_buffer ); #if defined(_WIN32) - printf( " + Press Enter to exit this program.\n" ); + polarssl_printf( " + Press Enter to exit this program.\n" ); fflush( stdout ); getchar(); #endif diff --git a/programs/util/strerror.c b/programs/util/strerror.c index 79eec1828..a4db94c86 100644 --- a/programs/util/strerror.c +++ b/programs/util/strerror.c @@ -26,6 +26,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #include #include #include @@ -42,7 +51,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf("POLARSSL_ERROR_C and/or POLARSSL_ERROR_STRERROR_DUMMY not defined.\n"); + polarssl_printf("POLARSSL_ERROR_C and/or POLARSSL_ERROR_STRERROR_DUMMY not defined.\n"); return( 0 ); } #else @@ -53,7 +62,7 @@ int main( int argc, char *argv[] ) if( argc != 2 ) { - printf( USAGE ); + polarssl_printf( USAGE ); return( 0 ); } @@ -63,7 +72,7 @@ int main( int argc, char *argv[] ) val = strtol( argv[1], &end, 16 ); if( *end != '\0' ) { - printf( USAGE ); + polarssl_printf( USAGE ); return( 0 ); } } @@ -74,11 +83,11 @@ int main( int argc, char *argv[] ) { char error_buf[200]; polarssl_strerror( val, error_buf, 200 ); - printf("Last error was: -0x%04x - %s\n\n", (int) -val, error_buf ); + polarssl_printf("Last error was: -0x%04x - %s\n\n", (int) -val, error_buf ); } #if defined(_WIN32) - printf( " + Press Enter to exit this program.\n" ); + polarssl_printf( " + Press Enter to exit this program.\n" ); fflush( stdout ); getchar(); #endif diff --git a/programs/x509/cert_app.c b/programs/x509/cert_app.c index 7ec9893a5..92b913009 100644 --- a/programs/x509/cert_app.c +++ b/programs/x509/cert_app.c @@ -26,6 +26,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #include #include #include @@ -46,7 +55,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf("POLARSSL_BIGNUM_C and/or POLARSSL_ENTROPY_C and/or " + polarssl_printf("POLARSSL_BIGNUM_C and/or POLARSSL_ENTROPY_C and/or " "POLARSSL_SSL_TLS_C and/or POLARSSL_SSL_CLI_C and/or " "POLARSSL_NET_C and/or POLARSSL_RSA_C and/or " "POLARSSL_X509_CRT_PARSE_C and/or POLARSSL_FS_IO and/or " @@ -89,7 +98,7 @@ static void my_debug( void *ctx, int level, const char *str ) { if( level < opt.debug_level ) { - fprintf( (FILE *) ctx, "%s", str ); + polarssl_fprintf( (FILE *) ctx, "%s", str ); fflush( (FILE *) ctx ); } } @@ -99,33 +108,33 @@ static int my_verify( void *data, x509_crt *crt, int depth, int *flags ) char buf[1024]; ((void) data); - printf( "\nVerify requested for (Depth %d):\n", depth ); + polarssl_printf( "\nVerify requested for (Depth %d):\n", depth ); x509_crt_info( buf, sizeof( buf ) - 1, "", crt ); - printf( "%s", buf ); + polarssl_printf( "%s", buf ); if( ( (*flags) & BADCERT_EXPIRED ) != 0 ) - printf( " ! server certificate has expired\n" ); + polarssl_printf( " ! server certificate has expired\n" ); if( ( (*flags) & BADCERT_REVOKED ) != 0 ) - printf( " ! server certificate has been revoked\n" ); + polarssl_printf( " ! server certificate has been revoked\n" ); if( ( (*flags) & BADCERT_CN_MISMATCH ) != 0 ) - printf( " ! CN mismatch\n" ); + polarssl_printf( " ! CN mismatch\n" ); if( ( (*flags) & BADCERT_NOT_TRUSTED ) != 0 ) - printf( " ! self-signed or not signed by a trusted CA\n" ); + polarssl_printf( " ! self-signed or not signed by a trusted CA\n" ); if( ( (*flags) & BADCRL_NOT_TRUSTED ) != 0 ) - printf( " ! CRL not trusted\n" ); + polarssl_printf( " ! CRL not trusted\n" ); if( ( (*flags) & BADCRL_EXPIRED ) != 0 ) - printf( " ! CRL expired\n" ); + polarssl_printf( " ! CRL expired\n" ); if( ( (*flags) & BADCERT_OTHER ) != 0 ) - printf( " ! other (unknown) flag\n" ); + polarssl_printf( " ! other (unknown) flag\n" ); if ( ( *flags ) == 0 ) - printf( " This certificate has no flags\n" ); + polarssl_printf( " This certificate has no flags\n" ); return( 0 ); } @@ -184,7 +193,7 @@ int main( int argc, char *argv[] ) if( argc == 0 ) { usage: - printf( USAGE ); + polarssl_printf( USAGE ); ret = 2; goto exit; } @@ -256,7 +265,7 @@ int main( int argc, char *argv[] ) /* * 1.1. Load the trusted CA */ - printf( " . Loading the CA root certificate ..." ); + polarssl_printf( " . Loading the CA root certificate ..." ); fflush( stdout ); if( strlen( opt.ca_path ) ) @@ -272,18 +281,18 @@ int main( int argc, char *argv[] ) if( ret < 0 ) { - printf( " failed\n ! x509_crt_parse returned -0x%x\n\n", -ret ); + polarssl_printf( " failed\n ! x509_crt_parse returned -0x%x\n\n", -ret ); goto exit; } - printf( " ok (%d skipped)\n", ret ); + polarssl_printf( " ok (%d skipped)\n", ret ); #if defined(POLARSSL_X509_CRL_PARSE_C) if( strlen( opt.crl_file ) ) { if( ( ret = x509_crl_parse_file( &cacrl, opt.crl_file ) ) != 0 ) { - printf( " failed\n ! x509_crl_parse returned -0x%x\n\n", -ret ); + polarssl_printf( " failed\n ! x509_crl_parse returned -0x%x\n\n", -ret ); goto exit; } @@ -300,43 +309,43 @@ int main( int argc, char *argv[] ) /* * 1.1. Load the certificate(s) */ - printf( "\n . Loading the certificate(s) ..." ); + polarssl_printf( "\n . Loading the certificate(s) ..." ); fflush( stdout ); ret = x509_crt_parse_file( &crt, opt.filename ); if( ret < 0 ) { - printf( " failed\n ! x509_crt_parse_file returned %d\n\n", ret ); + polarssl_printf( " failed\n ! x509_crt_parse_file returned %d\n\n", ret ); x509_crt_free( &crt ); goto exit; } if( opt.permissive == 0 && ret > 0 ) { - printf( " failed\n ! x509_crt_parse failed to parse %d certificates\n\n", ret ); + polarssl_printf( " failed\n ! x509_crt_parse failed to parse %d certificates\n\n", ret ); x509_crt_free( &crt ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); /* * 1.2 Print the certificate(s) */ while( cur != NULL ) { - printf( " . Peer certificate information ...\n" ); + polarssl_printf( " . Peer certificate information ...\n" ); ret = x509_crt_info( (char *) buf, sizeof( buf ) - 1, " ", cur ); if( ret == -1 ) { - printf( " failed\n ! x509_crt_info returned %d\n\n", ret ); + polarssl_printf( " failed\n ! x509_crt_info returned %d\n\n", ret ); x509_crt_free( &crt ); goto exit; } - printf( "%s\n", buf ); + polarssl_printf( "%s\n", buf ); cur = cur->next; } @@ -346,29 +355,29 @@ int main( int argc, char *argv[] ) */ if( verify ) { - printf( " . Verifying X.509 certificate..." ); + polarssl_printf( " . Verifying X.509 certificate..." ); if( ( ret = x509_crt_verify( &crt, &cacert, &cacrl, NULL, &flags, my_verify, NULL ) ) != 0 ) { - printf( " failed\n" ); + polarssl_printf( " failed\n" ); if( ( ret & BADCERT_EXPIRED ) != 0 ) - printf( " ! server certificate has expired\n" ); + polarssl_printf( " ! server certificate has expired\n" ); if( ( ret & BADCERT_REVOKED ) != 0 ) - printf( " ! server certificate has been revoked\n" ); + polarssl_printf( " ! server certificate has been revoked\n" ); if( ( ret & BADCERT_CN_MISMATCH ) != 0 ) - printf( " ! CN mismatch (expected CN=%s)\n", opt.server_name ); + polarssl_printf( " ! CN mismatch (expected CN=%s)\n", opt.server_name ); if( ( ret & BADCERT_NOT_TRUSTED ) != 0 ) - printf( " ! self-signed or not signed by a trusted CA\n" ); + polarssl_printf( " ! self-signed or not signed by a trusted CA\n" ); - printf( "\n" ); + polarssl_printf( "\n" ); } else - printf( " ok\n" ); + polarssl_printf( " ok\n" ); } x509_crt_free( &crt ); @@ -378,7 +387,7 @@ int main( int argc, char *argv[] ) /* * 1. Initialize the RNG and the session data */ - printf( "\n . Seeding the random number generator..." ); + polarssl_printf( "\n . Seeding the random number generator..." ); fflush( stdout ); entropy_init( &entropy ); @@ -386,23 +395,23 @@ int main( int argc, char *argv[] ) (const unsigned char *) pers, strlen( pers ) ) ) != 0 ) { - printf( " failed\n ! ctr_drbg_init returned %d\n", ret ); + polarssl_printf( " failed\n ! ctr_drbg_init returned %d\n", ret ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); /* * 2. Start the connection */ - printf( " . SSL connection to tcp/%s/%-4d...", opt.server_name, + polarssl_printf( " . SSL connection to tcp/%s/%-4d...", opt.server_name, opt.server_port ); fflush( stdout ); if( ( ret = net_connect( &server_fd, opt.server_name, opt.server_port ) ) != 0 ) { - printf( " failed\n ! net_connect returned %d\n\n", ret ); + polarssl_printf( " failed\n ! net_connect returned %d\n\n", ret ); goto exit; } @@ -411,7 +420,7 @@ int main( int argc, char *argv[] ) */ if( ( ret = ssl_init( &ssl ) ) != 0 ) { - printf( " failed\n ! ssl_init returned %d\n\n", ret ); + polarssl_printf( " failed\n ! ssl_init returned %d\n\n", ret ); goto exit; } @@ -432,14 +441,14 @@ int main( int argc, char *argv[] ) if( ( ret = ssl_set_own_cert( &ssl, &clicert, &pkey ) ) != 0 ) { - printf( " failed\n ! ssl_set_own_cert returned %d\n\n", ret ); + polarssl_printf( " failed\n ! ssl_set_own_cert returned %d\n\n", ret ); goto exit; } #if defined(POLARSSL_SSL_SERVER_NAME_INDICATION) if( ( ret = ssl_set_hostname( &ssl, opt.server_name ) ) != 0 ) { - printf( " failed\n ! ssl_set_hostname returned %d\n\n", ret ); + polarssl_printf( " failed\n ! ssl_set_hostname returned %d\n\n", ret ); goto exit; } #endif @@ -451,28 +460,28 @@ int main( int argc, char *argv[] ) { if( ret != POLARSSL_ERR_NET_WANT_READ && ret != POLARSSL_ERR_NET_WANT_WRITE ) { - printf( " failed\n ! ssl_handshake returned %d\n\n", ret ); + polarssl_printf( " failed\n ! ssl_handshake returned %d\n\n", ret ); ssl_free( &ssl ); goto exit; } } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); /* * 5. Print the certificate */ - printf( " . Peer certificate information ...\n" ); + polarssl_printf( " . Peer certificate information ...\n" ); ret = x509_crt_info( (char *) buf, sizeof( buf ) - 1, " ", ssl.session->peer_cert ); if( ret == -1 ) { - printf( " failed\n ! x509_crt_info returned %d\n\n", ret ); + polarssl_printf( " failed\n ! x509_crt_info returned %d\n\n", ret ); ssl_free( &ssl ); goto exit; } - printf( "%s\n", buf ); + polarssl_printf( "%s\n", buf ); ssl_close_notify( &ssl ); ssl_free( &ssl ); @@ -494,7 +503,7 @@ exit: entropy_free( &entropy ); #if defined(_WIN32) - printf( " + Press Enter to exit this program.\n" ); + polarssl_printf( " + Press Enter to exit this program.\n" ); fflush( stdout ); getchar(); #endif diff --git a/programs/x509/cert_req.c b/programs/x509/cert_req.c index 54f146205..33c3588a8 100644 --- a/programs/x509/cert_req.c +++ b/programs/x509/cert_req.c @@ -26,6 +26,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #include #include #include @@ -43,7 +52,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf( "POLARSSL_X509_CSR_WRITE_C and/or POLARSSL_FS_IO and/or " + polarssl_printf( "POLARSSL_X509_CSR_WRITE_C and/or POLARSSL_FS_IO and/or " "POLARSSL_PK_PARSE_C and/or " "POLARSSL_ENTROPY_C and/or POLARSSL_CTR_DRBG_C " "not defined.\n"); @@ -150,7 +159,7 @@ int main( int argc, char *argv[] ) if( argc == 0 ) { usage: - printf( USAGE ); + polarssl_printf( USAGE ); ret = 1; goto exit; } @@ -251,7 +260,7 @@ int main( int argc, char *argv[] ) /* * 0. Seed the PRNG */ - printf( " . Seeding the random number generator..." ); + polarssl_printf( " . Seeding the random number generator..." ); fflush( stdout ); entropy_init( &entropy ); @@ -259,58 +268,58 @@ int main( int argc, char *argv[] ) (const unsigned char *) pers, strlen( pers ) ) ) != 0 ) { - printf( " failed\n ! ctr_drbg_init returned %d", ret ); + polarssl_printf( " failed\n ! ctr_drbg_init returned %d", ret ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); /* * 1.0. Check the subject name for validity */ - printf( " . Checking subjet name..." ); + polarssl_printf( " . Checking subjet name..." ); fflush( stdout ); if( ( ret = x509write_csr_set_subject_name( &req, opt.subject_name ) ) != 0 ) { - printf( " failed\n ! x509write_csr_set_subject_name returned %d", ret ); + polarssl_printf( " failed\n ! x509write_csr_set_subject_name returned %d", ret ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); /* * 1.1. Load the key */ - printf( " . Loading the private key ..." ); + polarssl_printf( " . Loading the private key ..." ); fflush( stdout ); ret = pk_parse_keyfile( &key, opt.filename, NULL ); if( ret != 0 ) { - printf( " failed\n ! pk_parse_keyfile returned %d", ret ); + polarssl_printf( " failed\n ! pk_parse_keyfile returned %d", ret ); goto exit; } x509write_csr_set_key( &req, &key ); - printf( " ok\n" ); + polarssl_printf( " ok\n" ); /* * 1.2. Writing the request */ - printf( " . Writing the certificate request ..." ); + polarssl_printf( " . Writing the certificate request ..." ); fflush( stdout ); if( ( ret = write_certificate_request( &req, opt.output_file, ctr_drbg_random, &ctr_drbg ) ) != 0 ) { - printf( " failed\n ! write_certifcate_request %d", ret ); + polarssl_printf( " failed\n ! write_certifcate_request %d", ret ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); exit: @@ -318,9 +327,9 @@ exit: { #ifdef POLARSSL_ERROR_C polarssl_strerror( ret, buf, sizeof( buf ) ); - printf( " - %s\n", buf ); + polarssl_printf( " - %s\n", buf ); #else - printf("\n"); + polarssl_printf("\n"); #endif } @@ -330,7 +339,7 @@ exit: entropy_free( &entropy ); #if defined(_WIN32) - printf( " + Press Enter to exit this program.\n" ); + polarssl_printf( " + Press Enter to exit this program.\n" ); fflush( stdout ); getchar(); #endif diff --git a/programs/x509/cert_write.c b/programs/x509/cert_write.c index 5c7dd8637..c67188868 100644 --- a/programs/x509/cert_write.c +++ b/programs/x509/cert_write.c @@ -26,6 +26,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #include #include #include @@ -39,7 +48,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf( "POLARSSL_X509_CRT_WRITE_C and/or POLARSSL_X509_CRT_PARSE_C and/or " + polarssl_printf( "POLARSSL_X509_CRT_WRITE_C and/or POLARSSL_X509_CRT_PARSE_C and/or " "POLARSSL_FS_IO and/or " "POLARSSL_ENTROPY_C and/or POLARSSL_CTR_DRBG_C and/or " "POLARSSL_ERROR_C not defined.\n"); @@ -216,7 +225,7 @@ int main( int argc, char *argv[] ) if( argc == 0 ) { usage: - printf( USAGE ); + polarssl_printf( USAGE ); ret = 1; goto exit; } @@ -358,12 +367,12 @@ int main( int argc, char *argv[] ) goto usage; } - printf("\n"); + polarssl_printf("\n"); /* * 0. Seed the PRNG */ - printf( " . Seeding the random number generator..." ); + polarssl_printf( " . Seeding the random number generator..." ); fflush( stdout ); entropy_init( &entropy ); @@ -372,25 +381,25 @@ int main( int argc, char *argv[] ) strlen( pers ) ) ) != 0 ) { polarssl_strerror( ret, buf, 1024 ); - printf( " failed\n ! ctr_drbg_init returned %d - %s\n", ret, buf ); + polarssl_printf( " failed\n ! ctr_drbg_init returned %d - %s\n", ret, buf ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); // Parse serial to MPI // - printf( " . Reading serial number..." ); + polarssl_printf( " . Reading serial number..." ); fflush( stdout ); if( ( ret = mpi_read_string( &serial, 10, opt.serial ) ) != 0 ) { polarssl_strerror( ret, buf, 1024 ); - printf( " failed\n ! mpi_read_string returned -0x%02x - %s\n\n", -ret, buf ); + polarssl_printf( " failed\n ! mpi_read_string returned -0x%02x - %s\n\n", -ret, buf ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); // Parse issuer certificate if present // @@ -399,13 +408,13 @@ int main( int argc, char *argv[] ) /* * 1.0.a. Load the certificates */ - printf( " . Loading the issuer certificate ..." ); + polarssl_printf( " . Loading the issuer certificate ..." ); fflush( stdout ); if( ( ret = x509_crt_parse_file( &issuer_crt, opt.issuer_crt ) ) != 0 ) { polarssl_strerror( ret, buf, 1024 ); - printf( " failed\n ! x509_crt_parse_file returned -0x%02x - %s\n\n", -ret, buf ); + polarssl_printf( " failed\n ! x509_crt_parse_file returned -0x%02x - %s\n\n", -ret, buf ); goto exit; } @@ -414,13 +423,13 @@ int main( int argc, char *argv[] ) if( ret < 0 ) { polarssl_strerror( ret, buf, 1024 ); - printf( " failed\n ! x509_dn_gets returned -0x%02x - %s\n\n", -ret, buf ); + polarssl_printf( " failed\n ! x509_dn_gets returned -0x%02x - %s\n\n", -ret, buf ); goto exit; } opt.issuer_name = issuer_name; - printf( " ok\n" ); + polarssl_printf( " ok\n" ); } #if defined(POLARSSL_X509_CSR_PARSE_C) @@ -431,13 +440,13 @@ int main( int argc, char *argv[] ) /* * 1.0.b. Load the CSR */ - printf( " . Loading the certificate request ..." ); + polarssl_printf( " . Loading the certificate request ..." ); fflush( stdout ); if( ( ret = x509_csr_parse_file( &csr, opt.request_file ) ) != 0 ) { polarssl_strerror( ret, buf, 1024 ); - printf( " failed\n ! x509_csr_parse_file returned -0x%02x - %s\n\n", -ret, buf ); + polarssl_printf( " failed\n ! x509_csr_parse_file returned -0x%02x - %s\n\n", -ret, buf ); goto exit; } @@ -446,14 +455,14 @@ int main( int argc, char *argv[] ) if( ret < 0 ) { polarssl_strerror( ret, buf, 1024 ); - printf( " failed\n ! x509_dn_gets returned -0x%02x - %s\n\n", -ret, buf ); + polarssl_printf( " failed\n ! x509_dn_gets returned -0x%02x - %s\n\n", -ret, buf ); goto exit; } opt.subject_name = subject_name; subject_key = &csr.pk; - printf( " ok\n" ); + polarssl_printf( " ok\n" ); } #endif /* POLARSSL_X509_CSR_PARSE_C */ @@ -462,7 +471,7 @@ int main( int argc, char *argv[] ) */ if( !opt.selfsign && !strlen( opt.request_file ) ) { - printf( " . Loading the subject key ..." ); + polarssl_printf( " . Loading the subject key ..." ); fflush( stdout ); ret = pk_parse_keyfile( &loaded_subject_key, opt.subject_key, @@ -470,14 +479,14 @@ int main( int argc, char *argv[] ) if( ret != 0 ) { polarssl_strerror( ret, buf, 1024 ); - printf( " failed\n ! pk_parse_keyfile returned -0x%02x - %s\n\n", -ret, buf ); + polarssl_printf( " failed\n ! pk_parse_keyfile returned -0x%02x - %s\n\n", -ret, buf ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); } - printf( " . Loading the issuer key ..." ); + polarssl_printf( " . Loading the issuer key ..." ); fflush( stdout ); ret = pk_parse_keyfile( &loaded_issuer_key, opt.issuer_key, @@ -485,7 +494,7 @@ int main( int argc, char *argv[] ) if( ret != 0 ) { polarssl_strerror( ret, buf, 1024 ); - printf( " failed\n ! pk_parse_keyfile returned -x%02x - %s\n\n", -ret, buf ); + polarssl_printf( " failed\n ! pk_parse_keyfile returned -x%02x - %s\n\n", -ret, buf ); goto exit; } @@ -499,13 +508,13 @@ int main( int argc, char *argv[] ) mpi_cmp_mpi( &pk_rsa( issuer_crt.pk )->E, &pk_rsa( *issuer_key )->E ) != 0 ) { - printf( " failed\n ! issuer_key does not match issuer certificate\n\n" ); + polarssl_printf( " failed\n ! issuer_key does not match issuer certificate\n\n" ); ret = -1; goto exit; } } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); if( opt.selfsign ) { @@ -522,25 +531,25 @@ int main( int argc, char *argv[] ) if( ( ret = x509write_crt_set_subject_name( &crt, opt.subject_name ) ) != 0 ) { polarssl_strerror( ret, buf, 1024 ); - printf( " failed\n ! x509write_crt_set_subject_name returned -0x%02x - %s\n\n", -ret, buf ); + polarssl_printf( " failed\n ! x509write_crt_set_subject_name returned -0x%02x - %s\n\n", -ret, buf ); goto exit; } if( ( ret = x509write_crt_set_issuer_name( &crt, opt.issuer_name ) ) != 0 ) { polarssl_strerror( ret, buf, 1024 ); - printf( " failed\n ! x509write_crt_set_issuer_name returned -0x%02x - %s\n\n", -ret, buf ); + polarssl_printf( " failed\n ! x509write_crt_set_issuer_name returned -0x%02x - %s\n\n", -ret, buf ); goto exit; } - printf( " . Setting certificate values ..." ); + polarssl_printf( " . Setting certificate values ..." ); fflush( stdout ); ret = x509write_crt_set_serial( &crt, &serial ); if( ret != 0 ) { polarssl_strerror( ret, buf, 1024 ); - printf( " failed\n ! x509write_crt_set_serial returned -0x%02x - %s\n\n", -ret, buf ); + polarssl_printf( " failed\n ! x509write_crt_set_serial returned -0x%02x - %s\n\n", -ret, buf ); goto exit; } @@ -548,13 +557,13 @@ int main( int argc, char *argv[] ) if( ret != 0 ) { polarssl_strerror( ret, buf, 1024 ); - printf( " failed\n ! x509write_crt_set_validity returned -0x%02x - %s\n\n", -ret, buf ); + polarssl_printf( " failed\n ! x509write_crt_set_validity returned -0x%02x - %s\n\n", -ret, buf ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); - printf( " . Adding the Basic Constraints extension ..." ); + polarssl_printf( " . Adding the Basic Constraints extension ..." ); fflush( stdout ); ret = x509write_crt_set_basic_constraints( &crt, opt.is_ca, @@ -562,87 +571,87 @@ int main( int argc, char *argv[] ) if( ret != 0 ) { polarssl_strerror( ret, buf, 1024 ); - printf( " failed\n ! x509write_crt_set_basic_contraints returned -0x%02x - %s\n\n", -ret, buf ); + polarssl_printf( " failed\n ! x509write_crt_set_basic_contraints returned -0x%02x - %s\n\n", -ret, buf ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); #if defined(POLARSSL_SHA1_C) - printf( " . Adding the Subject Key Identifier ..." ); + polarssl_printf( " . Adding the Subject Key Identifier ..." ); fflush( stdout ); ret = x509write_crt_set_subject_key_identifier( &crt ); if( ret != 0 ) { polarssl_strerror( ret, buf, 1024 ); - printf( " failed\n ! x509write_crt_set_subject_key_identifier returned -0x%02x - %s\n\n", -ret, buf ); + polarssl_printf( " failed\n ! x509write_crt_set_subject_key_identifier returned -0x%02x - %s\n\n", -ret, buf ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); - printf( " . Adding the Authority Key Identifier ..." ); + polarssl_printf( " . Adding the Authority Key Identifier ..." ); fflush( stdout ); ret = x509write_crt_set_authority_key_identifier( &crt ); if( ret != 0 ) { polarssl_strerror( ret, buf, 1024 ); - printf( " failed\n ! x509write_crt_set_authority_key_identifier returned -0x%02x - %s\n\n", -ret, buf ); + polarssl_printf( " failed\n ! x509write_crt_set_authority_key_identifier returned -0x%02x - %s\n\n", -ret, buf ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); #endif /* POLARSSL_SHA1_C */ if( opt.key_usage ) { - printf( " . Adding the Key Usage extension ..." ); + polarssl_printf( " . Adding the Key Usage extension ..." ); fflush( stdout ); ret = x509write_crt_set_key_usage( &crt, opt.key_usage ); if( ret != 0 ) { polarssl_strerror( ret, buf, 1024 ); - printf( " failed\n ! x509write_crt_set_key_usage returned -0x%02x - %s\n\n", -ret, buf ); + polarssl_printf( " failed\n ! x509write_crt_set_key_usage returned -0x%02x - %s\n\n", -ret, buf ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); } if( opt.ns_cert_type ) { - printf( " . Adding the NS Cert Type extension ..." ); + polarssl_printf( " . Adding the NS Cert Type extension ..." ); fflush( stdout ); ret = x509write_crt_set_ns_cert_type( &crt, opt.ns_cert_type ); if( ret != 0 ) { polarssl_strerror( ret, buf, 1024 ); - printf( " failed\n ! x509write_crt_set_ns_cert_type returned -0x%02x - %s\n\n", -ret, buf ); + polarssl_printf( " failed\n ! x509write_crt_set_ns_cert_type returned -0x%02x - %s\n\n", -ret, buf ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); } /* * 1.2. Writing the request */ - printf( " . Writing the certificate..." ); + polarssl_printf( " . Writing the certificate..." ); fflush( stdout ); if( ( ret = write_certificate( &crt, opt.output_file, ctr_drbg_random, &ctr_drbg ) ) != 0 ) { polarssl_strerror( ret, buf, 1024 ); - printf( " failed\n ! write_certifcate -0x%02x - %s\n\n", -ret, buf ); + polarssl_printf( " failed\n ! write_certifcate -0x%02x - %s\n\n", -ret, buf ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); exit: x509write_crt_free( &crt ); @@ -653,7 +662,7 @@ exit: entropy_free( &entropy ); #if defined(_WIN32) - printf( " + Press Enter to exit this program.\n" ); + polarssl_printf( " + Press Enter to exit this program.\n" ); fflush( stdout ); getchar(); #endif diff --git a/programs/x509/crl_app.c b/programs/x509/crl_app.c index 4d914524b..4097554f3 100644 --- a/programs/x509/crl_app.c +++ b/programs/x509/crl_app.c @@ -26,6 +26,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #include #include #include @@ -39,7 +48,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf("POLARSSL_BIGNUM_C and/or POLARSSL_RSA_C and/or " + polarssl_printf("POLARSSL_BIGNUM_C and/or POLARSSL_RSA_C and/or " "POLARSSL_X509_CRL_PARSE_C and/or POLARSSL_FS_IO not defined.\n"); return( 0 ); } @@ -78,7 +87,7 @@ int main( int argc, char *argv[] ) if( argc == 0 ) { usage: - printf( USAGE ); + polarssl_printf( USAGE ); goto exit; } @@ -100,39 +109,39 @@ int main( int argc, char *argv[] ) /* * 1.1. Load the CRL */ - printf( "\n . Loading the CRL ..." ); + polarssl_printf( "\n . Loading the CRL ..." ); fflush( stdout ); ret = x509_crl_parse_file( &crl, opt.filename ); if( ret != 0 ) { - printf( " failed\n ! x509_crl_parse_file returned %d\n\n", ret ); + polarssl_printf( " failed\n ! x509_crl_parse_file returned %d\n\n", ret ); x509_crl_free( &crl ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); /* * 1.2 Print the CRL */ - printf( " . CRL information ...\n" ); + polarssl_printf( " . CRL information ...\n" ); ret = x509_crl_info( (char *) buf, sizeof( buf ) - 1, " ", &crl ); if( ret == -1 ) { - printf( " failed\n ! x509_crl_info returned %d\n\n", ret ); + polarssl_printf( " failed\n ! x509_crl_info returned %d\n\n", ret ); x509_crl_free( &crl ); goto exit; } - printf( "%s\n", buf ); + polarssl_printf( "%s\n", buf ); exit: x509_crl_free( &crl ); #if defined(_WIN32) - printf( " + Press Enter to exit this program.\n" ); + polarssl_printf( " + Press Enter to exit this program.\n" ); fflush( stdout ); getchar(); #endif diff --git a/programs/x509/req_app.c b/programs/x509/req_app.c index ced2d3ecc..3d8504455 100644 --- a/programs/x509/req_app.c +++ b/programs/x509/req_app.c @@ -26,6 +26,15 @@ #include POLARSSL_CONFIG_FILE #endif +#if defined(POLARSSL_PLATFORM_C) +#include "polarssl/platform.h" +#else +#define polarssl_printf printf +#define polarssl_fprintf fprintf +#define polarssl_malloc malloc +#define polarssl_free free +#endif + #include #include #include @@ -39,7 +48,7 @@ int main( int argc, char *argv[] ) ((void) argc); ((void) argv); - printf("POLARSSL_BIGNUM_C and/or POLARSSL_RSA_C and/or " + polarssl_printf("POLARSSL_BIGNUM_C and/or POLARSSL_RSA_C and/or " "POLARSSL_X509_CSR_PARSE_C and/or POLARSSL_FS_IO not defined.\n"); return( 0 ); } @@ -78,7 +87,7 @@ int main( int argc, char *argv[] ) if( argc == 0 ) { usage: - printf( USAGE ); + polarssl_printf( USAGE ); goto exit; } @@ -100,39 +109,39 @@ int main( int argc, char *argv[] ) /* * 1.1. Load the CSR */ - printf( "\n . Loading the CSR ..." ); + polarssl_printf( "\n . Loading the CSR ..." ); fflush( stdout ); ret = x509_csr_parse_file( &csr, opt.filename ); if( ret != 0 ) { - printf( " failed\n ! x509_csr_parse_file returned %d\n\n", ret ); + polarssl_printf( " failed\n ! x509_csr_parse_file returned %d\n\n", ret ); x509_csr_free( &csr ); goto exit; } - printf( " ok\n" ); + polarssl_printf( " ok\n" ); /* * 1.2 Print the CSR */ - printf( " . CSR information ...\n" ); + polarssl_printf( " . CSR information ...\n" ); ret = x509_csr_info( (char *) buf, sizeof( buf ) - 1, " ", &csr ); if( ret == -1 ) { - printf( " failed\n ! x509_csr_info returned %d\n\n", ret ); + polarssl_printf( " failed\n ! x509_csr_info returned %d\n\n", ret ); x509_csr_free( &csr ); goto exit; } - printf( "%s\n", buf ); + polarssl_printf( "%s\n", buf ); exit: x509_csr_free( &csr ); #if defined(_WIN32) - printf( " + Press Enter to exit this program.\n" ); + polarssl_printf( " + Press Enter to exit this program.\n" ); fflush( stdout ); getchar(); #endif From 7c9e75a8363cc83d24f95d491c25b405fb4ca67d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Mon, 19 Jan 2015 16:07:53 +0000 Subject: [PATCH 25/46] Remove a few useless #defines --- programs/aes/aescrypt2.c | 2 -- programs/aes/crypt_and_hash.c | 2 -- programs/hash/generic_sum.c | 2 -- programs/hash/hello.c | 3 --- programs/hash/md5sum.c | 2 -- programs/hash/sha1sum.c | 2 -- programs/hash/sha2sum.c | 2 -- programs/pkey/dh_client.c | 3 --- programs/pkey/dh_genprime.c | 3 --- programs/pkey/dh_server.c | 3 --- programs/pkey/ecdsa.c | 3 --- programs/pkey/gen_key.c | 3 --- programs/pkey/key_app.c | 3 --- programs/pkey/key_app_writer.c | 3 --- programs/pkey/mpi_demo.c | 3 --- programs/pkey/pk_decrypt.c | 3 --- programs/pkey/pk_encrypt.c | 2 -- programs/pkey/pk_sign.c | 3 --- programs/pkey/pk_verify.c | 3 --- programs/pkey/rsa_decrypt.c | 3 --- programs/pkey/rsa_encrypt.c | 2 -- programs/pkey/rsa_genkey.c | 3 --- programs/pkey/rsa_sign.c | 2 -- programs/pkey/rsa_sign_pss.c | 3 --- programs/pkey/rsa_verify.c | 3 --- programs/pkey/rsa_verify_pss.c | 3 --- programs/random/gen_entropy.c | 2 -- programs/random/gen_random_ctr_drbg.c | 2 -- programs/random/gen_random_havege.c | 2 -- programs/ssl/ssl_client1.c | 2 -- programs/ssl/ssl_client2.c | 2 -- programs/ssl/ssl_fork_server.c | 2 -- programs/ssl/ssl_mail_client.c | 2 -- programs/ssl/ssl_pthread_server.c | 2 -- programs/ssl/ssl_server.c | 2 -- programs/test/benchmark.c | 3 --- programs/test/o_p_test.c | 3 --- programs/test/selftest.c | 3 --- programs/test/ssl_cert_test.c | 3 --- programs/util/pem2der.c | 1 - programs/util/strerror.c | 3 --- programs/x509/cert_app.c | 2 -- programs/x509/cert_req.c | 3 --- programs/x509/cert_write.c | 3 --- programs/x509/crl_app.c | 3 --- programs/x509/req_app.c | 3 --- 46 files changed, 117 deletions(-) diff --git a/programs/aes/aescrypt2.c b/programs/aes/aescrypt2.c index db20db456..55f925180 100644 --- a/programs/aes/aescrypt2.c +++ b/programs/aes/aescrypt2.c @@ -31,8 +31,6 @@ #else #define polarssl_printf printf #define polarssl_fprintf fprintf -#define polarssl_malloc malloc -#define polarssl_free free #endif #if defined(_WIN32) diff --git a/programs/aes/crypt_and_hash.c b/programs/aes/crypt_and_hash.c index 231849830..9e4f6967e 100644 --- a/programs/aes/crypt_and_hash.c +++ b/programs/aes/crypt_and_hash.c @@ -32,8 +32,6 @@ #else #define polarssl_printf printf #define polarssl_fprintf fprintf -#define polarssl_malloc malloc -#define polarssl_free free #endif #if defined(_WIN32) diff --git a/programs/hash/generic_sum.c b/programs/hash/generic_sum.c index 5af63f5e7..d8c626c8f 100644 --- a/programs/hash/generic_sum.c +++ b/programs/hash/generic_sum.c @@ -31,8 +31,6 @@ #else #define polarssl_printf printf #define polarssl_fprintf fprintf -#define polarssl_malloc malloc -#define polarssl_free free #endif #include diff --git a/programs/hash/hello.c b/programs/hash/hello.c index 083dc9d95..c6edf3330 100644 --- a/programs/hash/hello.c +++ b/programs/hash/hello.c @@ -30,9 +30,6 @@ #include "polarssl/platform.h" #else #define polarssl_printf printf -#define polarssl_fprintf fprintf -#define polarssl_malloc malloc -#define polarssl_free free #endif #include diff --git a/programs/hash/md5sum.c b/programs/hash/md5sum.c index 2efe8cf29..7dc5fdbe4 100644 --- a/programs/hash/md5sum.c +++ b/programs/hash/md5sum.c @@ -31,8 +31,6 @@ #else #define polarssl_printf printf #define polarssl_fprintf fprintf -#define polarssl_malloc malloc -#define polarssl_free free #endif #include diff --git a/programs/hash/sha1sum.c b/programs/hash/sha1sum.c index b5ad22353..cc5b42ef3 100644 --- a/programs/hash/sha1sum.c +++ b/programs/hash/sha1sum.c @@ -31,8 +31,6 @@ #else #define polarssl_printf printf #define polarssl_fprintf fprintf -#define polarssl_malloc malloc -#define polarssl_free free #endif #include diff --git a/programs/hash/sha2sum.c b/programs/hash/sha2sum.c index aee4e63e0..659c2717a 100644 --- a/programs/hash/sha2sum.c +++ b/programs/hash/sha2sum.c @@ -31,8 +31,6 @@ #else #define polarssl_printf printf #define polarssl_fprintf fprintf -#define polarssl_malloc malloc -#define polarssl_free free #endif #include diff --git a/programs/pkey/dh_client.c b/programs/pkey/dh_client.c index 355810387..31250bd1e 100644 --- a/programs/pkey/dh_client.c +++ b/programs/pkey/dh_client.c @@ -30,9 +30,6 @@ #include "polarssl/platform.h" #else #define polarssl_printf printf -#define polarssl_fprintf fprintf -#define polarssl_malloc malloc -#define polarssl_free free #endif #include diff --git a/programs/pkey/dh_genprime.c b/programs/pkey/dh_genprime.c index df12e185d..8aabeedac 100644 --- a/programs/pkey/dh_genprime.c +++ b/programs/pkey/dh_genprime.c @@ -30,9 +30,6 @@ #include "polarssl/platform.h" #else #define polarssl_printf printf -#define polarssl_fprintf fprintf -#define polarssl_malloc malloc -#define polarssl_free free #endif #include diff --git a/programs/pkey/dh_server.c b/programs/pkey/dh_server.c index b9b3a50d8..8c93ba1e1 100644 --- a/programs/pkey/dh_server.c +++ b/programs/pkey/dh_server.c @@ -30,9 +30,6 @@ #include "polarssl/platform.h" #else #define polarssl_printf printf -#define polarssl_fprintf fprintf -#define polarssl_malloc malloc -#define polarssl_free free #endif #include diff --git a/programs/pkey/ecdsa.c b/programs/pkey/ecdsa.c index aaec2497b..f30ec487f 100644 --- a/programs/pkey/ecdsa.c +++ b/programs/pkey/ecdsa.c @@ -30,9 +30,6 @@ #include "polarssl/platform.h" #else #define polarssl_printf printf -#define polarssl_fprintf fprintf -#define polarssl_malloc malloc -#define polarssl_free free #endif #include "polarssl/entropy.h" diff --git a/programs/pkey/gen_key.c b/programs/pkey/gen_key.c index e96878627..2fd60d47c 100644 --- a/programs/pkey/gen_key.c +++ b/programs/pkey/gen_key.c @@ -30,9 +30,6 @@ #include "polarssl/platform.h" #else #define polarssl_printf printf -#define polarssl_fprintf fprintf -#define polarssl_malloc malloc -#define polarssl_free free #endif #include diff --git a/programs/pkey/key_app.c b/programs/pkey/key_app.c index a161829f2..418653cce 100644 --- a/programs/pkey/key_app.c +++ b/programs/pkey/key_app.c @@ -30,9 +30,6 @@ #include "polarssl/platform.h" #else #define polarssl_printf printf -#define polarssl_fprintf fprintf -#define polarssl_malloc malloc -#define polarssl_free free #endif #include diff --git a/programs/pkey/key_app_writer.c b/programs/pkey/key_app_writer.c index 6862835e6..dad2c13f9 100644 --- a/programs/pkey/key_app_writer.c +++ b/programs/pkey/key_app_writer.c @@ -30,9 +30,6 @@ #include "polarssl/platform.h" #else #define polarssl_printf printf -#define polarssl_fprintf fprintf -#define polarssl_malloc malloc -#define polarssl_free free #endif #include diff --git a/programs/pkey/mpi_demo.c b/programs/pkey/mpi_demo.c index bf277fd58..93535b3ee 100644 --- a/programs/pkey/mpi_demo.c +++ b/programs/pkey/mpi_demo.c @@ -30,9 +30,6 @@ #include "polarssl/platform.h" #else #define polarssl_printf printf -#define polarssl_fprintf fprintf -#define polarssl_malloc malloc -#define polarssl_free free #endif #include diff --git a/programs/pkey/pk_decrypt.c b/programs/pkey/pk_decrypt.c index 314aad3ec..6fcc4af14 100644 --- a/programs/pkey/pk_decrypt.c +++ b/programs/pkey/pk_decrypt.c @@ -30,9 +30,6 @@ #include "polarssl/platform.h" #else #define polarssl_printf printf -#define polarssl_fprintf fprintf -#define polarssl_malloc malloc -#define polarssl_free free #endif #include diff --git a/programs/pkey/pk_encrypt.c b/programs/pkey/pk_encrypt.c index 9f2984939..121e3b199 100644 --- a/programs/pkey/pk_encrypt.c +++ b/programs/pkey/pk_encrypt.c @@ -31,8 +31,6 @@ #else #define polarssl_printf printf #define polarssl_fprintf fprintf -#define polarssl_malloc malloc -#define polarssl_free free #endif #include diff --git a/programs/pkey/pk_sign.c b/programs/pkey/pk_sign.c index d03269113..3f3b85f41 100644 --- a/programs/pkey/pk_sign.c +++ b/programs/pkey/pk_sign.c @@ -30,9 +30,6 @@ #include "polarssl/platform.h" #else #define polarssl_printf printf -#define polarssl_fprintf fprintf -#define polarssl_malloc malloc -#define polarssl_free free #endif #include diff --git a/programs/pkey/pk_verify.c b/programs/pkey/pk_verify.c index 89e9cc1be..0ceb60151 100644 --- a/programs/pkey/pk_verify.c +++ b/programs/pkey/pk_verify.c @@ -30,9 +30,6 @@ #include "polarssl/platform.h" #else #define polarssl_printf printf -#define polarssl_fprintf fprintf -#define polarssl_malloc malloc -#define polarssl_free free #endif #include diff --git a/programs/pkey/rsa_decrypt.c b/programs/pkey/rsa_decrypt.c index 1e187a83f..215669cca 100644 --- a/programs/pkey/rsa_decrypt.c +++ b/programs/pkey/rsa_decrypt.c @@ -30,9 +30,6 @@ #include "polarssl/platform.h" #else #define polarssl_printf printf -#define polarssl_fprintf fprintf -#define polarssl_malloc malloc -#define polarssl_free free #endif #include diff --git a/programs/pkey/rsa_encrypt.c b/programs/pkey/rsa_encrypt.c index e8c00d33d..e3cd90ad5 100644 --- a/programs/pkey/rsa_encrypt.c +++ b/programs/pkey/rsa_encrypt.c @@ -31,8 +31,6 @@ #else #define polarssl_printf printf #define polarssl_fprintf fprintf -#define polarssl_malloc malloc -#define polarssl_free free #endif #include diff --git a/programs/pkey/rsa_genkey.c b/programs/pkey/rsa_genkey.c index 955f819f7..95bc823f3 100644 --- a/programs/pkey/rsa_genkey.c +++ b/programs/pkey/rsa_genkey.c @@ -30,9 +30,6 @@ #include "polarssl/platform.h" #else #define polarssl_printf printf -#define polarssl_fprintf fprintf -#define polarssl_malloc malloc -#define polarssl_free free #endif #include diff --git a/programs/pkey/rsa_sign.c b/programs/pkey/rsa_sign.c index 27d14743b..e854f70a3 100644 --- a/programs/pkey/rsa_sign.c +++ b/programs/pkey/rsa_sign.c @@ -31,8 +31,6 @@ #else #define polarssl_printf printf #define polarssl_fprintf fprintf -#define polarssl_malloc malloc -#define polarssl_free free #endif #include diff --git a/programs/pkey/rsa_sign_pss.c b/programs/pkey/rsa_sign_pss.c index 3c9cbdb21..252bbf27d 100644 --- a/programs/pkey/rsa_sign_pss.c +++ b/programs/pkey/rsa_sign_pss.c @@ -30,9 +30,6 @@ #include "polarssl/platform.h" #else #define polarssl_printf printf -#define polarssl_fprintf fprintf -#define polarssl_malloc malloc -#define polarssl_free free #endif #include diff --git a/programs/pkey/rsa_verify.c b/programs/pkey/rsa_verify.c index 43b742edf..4e00bdde4 100644 --- a/programs/pkey/rsa_verify.c +++ b/programs/pkey/rsa_verify.c @@ -30,9 +30,6 @@ #include "polarssl/platform.h" #else #define polarssl_printf printf -#define polarssl_fprintf fprintf -#define polarssl_malloc malloc -#define polarssl_free free #endif #include diff --git a/programs/pkey/rsa_verify_pss.c b/programs/pkey/rsa_verify_pss.c index 3f792621a..673618446 100644 --- a/programs/pkey/rsa_verify_pss.c +++ b/programs/pkey/rsa_verify_pss.c @@ -30,9 +30,6 @@ #include "polarssl/platform.h" #else #define polarssl_printf printf -#define polarssl_fprintf fprintf -#define polarssl_malloc malloc -#define polarssl_free free #endif #include diff --git a/programs/random/gen_entropy.c b/programs/random/gen_entropy.c index 5234f0174..f18d37951 100644 --- a/programs/random/gen_entropy.c +++ b/programs/random/gen_entropy.c @@ -31,8 +31,6 @@ #else #define polarssl_printf printf #define polarssl_fprintf fprintf -#define polarssl_malloc malloc -#define polarssl_free free #endif #include "polarssl/entropy.h" diff --git a/programs/random/gen_random_ctr_drbg.c b/programs/random/gen_random_ctr_drbg.c index 5889d1120..60c0f0142 100644 --- a/programs/random/gen_random_ctr_drbg.c +++ b/programs/random/gen_random_ctr_drbg.c @@ -31,8 +31,6 @@ #else #define polarssl_printf printf #define polarssl_fprintf fprintf -#define polarssl_malloc malloc -#define polarssl_free free #endif #include "polarssl/entropy.h" diff --git a/programs/random/gen_random_havege.c b/programs/random/gen_random_havege.c index d9b60512c..c1b420aa2 100644 --- a/programs/random/gen_random_havege.c +++ b/programs/random/gen_random_havege.c @@ -31,8 +31,6 @@ #else #define polarssl_printf printf #define polarssl_fprintf fprintf -#define polarssl_malloc malloc -#define polarssl_free free #endif #include "polarssl/havege.h" diff --git a/programs/ssl/ssl_client1.c b/programs/ssl/ssl_client1.c index 9964936e8..c8a61c20d 100644 --- a/programs/ssl/ssl_client1.c +++ b/programs/ssl/ssl_client1.c @@ -31,8 +31,6 @@ #else #define polarssl_printf printf #define polarssl_fprintf fprintf -#define polarssl_malloc malloc -#define polarssl_free free #endif #include diff --git a/programs/ssl/ssl_client2.c b/programs/ssl/ssl_client2.c index 247d14936..1573b8f5f 100644 --- a/programs/ssl/ssl_client2.c +++ b/programs/ssl/ssl_client2.c @@ -31,8 +31,6 @@ #else #define polarssl_printf printf #define polarssl_fprintf fprintf -#define polarssl_malloc malloc -#define polarssl_free free #endif #if !defined(POLARSSL_ENTROPY_C) || \ diff --git a/programs/ssl/ssl_fork_server.c b/programs/ssl/ssl_fork_server.c index d1b4a6a6f..990749ef9 100644 --- a/programs/ssl/ssl_fork_server.c +++ b/programs/ssl/ssl_fork_server.c @@ -31,8 +31,6 @@ #else #define polarssl_printf printf #define polarssl_fprintf fprintf -#define polarssl_malloc malloc -#define polarssl_free free #endif #if defined(_WIN32) diff --git a/programs/ssl/ssl_mail_client.c b/programs/ssl/ssl_mail_client.c index 00d12ca96..31c0b6ee8 100644 --- a/programs/ssl/ssl_mail_client.c +++ b/programs/ssl/ssl_mail_client.c @@ -31,8 +31,6 @@ #else #define polarssl_printf printf #define polarssl_fprintf fprintf -#define polarssl_malloc malloc -#define polarssl_free free #endif #include diff --git a/programs/ssl/ssl_pthread_server.c b/programs/ssl/ssl_pthread_server.c index 9e59e7ce5..4a6db7aef 100644 --- a/programs/ssl/ssl_pthread_server.c +++ b/programs/ssl/ssl_pthread_server.c @@ -32,8 +32,6 @@ #else #define polarssl_printf printf #define polarssl_fprintf fprintf -#define polarssl_malloc malloc -#define polarssl_free free #endif #if defined(_WIN32) diff --git a/programs/ssl/ssl_server.c b/programs/ssl/ssl_server.c index 7c6a25584..c9360d943 100644 --- a/programs/ssl/ssl_server.c +++ b/programs/ssl/ssl_server.c @@ -31,8 +31,6 @@ #else #define polarssl_printf printf #define polarssl_fprintf fprintf -#define polarssl_malloc malloc -#define polarssl_free free #endif #if defined(_WIN32) diff --git a/programs/test/benchmark.c b/programs/test/benchmark.c index 6b505e962..7e77f6cd3 100644 --- a/programs/test/benchmark.c +++ b/programs/test/benchmark.c @@ -30,9 +30,6 @@ #include "polarssl/platform.h" #else #define polarssl_printf printf -#define polarssl_fprintf fprintf -#define polarssl_malloc malloc -#define polarssl_free free #endif #include diff --git a/programs/test/o_p_test.c b/programs/test/o_p_test.c index 6cbf299c3..ce1e522b7 100644 --- a/programs/test/o_p_test.c +++ b/programs/test/o_p_test.c @@ -30,9 +30,6 @@ #include "polarssl/platform.h" #else #define polarssl_printf printf -#define polarssl_fprintf fprintf -#define polarssl_malloc malloc -#define polarssl_free free #endif #include diff --git a/programs/test/selftest.c b/programs/test/selftest.c index 339b07c34..301d6c322 100644 --- a/programs/test/selftest.c +++ b/programs/test/selftest.c @@ -30,9 +30,6 @@ #include "polarssl/platform.h" #else #define polarssl_printf printf -#define polarssl_fprintf fprintf -#define polarssl_malloc malloc -#define polarssl_free free #endif #include diff --git a/programs/test/ssl_cert_test.c b/programs/test/ssl_cert_test.c index 30e95c95e..c55090a97 100644 --- a/programs/test/ssl_cert_test.c +++ b/programs/test/ssl_cert_test.c @@ -30,9 +30,6 @@ #include "polarssl/platform.h" #else #define polarssl_printf printf -#define polarssl_fprintf fprintf -#define polarssl_malloc malloc -#define polarssl_free free #endif #include diff --git a/programs/util/pem2der.c b/programs/util/pem2der.c index 95543b719..dcd3547f4 100644 --- a/programs/util/pem2der.c +++ b/programs/util/pem2der.c @@ -30,7 +30,6 @@ #include "polarssl/platform.h" #else #define polarssl_printf printf -#define polarssl_fprintf fprintf #define polarssl_malloc malloc #define polarssl_free free #endif diff --git a/programs/util/strerror.c b/programs/util/strerror.c index a4db94c86..b751ca066 100644 --- a/programs/util/strerror.c +++ b/programs/util/strerror.c @@ -30,9 +30,6 @@ #include "polarssl/platform.h" #else #define polarssl_printf printf -#define polarssl_fprintf fprintf -#define polarssl_malloc malloc -#define polarssl_free free #endif #include diff --git a/programs/x509/cert_app.c b/programs/x509/cert_app.c index 92b913009..b7f5950ad 100644 --- a/programs/x509/cert_app.c +++ b/programs/x509/cert_app.c @@ -31,8 +31,6 @@ #else #define polarssl_printf printf #define polarssl_fprintf fprintf -#define polarssl_malloc malloc -#define polarssl_free free #endif #include diff --git a/programs/x509/cert_req.c b/programs/x509/cert_req.c index 33c3588a8..41eaea1a4 100644 --- a/programs/x509/cert_req.c +++ b/programs/x509/cert_req.c @@ -30,9 +30,6 @@ #include "polarssl/platform.h" #else #define polarssl_printf printf -#define polarssl_fprintf fprintf -#define polarssl_malloc malloc -#define polarssl_free free #endif #include diff --git a/programs/x509/cert_write.c b/programs/x509/cert_write.c index c67188868..b402fb16e 100644 --- a/programs/x509/cert_write.c +++ b/programs/x509/cert_write.c @@ -30,9 +30,6 @@ #include "polarssl/platform.h" #else #define polarssl_printf printf -#define polarssl_fprintf fprintf -#define polarssl_malloc malloc -#define polarssl_free free #endif #include diff --git a/programs/x509/crl_app.c b/programs/x509/crl_app.c index 4097554f3..8d10e3bd2 100644 --- a/programs/x509/crl_app.c +++ b/programs/x509/crl_app.c @@ -30,9 +30,6 @@ #include "polarssl/platform.h" #else #define polarssl_printf printf -#define polarssl_fprintf fprintf -#define polarssl_malloc malloc -#define polarssl_free free #endif #include diff --git a/programs/x509/req_app.c b/programs/x509/req_app.c index 3d8504455..bf9610af2 100644 --- a/programs/x509/req_app.c +++ b/programs/x509/req_app.c @@ -30,9 +30,6 @@ #include "polarssl/platform.h" #else #define polarssl_printf printf -#define polarssl_fprintf fprintf -#define polarssl_malloc malloc -#define polarssl_free free #endif #include From c9e0483b426fab18a4bce24f0e5bf6bb93758ab0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Mon, 19 Jan 2015 16:24:23 +0000 Subject: [PATCH 26/46] Update Changelog --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index 0d40eb8d5..67a728d50 100644 --- a/ChangeLog +++ b/ChangeLog @@ -66,6 +66,7 @@ Changes at runtime with ssl_set_truncated_hmac(). * Example programs for SSL client and server now disable SSLv3 by default. * Example programs for SSL client and server now disable RC4 by default. + * Use platform.h in all test suites and programs. = PolarSSL 1.3.9 released 2014-10-20 Security From 478fac40759e66e061ba09cbdb349bfcba9b3d87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Mon, 19 Jan 2015 16:40:56 +0000 Subject: [PATCH 27/46] Fix usage string of ssl_client2 Found by Hannes Mehnert --- programs/ssl/ssl_client2.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/programs/ssl/ssl_client2.c b/programs/ssl/ssl_client2.c index 1573b8f5f..11af9065c 100644 --- a/programs/ssl/ssl_client2.c +++ b/programs/ssl/ssl_client2.c @@ -347,7 +347,7 @@ static int my_verify( void *data, x509_crt *crt, int depth, int *flags ) " nbio=%%d default: 0 (blocking I/O)\n" \ " options: 1 (non-blocking), 2 (added delays)\n" \ "\n" \ - " auth_mode=%%s default: \"optional\"\n" \ + " auth_mode=%%s default: \"required\"\n" \ " options: none, optional, required\n" \ USAGE_IO \ "\n" \ @@ -372,8 +372,6 @@ static int my_verify( void *data, x509_crt *crt, int depth, int *flags ) " arc4=%%d default: 0 (disabled)\n" \ " force_version=%%s default: \"\" (none)\n" \ " options: ssl3, tls1, tls1_1, tls1_2\n" \ - " auth_mode=%%s default: \"required\"\n" \ - " options: none, optional, required\n" \ "\n" \ " force_ciphersuite= default: all enabled\n"\ " acceptable ciphersuite names:\n" From d1e7e8ba05d9fbb968953e18f631fbf5af47be4a Mon Sep 17 00:00:00 2001 From: James Cowgill Date: Tue, 16 Dec 2014 15:24:06 +0000 Subject: [PATCH 28/46] Fix mips64 bignum implementation - Use correct mips64 define (__mips64, not __mips64__). - Added mips64 to the list of arches supporting 64-bit ints. --- include/polarssl/bignum.h | 2 +- include/polarssl/bn_mul.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/polarssl/bignum.h b/include/polarssl/bignum.h index 7c3961e5e..7794ef25b 100644 --- a/include/polarssl/bignum.h +++ b/include/polarssl/bignum.h @@ -148,7 +148,7 @@ typedef uint32_t t_udbl; defined(__ppc64__) || defined(__powerpc64__) || \ defined(__ia64__) || defined(__alpha__) || \ (defined(__sparc__) && defined(__arch64__)) || \ - defined(__s390x__) ) ) + defined(__s390x__) || defined(__mips64) ) ) #define POLARSSL_HAVE_INT64 typedef int64_t t_sint; typedef uint64_t t_uint; diff --git a/include/polarssl/bn_mul.h b/include/polarssl/bn_mul.h index f7199ef97..0179b9797 100644 --- a/include/polarssl/bn_mul.h +++ b/include/polarssl/bn_mul.h @@ -680,7 +680,7 @@ ); #endif /* Alpha */ -#if defined(__mips__) && !defined(__mips64__) +#if defined(__mips__) && !defined(__mips64) #define MULADDC_INIT \ asm( \ From 9d7fc16dbf06ab56e51be984889bc3d4319678df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Mon, 19 Jan 2015 17:16:54 +0000 Subject: [PATCH 29/46] Update Changelog --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index 67a728d50..d9716df47 100644 --- a/ChangeLog +++ b/ChangeLog @@ -49,6 +49,7 @@ Bugfix multiple of 8 (found by Gergely Budai). * Fix unchecked return code in x509_crt_parse_path() on Windows (found by Peter Vaskovic). + * Fix assembly selection for MIPS64 (thanks to James Cowgill). Changes * Use deterministic nonces for AEAD ciphers in TLS by default (possible to From cc334eff3eb2a37efcda3728607b29f1e1210bb2 Mon Sep 17 00:00:00 2001 From: wslfa Date: Sun, 28 Dec 2014 00:55:41 +0800 Subject: [PATCH 30/46] aescrypt2.c local char array not initial I change the main() function to a normal function, use many threads call it. so, in concurrent situation, these initial operation is necessary. --- programs/aes/aescrypt2.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/programs/aes/aescrypt2.c b/programs/aes/aescrypt2.c index 55f925180..63ea51c61 100644 --- a/programs/aes/aescrypt2.c +++ b/programs/aes/aescrypt2.c @@ -116,6 +116,10 @@ int main( int argc, char *argv[] ) } mode = atoi( argv[1] ); + memset(IV, 0, sizeof(IV)); + memset(key, 0, sizeof(key)); + memset(digest, 0, sizeof(digest)); + memset(buffer, 0, sizeof(buffer)); if( mode != MODE_ENCRYPT && mode != MODE_DECRYPT ) { From e89163c0a83eadb58812f92e563f50c712833cce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Fri, 23 Jan 2015 14:30:57 +0000 Subject: [PATCH 31/46] Fix bug in ssl_get_verify_result() --- ChangeLog | 2 ++ include/polarssl/ssl.h | 10 +++++----- library/ssl_tls.c | 8 +++++++- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index d9716df47..b43a5d8e5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -50,6 +50,8 @@ Bugfix * Fix unchecked return code in x509_crt_parse_path() on Windows (found by Peter Vaskovic). * Fix assembly selection for MIPS64 (thanks to James Cowgill). + * ssl_get_verify_result() now works even if the handshake was aborted due + to a failed verification (found by Fredrik Axelsson). Changes * Use deterministic nonces for AEAD ciphers in TLS by default (possible to diff --git a/include/polarssl/ssl.h b/include/polarssl/ssl.h index efeece59d..189af05f8 100644 --- a/include/polarssl/ssl.h +++ b/include/polarssl/ssl.h @@ -1710,11 +1710,11 @@ size_t ssl_get_bytes_avail( const ssl_context *ssl ); * * \param ssl SSL context * - * \return 0 if successful, or a combination of: - * BADCERT_EXPIRED - * BADCERT_REVOKED - * BADCERT_CN_MISMATCH - * BADCERT_NOT_TRUSTED + * \return 0 if successful, + * -1 if result is not available (eg because the handshake was + * aborted too early), or + * a combination of BADCERT_xxx and BADCRL_xxx flags, see + * x509.h */ int ssl_get_verify_result( const ssl_context *ssl ); diff --git a/library/ssl_tls.c b/library/ssl_tls.c index fceb9b805..7383e1c3b 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -4336,7 +4336,13 @@ size_t ssl_get_bytes_avail( const ssl_context *ssl ) int ssl_get_verify_result( const ssl_context *ssl ) { - return( ssl->session->verify_result ); + if( ssl->session != NULL ) + return( ssl->session->verify_result ); + + if( ssl->session_negotiate != NULL ) + return( ssl->session_negotiate->verify_result ); + + return( -1 ); } const char *ssl_get_ciphersuite( const ssl_context *ssl ) From ceedb8292e98428e218a09cb795b9aec98bb179f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Fri, 23 Jan 2015 15:02:43 +0000 Subject: [PATCH 32/46] Fix possible portability issue The & 0xFF should not be necessary on platforms with 8-bit chars, but one user reported having problems with his compiler on such a platform. --- library/aes.c | 12 ++++++------ library/md4.c | 12 ++++++------ library/md5.c | 12 ++++++------ library/ripemd160.c | 12 ++++++------ 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/library/aes.c b/library/aes.c index 07eaca925..38683ee33 100644 --- a/library/aes.c +++ b/library/aes.c @@ -69,12 +69,12 @@ static void polarssl_zeroize( void *v, size_t n ) { #endif #ifndef PUT_UINT32_LE -#define PUT_UINT32_LE(n,b,i) \ -{ \ - (b)[(i) ] = (unsigned char) ( (n) ); \ - (b)[(i) + 1] = (unsigned char) ( (n) >> 8 ); \ - (b)[(i) + 2] = (unsigned char) ( (n) >> 16 ); \ - (b)[(i) + 3] = (unsigned char) ( (n) >> 24 ); \ +#define PUT_UINT32_LE(n,b,i) \ +{ \ + (b)[(i) ] = (unsigned char) ( ( (n) ) & 0xFF ); \ + (b)[(i) + 1] = (unsigned char) ( ( (n) >> 8 ) & 0xFF ); \ + (b)[(i) + 2] = (unsigned char) ( ( (n) >> 16 ) & 0xFF ); \ + (b)[(i) + 3] = (unsigned char) ( ( (n) >> 24 ) & 0xFF ); \ } #endif diff --git a/library/md4.c b/library/md4.c index 842420b2b..cf5f9a97b 100644 --- a/library/md4.c +++ b/library/md4.c @@ -67,12 +67,12 @@ static void polarssl_zeroize( void *v, size_t n ) { #endif #ifndef PUT_UINT32_LE -#define PUT_UINT32_LE(n,b,i) \ -{ \ - (b)[(i) ] = (unsigned char) ( (n) ); \ - (b)[(i) + 1] = (unsigned char) ( (n) >> 8 ); \ - (b)[(i) + 2] = (unsigned char) ( (n) >> 16 ); \ - (b)[(i) + 3] = (unsigned char) ( (n) >> 24 ); \ +#define PUT_UINT32_LE(n,b,i) \ +{ \ + (b)[(i) ] = (unsigned char) ( ( (n) ) & 0xFF ); \ + (b)[(i) + 1] = (unsigned char) ( ( (n) >> 8 ) & 0xFF ); \ + (b)[(i) + 2] = (unsigned char) ( ( (n) >> 16 ) & 0xFF ); \ + (b)[(i) + 3] = (unsigned char) ( ( (n) >> 24 ) & 0xFF ); \ } #endif diff --git a/library/md5.c b/library/md5.c index fc8644922..a09bba3e6 100644 --- a/library/md5.c +++ b/library/md5.c @@ -66,12 +66,12 @@ static void polarssl_zeroize( void *v, size_t n ) { #endif #ifndef PUT_UINT32_LE -#define PUT_UINT32_LE(n,b,i) \ -{ \ - (b)[(i) ] = (unsigned char) ( (n) ); \ - (b)[(i) + 1] = (unsigned char) ( (n) >> 8 ); \ - (b)[(i) + 2] = (unsigned char) ( (n) >> 16 ); \ - (b)[(i) + 3] = (unsigned char) ( (n) >> 24 ); \ +#define PUT_UINT32_LE(n,b,i) \ +{ \ + (b)[(i) ] = (unsigned char) ( ( (n) ) & 0xFF ); \ + (b)[(i) + 1] = (unsigned char) ( ( (n) >> 8 ) & 0xFF ); \ + (b)[(i) + 2] = (unsigned char) ( ( (n) >> 16 ) & 0xFF ); \ + (b)[(i) + 3] = (unsigned char) ( ( (n) >> 24 ) & 0xFF ); \ } #endif diff --git a/library/ripemd160.c b/library/ripemd160.c index c8433e736..a909cf7e7 100644 --- a/library/ripemd160.c +++ b/library/ripemd160.c @@ -64,12 +64,12 @@ #endif #ifndef PUT_UINT32_LE -#define PUT_UINT32_LE(n,b,i) \ -{ \ - (b)[(i) ] = (unsigned char) ( (n) ); \ - (b)[(i) + 1] = (unsigned char) ( (n) >> 8 ); \ - (b)[(i) + 2] = (unsigned char) ( (n) >> 16 ); \ - (b)[(i) + 3] = (unsigned char) ( (n) >> 24 ); \ +#define PUT_UINT32_LE(n,b,i) \ +{ \ + (b)[(i) ] = (unsigned char) ( ( (n) ) & 0xFF ); \ + (b)[(i) + 1] = (unsigned char) ( ( (n) >> 8 ) & 0xFF ); \ + (b)[(i) + 2] = (unsigned char) ( ( (n) >> 16 ) & 0xFF ); \ + (b)[(i) + 3] = (unsigned char) ( ( (n) >> 24 ) & 0xFF ); \ } #endif From 607d663b419f84ee9592a0c8bb10fb120ef26503 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Mon, 26 Jan 2015 11:17:20 +0000 Subject: [PATCH 33/46] Add debug info for cert/suite selection --- ChangeLog | 2 ++ include/polarssl/ssl.h | 2 +- library/error.c | 2 +- library/ssl_srv.c | 53 +++++++++++++++++++++++++++++++++++++----- 4 files changed, 51 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index b43a5d8e5..7c8466866 100644 --- a/ChangeLog +++ b/ChangeLog @@ -35,6 +35,8 @@ Features a compatible enough libc (eg uClibc). * Add ssl_set_arc4_support() to make it easier to disable RC4 at runtime while using the default ciphersuite list. + * Added new error codes and debug messages about selection of + ciphersuite/certificate. Bugfix * Stack buffer overflow if ctr_drbg_update() is called with too large diff --git a/include/polarssl/ssl.h b/include/polarssl/ssl.h index 189af05f8..4fd1a5cf8 100644 --- a/include/polarssl/ssl.h +++ b/include/polarssl/ssl.h @@ -149,7 +149,7 @@ #define POLARSSL_ERR_SSL_INTERNAL_ERROR -0x6C00 /**< Internal error (eg, unexpected failure in lower-level module) */ #define POLARSSL_ERR_SSL_COUNTER_WRAPPING -0x6B80 /**< A counter would wrap (eg, too many messages exchanged). */ #define POLARSSL_ERR_SSL_WAITING_SERVER_HELLO_RENEGO -0x6B00 /**< Unexpected message at ServerHello in renegotiation. */ -#define POLARSSL_ERR_SSL_NO_USABLE_CIPHERSUITE -0x6A80 /**< None of the common ciphersuites is usable (eg, no suitable certificate) */ +#define POLARSSL_ERR_SSL_NO_USABLE_CIPHERSUITE -0x6A80 /**< None of the common ciphersuites is usable (eg, no suitable certificate, see debug messages). */ /* * Various constants diff --git a/library/error.c b/library/error.c index 3fbec5d9d..44b11426b 100644 --- a/library/error.c +++ b/library/error.c @@ -450,7 +450,7 @@ void polarssl_strerror( int ret, char *buf, size_t buflen ) if( use_ret == -(POLARSSL_ERR_SSL_WAITING_SERVER_HELLO_RENEGO) ) snprintf( buf, buflen, "SSL - Unexpected message at ServerHello in renegotiation" ); if( use_ret == -(POLARSSL_ERR_SSL_NO_USABLE_CIPHERSUITE) ) - snprintf( buf, buflen, "SSL - None of the common ciphersuites is usable (eg, no suitable certificate)" ); + snprintf( buf, buflen, "SSL - None of the common ciphersuites is usable (eg, no suitable certificate, see debug messages)" ); #endif /* POLARSSL_SSL_TLS_C */ #if defined(POLARSSL_X509_USE_C) || defined(POLARSSL_X509_CREATE_C) diff --git a/library/ssl_srv.c b/library/ssl_srv.c index be17b58a9..359f57f2a 100644 --- a/library/ssl_srv.c +++ b/library/ssl_srv.c @@ -839,10 +839,18 @@ static int ssl_pick_cert( ssl_context *ssl, if( pk_alg == POLARSSL_PK_NONE ) return( 0 ); + SSL_DEBUG_MSG( 3, ( "ciphersuite requires certificate" ) ); + for( cur = list; cur != NULL; cur = cur->next ) { + SSL_DEBUG_CRT( 3, "candidate certificate chain, certificate", + cur->cert ); + if( ! pk_can_do( cur->key, pk_alg ) ) + { + SSL_DEBUG_MSG( 3, ( "certificate mismatch: key type" ) ); continue; + } /* * This avoids sending the client a cert it'll reject based on @@ -855,13 +863,18 @@ static int ssl_pick_cert( ssl_context *ssl, if( ssl_check_cert_usage( cur->cert, ciphersuite_info, SSL_IS_SERVER ) != 0 ) { + SSL_DEBUG_MSG( 3, ( "certificate mismatch: " + "(extended) key usage extension" ) ); continue; } #if defined(POLARSSL_ECDSA_C) if( pk_alg == POLARSSL_PK_ECDSA && ssl_check_key_curve( cur->key, ssl->handshake->curves ) != 0 ) + { + SSL_DEBUG_MSG( 3, ( "certificate mismatch: elliptic curve" ) ); continue; + } #endif /* @@ -874,22 +887,27 @@ static int ssl_pick_cert( ssl_context *ssl, { if( fallback == NULL ) fallback = cur; + { + SSL_DEBUG_MSG( 3, ( "certificate not preferred: " + "sha-2 with pre-TLS 1.2 client" ) ); continue; + } } /* If we get there, we got a winner */ break; } + if( cur == NULL ) + cur = fallback; + + + /* Do not update ssl->handshake->key_cert unless the is a match */ if( cur != NULL ) { ssl->handshake->key_cert = cur; - return( 0 ); - } - - if( fallback != NULL ) - { - ssl->handshake->key_cert = fallback; + SSL_DEBUG_CRT( 3, "selected certificate chain, certificate", + ssl->handshake->key_cert->cert ); return( 0 ); } @@ -913,19 +931,31 @@ static int ssl_ciphersuite_match( ssl_context *ssl, int suite_id, return( POLARSSL_ERR_SSL_INTERNAL_ERROR ); } + SSL_DEBUG_MSG( 3, ( "trying ciphersuite: %s", suite_info->name ) ); + if( suite_info->min_minor_ver > ssl->minor_ver || suite_info->max_minor_ver < ssl->minor_ver ) + { + SSL_DEBUG_MSG( 3, ( "ciphersuite mismatch: version" ) ); return( 0 ); + } if( ssl->arc4_disabled == SSL_ARC4_DISABLED && suite_info->cipher == POLARSSL_CIPHER_ARC4_128 ) + { + SSL_DEBUG_MSG( 3, ( "ciphersuite mismatch: rc4" ) ); return( 0 ); + } #if defined(POLARSSL_ECDH_C) || defined(POLARSSL_ECDSA_C) if( ssl_ciphersuite_uses_ec( suite_info ) && ( ssl->handshake->curves == NULL || ssl->handshake->curves[0] == NULL ) ) + { + SSL_DEBUG_MSG( 3, ( "ciphersuite mismatch: " + "no common elliptic curve" ) ); return( 0 ); + } #endif #if defined(POLARSSL_KEY_EXCHANGE__SOME__PSK_ENABLED) @@ -935,7 +965,10 @@ static int ssl_ciphersuite_match( ssl_context *ssl, int suite_id, ssl->f_psk == NULL && ( ssl->psk == NULL || ssl->psk_identity == NULL || ssl->psk_identity_len == 0 || ssl->psk_len == 0 ) ) + { + SSL_DEBUG_MSG( 3, ( "ciphersuite mismatch: no pre-shared key" ) ); return( 0 ); + } #endif #if defined(POLARSSL_X509_CRT_PARSE_C) @@ -947,7 +980,11 @@ static int ssl_ciphersuite_match( ssl_context *ssl, int suite_id, * This must be done last since we modify the key_cert list. */ if( ssl_pick_cert( ssl, suite_info ) != 0 ) + { + SSL_DEBUG_MSG( 3, ( "ciphersuite mismatch: " + "no suitable certificate" ) ); return( 0 ); + } #endif *ciphersuite_info = suite_info; @@ -1197,6 +1234,8 @@ static int ssl_parse_client_hello_v2( ssl_context *ssl ) } have_ciphersuite_v2: + SSL_DEBUG_MSG( 2, ( "selected ciphersuite: %s", ciphersuite_info->name ) ); + ssl->session_negotiate->ciphersuite = ciphersuites[i]; ssl->transform_negotiate->ciphersuite_info = ciphersuite_info; ssl_optimize_checksum( ssl, ssl->transform_negotiate->ciphersuite_info ); @@ -1755,6 +1794,8 @@ static int ssl_parse_client_hello( ssl_context *ssl ) } have_ciphersuite: + SSL_DEBUG_MSG( 2, ( "selected ciphersuite: %s", ciphersuite_info->name ) ); + ssl->session_negotiate->ciphersuite = ciphersuites[i]; ssl->transform_negotiate->ciphersuite_info = ciphersuite_info; ssl_optimize_checksum( ssl, ssl->transform_negotiate->ciphersuite_info ); From 7cbe1318d888081a4bf24ca6a14f4fd2aabacadf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Mon, 26 Jan 2015 15:16:40 +0000 Subject: [PATCH 34/46] Fix more stdio inclusion issues --- library/x509.c | 3 --- library/x509_crt.c | 3 --- 2 files changed, 6 deletions(-) diff --git a/library/x509.c b/library/x509.c index bf45d5b8f..7ddeb2f37 100644 --- a/library/x509.c +++ b/library/x509.c @@ -61,12 +61,9 @@ #include #endif -#if defined(EFIX64) || defined(EFI32) #include -#endif #if defined(POLARSSL_FS_IO) -#include #if !defined(_WIN32) #include #include diff --git a/library/x509_crt.c b/library/x509_crt.c index 31e3bc43d..ec5469b8b 100644 --- a/library/x509_crt.c +++ b/library/x509_crt.c @@ -63,12 +63,9 @@ #include #endif -#if defined(EFIX64) || defined(EFI32) #include -#endif #if defined(POLARSSL_FS_IO) -#include #if !defined(_WIN32) || defined(EFIX64) || defined(EFI32) #include #include From 8984cc8a71848c9d6eb7d114481b4643a9e83074 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Wed, 28 Jan 2015 11:09:25 +0100 Subject: [PATCH 35/46] Add script for polarssl symlink creation --- scripts/polarssl_symlinks.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 scripts/polarssl_symlinks.sh diff --git a/scripts/polarssl_symlinks.sh b/scripts/polarssl_symlinks.sh new file mode 100755 index 000000000..a14ff3280 --- /dev/null +++ b/scripts/polarssl_symlinks.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +# Create libpolarssl.* symlinks in the given directory + +if [ $# -ne 1 ]; then + echo "Usage: $0 " >&2 + exit 1 +fi + +if [ -d "$1" ]; then :; else + echo "$0: target directory must exist" >&2 + exit 1 +fi + +if cd "$1"; then :; else + echo "$0: cd '$1' failed" >&2 + exit 1 +fi + +if ls | grep 'libmbedtls\.' >/dev/null; then :; else + echo "$0: libmbedtls not found in target directory" >&2 + exit 1 +fi + +for f in libmbedtls.*; do + ln -sf $f libpolarssl${f#libmbedtls} +done From 2a9c8b62bffe43c21619f31d46c6fcf7d272462d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Wed, 28 Jan 2015 14:42:13 +0100 Subject: [PATCH 36/46] Add cmake compatibility targets --- library/CMakeLists.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt index f738b3b2e..ed4a10e02 100644 --- a/library/CMakeLists.txt +++ b/library/CMakeLists.txt @@ -133,3 +133,24 @@ if(USE_SHARED_MBEDTLS_LIBRARY) DESTINATION ${LIB_INSTALL_DIR} PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) endif(USE_SHARED_MBEDTLS_LIBRARY) + +if(UNIX) + add_custom_target(polarssl + DEPENDS mbedtls # TODO: and mbedtls_static is shared is defined + COMMAND ${CMAKE_SOURCE_DIR}/scripts/polarssl_symlinks.sh ${CMAKE_BINARY_DIR}/library + ) + + if(USE_STATIC_MBEDTLS_LIBRARY AND USE_SHARED_MBEDTLS_LIBRARY) + add_dependencies(polarssl mbedtls_static) + endif() + + add_custom_target(polarssl-clean + COMMAND make clean + COMMAND rm -f ${CMAKE_BINARY_DIR}/library/libpolarssl.* + ) + + add_custom_target(polarssl-install + COMMAND make install + COMMAND ${CMAKE_SOURCE_DIR}/scripts/polarssl_symlinks.sh ${DESTDIR}/${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR} + ) +endif(UNIX) From 64a57996375126527a47e908195057cbd781b880 Mon Sep 17 00:00:00 2001 From: veggie Date: Mon, 26 Jan 2015 10:35:25 -0500 Subject: [PATCH 37/46] Minor nits with stdout/stderr. --- programs/random/gen_entropy.c | 7 ++++--- programs/random/gen_random_ctr_drbg.c | 6 +++--- programs/random/gen_random_havege.c | 6 +++--- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/programs/random/gen_entropy.c b/programs/random/gen_entropy.c index f18d37951..a3785b98d 100644 --- a/programs/random/gen_entropy.c +++ b/programs/random/gen_entropy.c @@ -62,7 +62,7 @@ int main( int argc, char *argv[] ) if( ( f = fopen( argv[1], "wb+" ) ) == NULL ) { - polarssl_printf( "failed to open '%s' for writing.\n", argv[0] ); + polarssl_printf( "failed to open '%s' for writing.\n", argv[1] ); return( 1 ); } @@ -79,14 +79,15 @@ int main( int argc, char *argv[] ) fwrite( buf, 1, sizeof( buf ), f ); - polarssl_printf( "Generating 32Mb of data in file '%s'... %04.1f" \ - "%% done\r", argv[1], (100 * (float) (i + 1)) / k ); + polarssl_printf( "Generating %ldkb of data in file '%s'... %04.1f" \ + "%% done\r", (long)(sizeof(buf) * k / 1024), argv[1], (100 * (float) (i + 1)) / k ); fflush( stdout ); } ret = 0; cleanup: + printf( "\n" ); fclose( f ); entropy_free( &entropy ); diff --git a/programs/random/gen_random_ctr_drbg.c b/programs/random/gen_random_ctr_drbg.c index 60c0f0142..d35e35d80 100644 --- a/programs/random/gen_random_ctr_drbg.c +++ b/programs/random/gen_random_ctr_drbg.c @@ -64,7 +64,7 @@ int main( int argc, char *argv[] ) if( ( f = fopen( argv[1], "wb+" ) ) == NULL ) { - polarssl_printf( "failed to open '%s' for writing.\n", argv[0] ); + polarssl_printf( "failed to open '%s' for writing.\n", argv[1] ); return( 1 ); } @@ -108,8 +108,8 @@ int main( int argc, char *argv[] ) fwrite( buf, 1, sizeof( buf ), f ); - polarssl_printf( "Generating 32Mb of data in file '%s'... %04.1f" \ - "%% done\r", argv[1], (100 * (float) (i + 1)) / k ); + polarssl_printf( "Generating %ldkb of data in file '%s'... %04.1f" \ + "%% done\r", (long)(sizeof(buf) * k / 1024), argv[1], (100 * (float) (i + 1)) / k ); fflush( stdout ); } diff --git a/programs/random/gen_random_havege.c b/programs/random/gen_random_havege.c index c1b420aa2..289609005 100644 --- a/programs/random/gen_random_havege.c +++ b/programs/random/gen_random_havege.c @@ -64,7 +64,7 @@ int main( int argc, char *argv[] ) if( ( f = fopen( argv[1], "wb+" ) ) == NULL ) { - polarssl_printf( "failed to open '%s' for writing.\n", argv[0] ); + polarssl_printf( "failed to open '%s' for writing.\n", argv[1] ); return( 1 ); } @@ -84,8 +84,8 @@ int main( int argc, char *argv[] ) fwrite( buf, sizeof( buf ), 1, f ); - polarssl_printf( "Generating 32Mb of data in file '%s'... %04.1f" \ - "%% done\r", argv[1], (100 * (float) (i + 1)) / k ); + polarssl_printf( "Generating %ldkb of data in file '%s'... %04.1f" \ + "%% done\r", (long)(sizeof(buf) * k / 1024), argv[1], (100 * (float) (i + 1)) / k ); fflush( stdout ); } From ee7d599904bf6da68b0becd651f820e9cbac5c65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Wed, 28 Jan 2015 14:02:38 +0000 Subject: [PATCH 38/46] Fix misattribution --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 7c8466866..9fa3d30cd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,7 +6,7 @@ Reminder: bump SONAME for ABI change (FALLBACK_SCSV, session-hash, EtM) Security * NULL pointer dereference in the buffer-based allocator when the buffer is - full and polarssl_free() is called (found by Jean-Philippe Aumasson) + full and polarssl_free() is called (found by Mark Hasemeyer) (only possible if POLARSSL_MEMORY_BUFFER_ALLOC_C is enabled, which it is not by default). * Fix remotely-triggerable uninitialised pointer dereference caused by From f3046efb2475c86485ff919794c2b1bf6a517112 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Wed, 28 Jan 2015 14:13:30 +0000 Subject: [PATCH 39/46] Re-categorize changelog entry --- ChangeLog | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9fa3d30cd..517b45e7f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -54,6 +54,10 @@ Bugfix * Fix assembly selection for MIPS64 (thanks to James Cowgill). * ssl_get_verify_result() now works even if the handshake was aborted due to a failed verification (found by Fredrik Axelsson). + * Skip writing and parsing signature_algorithm extension if none of the + key exchanges enabled needs certificates. This fixes a possible interop + issue with some servers when a zero-length extension was sent. (Reported + by Peter Dettman.) Changes * Use deterministic nonces for AEAD ciphers in TLS by default (possible to @@ -62,8 +66,6 @@ Changes * ssl_set_own_cert() now returns an error on key-certificate mismatch. * Forbid repeated extensions in X.509 certificates. * debug_print_buf() now prints a text view in addition to hexadecimal. - * Skip writing and parsing signature_algorithm extension if none of the - key exchanges enabled needs certificates. * A specific error is now returned when there are ciphersuites in common but none of them is usable due to external factors such as no certificate with a suitable (extended)KeyUsage or curve or no PSK set. From 72f42d7a5278437b7bd6c422402c7d55c2b58a9c Mon Sep 17 00:00:00 2001 From: Matyas Dolak Date: Tue, 27 Jan 2015 15:49:19 +0100 Subject: [PATCH 40/46] Ignore CMake/MSVC-related build files. --- .gitignore | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.gitignore b/.gitignore index fdd50b245..b42ce61a4 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,17 @@ Coverage *.gcno *.gcda library/polarssl.info + +# MSVC files generated by CMake: +*.sln +*.vcxproj +*.filters + +# MSVC build artifacts: +*.exe +*.pdb +*.ilk +*.lib + +# CMake generates *.dir/ folders for in-tree builds (used by MSVC projects), ignore all of those: +*.dir/ From 3f738ca40a931a5b70070d82e4123239506e1ec8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Wed, 28 Jan 2015 15:33:23 +0000 Subject: [PATCH 41/46] Move some ignore patterns to subdirectories --- .gitignore | 2 -- include/.gitignore | 2 ++ library/.gitignore | 2 ++ programs/.gitignore | 3 +++ tests/.gitignore | 3 +++ 5 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index b42ce61a4..7dfad2df8 100644 --- a/.gitignore +++ b/.gitignore @@ -9,8 +9,6 @@ Coverage library/polarssl.info # MSVC files generated by CMake: -*.sln -*.vcxproj *.filters # MSVC build artifacts: diff --git a/include/.gitignore b/include/.gitignore index f3c7a7c5d..feab4e235 100644 --- a/include/.gitignore +++ b/include/.gitignore @@ -1 +1,3 @@ Makefile +*.sln +*.vcxproj diff --git a/library/.gitignore b/library/.gitignore index 872219be4..39d257a11 100644 --- a/library/.gitignore +++ b/library/.gitignore @@ -1,3 +1,5 @@ *.o libpolarssl* libmbedtls.* +*.sln +*.vcxproj diff --git a/programs/.gitignore b/programs/.gitignore index a47ef0662..ae8617f1c 100644 --- a/programs/.gitignore +++ b/programs/.gitignore @@ -1,4 +1,7 @@ */Makefile +*.sln +*.vcxproj + aes/aescrypt2 aes/crypt_and_hash hash/generic_sum diff --git a/tests/.gitignore b/tests/.gitignore index 6590f0fca..3c9b0cf25 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -1,3 +1,6 @@ +*.sln +*.vcxproj + *.log /test_suite* data_files/mpi_write From 78dbeeffd3521ebdf5819a2c41b2852d3853ef78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Wed, 28 Jan 2015 15:34:01 +0000 Subject: [PATCH 42/46] Minor gitginore fixes --- .gitignore | 1 - library/.gitignore | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 7dfad2df8..bbf7822b2 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,6 @@ Testing Coverage *.gcno *.gcda -library/polarssl.info # MSVC files generated by CMake: *.filters diff --git a/library/.gitignore b/library/.gitignore index 39d257a11..09d13d269 100644 --- a/library/.gitignore +++ b/library/.gitignore @@ -1,5 +1,5 @@ *.o -libpolarssl* +libpolarssl.* libmbedtls.* *.sln *.vcxproj From 94de33140bb0d33052472632f16f731f7ef00f2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Wed, 28 Jan 2015 16:32:36 +0000 Subject: [PATCH 43/46] Fix dependency that was not checked --- include/polarssl/check_config.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/polarssl/check_config.h b/include/polarssl/check_config.h index e6df92f21..62975a9b6 100644 --- a/include/polarssl/check_config.h +++ b/include/polarssl/check_config.h @@ -181,6 +181,11 @@ #error "POLARSSL_PEM_WRITE_C defined, but not all prerequisites" #endif +#if defined(POLARSSL_PK_C) && \ + ( !defined(POLARSSL_RSA_C) && !defined(POLARSSL_ECP_C) ) +#error "POLARSSL_PK_C defined, but not all prerequisites" +#endif + #if defined(POLARSSL_PK_PARSE_C) && !defined(POLARSSL_PK_C) #error "POLARSSL_PK_PARSE_C defined, but not all prerequisites" #endif From bbbb3cfba5b66d392bbe8f05775823c3d9ff151d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Wed, 28 Jan 2015 16:44:37 +0000 Subject: [PATCH 44/46] Fix depend that was checked but not documented --- include/polarssl/config.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/polarssl/config.h b/include/polarssl/config.h index ad0cceb2b..315cdce20 100644 --- a/include/polarssl/config.h +++ b/include/polarssl/config.h @@ -1017,6 +1017,8 @@ * * Enable support for RFC 6066 server name indication (SNI) in SSL. * + * Requires: POLARSSL_X509_CRT_PARSE_C + * * Comment this macro to disable support for server name indication in SSL */ #define POLARSSL_SSL_SERVER_NAME_INDICATION From 65fc6a886a8df5e850e60f5d408ee1985fcbd3aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Wed, 28 Jan 2015 16:49:26 +0000 Subject: [PATCH 45/46] Fix small bug in base64_encode() --- ChangeLog | 1 + library/base64.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/ChangeLog b/ChangeLog index 517b45e7f..f122aa6b2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -58,6 +58,7 @@ Bugfix key exchanges enabled needs certificates. This fixes a possible interop issue with some servers when a zero-length extension was sent. (Reported by Peter Dettman.) + * On a 0-length input, base64_encode() did not correctly set output length. Changes * Use deterministic nonces for AEAD ciphers in TLS by default (possible to diff --git a/library/base64.c b/library/base64.c index d3814d63f..0c6b46c7d 100644 --- a/library/base64.c +++ b/library/base64.c @@ -82,7 +82,10 @@ int base64_encode( unsigned char *dst, size_t *dlen, unsigned char *p; if( slen == 0 ) + { + *dlen = 0; return( 0 ); + } n = ( slen << 3 ) / 6; From 860b51642d94b41097e245ea0ed5c119a35ed194 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Wed, 28 Jan 2015 17:12:07 +0000 Subject: [PATCH 46/46] Fix url again --- include/polarssl/aes.h | 2 +- include/polarssl/aesni.h | 2 +- include/polarssl/arc4.h | 2 +- include/polarssl/asn1.h | 2 +- include/polarssl/asn1write.h | 2 +- include/polarssl/base64.h | 2 +- include/polarssl/bignum.h | 2 +- include/polarssl/blowfish.h | 2 +- include/polarssl/bn_mul.h | 2 +- include/polarssl/camellia.h | 2 +- include/polarssl/ccm.h | 2 +- include/polarssl/certs.h | 2 +- include/polarssl/check_config.h | 2 +- include/polarssl/cipher.h | 2 +- include/polarssl/cipher_wrap.h | 2 +- include/polarssl/compat-1.2.h | 2 +- include/polarssl/config.h | 2 +- include/polarssl/ctr_drbg.h | 2 +- include/polarssl/debug.h | 2 +- include/polarssl/des.h | 2 +- include/polarssl/dhm.h | 2 +- include/polarssl/ecdh.h | 2 +- include/polarssl/ecdsa.h | 2 +- include/polarssl/ecp.h | 2 +- include/polarssl/entropy.h | 2 +- include/polarssl/entropy_poll.h | 2 +- include/polarssl/error.h | 2 +- include/polarssl/gcm.h | 2 +- include/polarssl/havege.h | 2 +- include/polarssl/hmac_drbg.h | 2 +- include/polarssl/md.h | 2 +- include/polarssl/md2.h | 2 +- include/polarssl/md4.h | 2 +- include/polarssl/md5.h | 2 +- include/polarssl/md_wrap.h | 2 +- include/polarssl/memory.h | 2 +- include/polarssl/memory_buffer_alloc.h | 2 +- include/polarssl/net.h | 2 +- include/polarssl/oid.h | 2 +- include/polarssl/openssl.h | 2 +- include/polarssl/padlock.h | 2 +- include/polarssl/pbkdf2.h | 2 +- include/polarssl/pem.h | 2 +- include/polarssl/pk.h | 2 +- include/polarssl/pk_wrap.h | 2 +- include/polarssl/pkcs11.h | 2 +- include/polarssl/pkcs12.h | 2 +- include/polarssl/pkcs5.h | 2 +- include/polarssl/platform.h | 2 +- include/polarssl/ripemd160.h | 2 +- include/polarssl/rsa.h | 2 +- include/polarssl/sha1.h | 2 +- include/polarssl/sha256.h | 2 +- include/polarssl/sha512.h | 2 +- include/polarssl/ssl.h | 2 +- include/polarssl/ssl_cache.h | 2 +- include/polarssl/ssl_ciphersuites.h | 2 +- include/polarssl/threading.h | 2 +- include/polarssl/timing.h | 2 +- include/polarssl/version.h | 2 +- include/polarssl/x509.h | 2 +- include/polarssl/x509_crl.h | 2 +- include/polarssl/x509_crt.h | 2 +- include/polarssl/x509_csr.h | 2 +- include/polarssl/xtea.h | 2 +- library/aes.c | 2 +- library/aesni.c | 2 +- library/arc4.c | 2 +- library/asn1parse.c | 2 +- library/asn1write.c | 2 +- library/base64.c | 2 +- library/bignum.c | 2 +- library/blowfish.c | 2 +- library/camellia.c | 2 +- library/ccm.c | 2 +- library/certs.c | 2 +- library/cipher.c | 2 +- library/cipher_wrap.c | 2 +- library/ctr_drbg.c | 2 +- library/debug.c | 2 +- library/des.c | 2 +- library/dhm.c | 2 +- library/ecdh.c | 2 +- library/ecdsa.c | 2 +- library/ecp.c | 2 +- library/ecp_curves.c | 2 +- library/entropy.c | 2 +- library/entropy_poll.c | 2 +- library/error.c | 2 +- library/gcm.c | 2 +- library/havege.c | 2 +- library/hmac_drbg.c | 2 +- library/md.c | 2 +- library/md2.c | 2 +- library/md4.c | 2 +- library/md5.c | 2 +- library/md_wrap.c | 2 +- library/memory_buffer_alloc.c | 2 +- library/net.c | 2 +- library/oid.c | 2 +- library/padlock.c | 2 +- library/pbkdf2.c | 2 +- library/pem.c | 2 +- library/pk.c | 2 +- library/pk_wrap.c | 2 +- library/pkcs11.c | 2 +- library/pkcs12.c | 2 +- library/pkcs5.c | 2 +- library/pkparse.c | 2 +- library/pkwrite.c | 2 +- library/platform.c | 2 +- library/ripemd160.c | 2 +- library/rsa.c | 2 +- library/sha1.c | 2 +- library/sha256.c | 2 +- library/sha512.c | 2 +- library/ssl_cache.c | 2 +- library/ssl_ciphersuites.c | 2 +- library/ssl_cli.c | 2 +- library/ssl_srv.c | 2 +- library/ssl_tls.c | 2 +- library/threading.c | 2 +- library/timing.c | 2 +- library/version.c | 2 +- library/version_features.c | 2 +- library/x509.c | 2 +- library/x509_create.c | 2 +- library/x509_crl.c | 2 +- library/x509_crt.c | 2 +- library/x509_csr.c | 2 +- library/x509write_crt.c | 2 +- library/x509write_csr.c | 2 +- library/xtea.c | 2 +- programs/aes/aescrypt2.c | 2 +- programs/aes/crypt_and_hash.c | 2 +- programs/hash/generic_sum.c | 2 +- programs/hash/hello.c | 2 +- programs/hash/md5sum.c | 2 +- programs/hash/sha1sum.c | 2 +- programs/hash/sha2sum.c | 2 +- programs/pkey/dh_client.c | 2 +- programs/pkey/dh_genprime.c | 2 +- programs/pkey/dh_server.c | 2 +- programs/pkey/ecdsa.c | 2 +- programs/pkey/gen_key.c | 2 +- programs/pkey/key_app.c | 2 +- programs/pkey/key_app_writer.c | 2 +- programs/pkey/mpi_demo.c | 2 +- programs/pkey/pk_decrypt.c | 2 +- programs/pkey/pk_encrypt.c | 2 +- programs/pkey/pk_sign.c | 2 +- programs/pkey/pk_verify.c | 2 +- programs/pkey/rsa_decrypt.c | 2 +- programs/pkey/rsa_encrypt.c | 2 +- programs/pkey/rsa_genkey.c | 2 +- programs/pkey/rsa_sign.c | 2 +- programs/pkey/rsa_sign_pss.c | 2 +- programs/pkey/rsa_verify.c | 2 +- programs/pkey/rsa_verify_pss.c | 2 +- programs/random/gen_entropy.c | 2 +- programs/random/gen_random_ctr_drbg.c | 2 +- programs/random/gen_random_havege.c | 2 +- programs/ssl/ssl_client1.c | 2 +- programs/ssl/ssl_client2.c | 2 +- programs/ssl/ssl_fork_server.c | 2 +- programs/ssl/ssl_mail_client.c | 2 +- programs/ssl/ssl_pthread_server.c | 2 +- programs/ssl/ssl_server.c | 2 +- programs/ssl/ssl_server2.c | 2 +- programs/test/benchmark.c | 2 +- programs/test/o_p_test.c | 2 +- programs/test/selftest.c | 2 +- programs/test/ssl_cert_test.c | 2 +- programs/test/ssl_test.c | 2 +- programs/util/pem2der.c | 2 +- programs/util/strerror.c | 2 +- programs/wince_main.c | 2 +- programs/x509/cert_app.c | 2 +- programs/x509/cert_req.c | 2 +- programs/x509/cert_write.c | 2 +- programs/x509/crl_app.c | 2 +- programs/x509/req_app.c | 2 +- scripts/data_files/error.fmt | 2 +- scripts/data_files/version_features.fmt | 2 +- 184 files changed, 184 insertions(+), 184 deletions(-) diff --git a/include/polarssl/aes.h b/include/polarssl/aes.h index 0910479ba..1b3f1e807 100644 --- a/include/polarssl/aes.h +++ b/include/polarssl/aes.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/aesni.h b/include/polarssl/aesni.h index ea868173e..7125d6ac8 100644 --- a/include/polarssl/aesni.h +++ b/include/polarssl/aesni.h @@ -5,7 +5,7 @@ * * Copyright (C) 2013, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/arc4.h b/include/polarssl/arc4.h index 99a5e0b8f..6c9788c7e 100644 --- a/include/polarssl/arc4.h +++ b/include/polarssl/arc4.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/asn1.h b/include/polarssl/asn1.h index 14171f74f..6a8716012 100644 --- a/include/polarssl/asn1.h +++ b/include/polarssl/asn1.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2013, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/asn1write.h b/include/polarssl/asn1write.h index db40761c7..ecb82cee8 100644 --- a/include/polarssl/asn1write.h +++ b/include/polarssl/asn1write.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/base64.h b/include/polarssl/base64.h index da45b3f70..2da935b94 100644 --- a/include/polarssl/base64.h +++ b/include/polarssl/base64.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2013, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/bignum.h b/include/polarssl/bignum.h index 7794ef25b..8ffd5627f 100644 --- a/include/polarssl/bignum.h +++ b/include/polarssl/bignum.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/blowfish.h b/include/polarssl/blowfish.h index f91b38da6..a03d6d76a 100644 --- a/include/polarssl/blowfish.h +++ b/include/polarssl/blowfish.h @@ -5,7 +5,7 @@ * * Copyright (C) 2012-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/bn_mul.h b/include/polarssl/bn_mul.h index 0179b9797..55cf24caa 100644 --- a/include/polarssl/bn_mul.h +++ b/include/polarssl/bn_mul.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2010, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/camellia.h b/include/polarssl/camellia.h index 47e9f8192..dedfba9c8 100644 --- a/include/polarssl/camellia.h +++ b/include/polarssl/camellia.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/ccm.h b/include/polarssl/ccm.h index 551177c59..47c7f590f 100644 --- a/include/polarssl/ccm.h +++ b/include/polarssl/ccm.h @@ -5,7 +5,7 @@ * * Copyright (C) 2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/certs.h b/include/polarssl/certs.h index 4199b968f..5a432e4c0 100644 --- a/include/polarssl/certs.h +++ b/include/polarssl/certs.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2010, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/check_config.h b/include/polarssl/check_config.h index 62975a9b6..51b124d6d 100644 --- a/include/polarssl/check_config.h +++ b/include/polarssl/check_config.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/cipher.h b/include/polarssl/cipher.h index 7504161a6..999d24b50 100644 --- a/include/polarssl/cipher.h +++ b/include/polarssl/cipher.h @@ -7,7 +7,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/cipher_wrap.h b/include/polarssl/cipher_wrap.h index 13fc181e0..94ba5785f 100644 --- a/include/polarssl/cipher_wrap.h +++ b/include/polarssl/cipher_wrap.h @@ -7,7 +7,7 @@ * * Copyright (C) 2006-2013, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/compat-1.2.h b/include/polarssl/compat-1.2.h index b389bc08f..47a451679 100644 --- a/include/polarssl/compat-1.2.h +++ b/include/polarssl/compat-1.2.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2013, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/config.h b/include/polarssl/config.h index 315cdce20..02e8985af 100644 --- a/include/polarssl/config.h +++ b/include/polarssl/config.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/ctr_drbg.h b/include/polarssl/ctr_drbg.h index b7984cbfd..1424bd741 100644 --- a/include/polarssl/ctr_drbg.h +++ b/include/polarssl/ctr_drbg.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/debug.h b/include/polarssl/debug.h index 6393c75eb..a9d00f5ef 100644 --- a/include/polarssl/debug.h +++ b/include/polarssl/debug.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2011, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/des.h b/include/polarssl/des.h index 998ae4603..b18ca0307 100644 --- a/include/polarssl/des.h +++ b/include/polarssl/des.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/dhm.h b/include/polarssl/dhm.h index c650d9650..8d01915ff 100644 --- a/include/polarssl/dhm.h +++ b/include/polarssl/dhm.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2013, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/ecdh.h b/include/polarssl/ecdh.h index 2b92f96cd..20698f59a 100644 --- a/include/polarssl/ecdh.h +++ b/include/polarssl/ecdh.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2013, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/ecdsa.h b/include/polarssl/ecdsa.h index ac4c4a956..c5290f6a6 100644 --- a/include/polarssl/ecdsa.h +++ b/include/polarssl/ecdsa.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2013, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/ecp.h b/include/polarssl/ecp.h index 2ec234921..b7707d767 100644 --- a/include/polarssl/ecp.h +++ b/include/polarssl/ecp.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2013, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/entropy.h b/include/polarssl/entropy.h index a0dc78bef..92aa5a5be 100644 --- a/include/polarssl/entropy.h +++ b/include/polarssl/entropy.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/entropy_poll.h b/include/polarssl/entropy_poll.h index def30bc65..9c349da2a 100644 --- a/include/polarssl/entropy_poll.h +++ b/include/polarssl/entropy_poll.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2011, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/error.h b/include/polarssl/error.h index 09a949144..b642c0886 100644 --- a/include/polarssl/error.h +++ b/include/polarssl/error.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2013, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/gcm.h b/include/polarssl/gcm.h index 9fd3d353e..b61d4a902 100644 --- a/include/polarssl/gcm.h +++ b/include/polarssl/gcm.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2013, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/havege.h b/include/polarssl/havege.h index e8ec236e0..1bad2b95e 100644 --- a/include/polarssl/havege.h +++ b/include/polarssl/havege.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2013, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/hmac_drbg.h b/include/polarssl/hmac_drbg.h index caeca6a03..1df822170 100644 --- a/include/polarssl/hmac_drbg.h +++ b/include/polarssl/hmac_drbg.h @@ -5,7 +5,7 @@ * * Copyright (C) 2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/md.h b/include/polarssl/md.h index 439934ef8..33a67a332 100644 --- a/include/polarssl/md.h +++ b/include/polarssl/md.h @@ -7,7 +7,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/md2.h b/include/polarssl/md2.h index e677974b7..6727ed26f 100644 --- a/include/polarssl/md2.h +++ b/include/polarssl/md2.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/md4.h b/include/polarssl/md4.h index 72f93e8ee..774300d93 100644 --- a/include/polarssl/md4.h +++ b/include/polarssl/md4.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/md5.h b/include/polarssl/md5.h index 0823eff3a..6566eb3ff 100644 --- a/include/polarssl/md5.h +++ b/include/polarssl/md5.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2013, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/md_wrap.h b/include/polarssl/md_wrap.h index 0251a98c0..7aeb27a84 100644 --- a/include/polarssl/md_wrap.h +++ b/include/polarssl/md_wrap.h @@ -7,7 +7,7 @@ * * Copyright (C) 2006-2011, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/memory.h b/include/polarssl/memory.h index 986c0e768..5b8a3044c 100644 --- a/include/polarssl/memory.h +++ b/include/polarssl/memory.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/memory_buffer_alloc.h b/include/polarssl/memory_buffer_alloc.h index 70f1e5ba1..5f8e32970 100644 --- a/include/polarssl/memory_buffer_alloc.h +++ b/include/polarssl/memory_buffer_alloc.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/net.h b/include/polarssl/net.h index ae7f69fb5..d86732f10 100644 --- a/include/polarssl/net.h +++ b/include/polarssl/net.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2011, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/oid.h b/include/polarssl/oid.h index 15c9cf80f..309d8c518 100644 --- a/include/polarssl/oid.h +++ b/include/polarssl/oid.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/openssl.h b/include/polarssl/openssl.h index faee985b2..039f4989a 100644 --- a/include/polarssl/openssl.h +++ b/include/polarssl/openssl.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2010, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/padlock.h b/include/polarssl/padlock.h index 6a7f52d8c..af84d6348 100644 --- a/include/polarssl/padlock.h +++ b/include/polarssl/padlock.h @@ -6,7 +6,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/pbkdf2.h b/include/polarssl/pbkdf2.h index 90fb9bc05..0548ad032 100644 --- a/include/polarssl/pbkdf2.h +++ b/include/polarssl/pbkdf2.h @@ -8,7 +8,7 @@ * * Copyright (C) 2006-2012, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/pem.h b/include/polarssl/pem.h index 89504f0c7..c0775d05e 100644 --- a/include/polarssl/pem.h +++ b/include/polarssl/pem.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2013, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/pk.h b/include/polarssl/pk.h index 5dfea988b..45066168a 100644 --- a/include/polarssl/pk.h +++ b/include/polarssl/pk.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2013, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/pk_wrap.h b/include/polarssl/pk_wrap.h index bbe0c4ee7..94611029a 100644 --- a/include/polarssl/pk_wrap.h +++ b/include/polarssl/pk_wrap.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2013, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/pkcs11.h b/include/polarssl/pkcs11.h index 7cb597b93..5cf21a154 100644 --- a/include/polarssl/pkcs11.h +++ b/include/polarssl/pkcs11.h @@ -7,7 +7,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/pkcs12.h b/include/polarssl/pkcs12.h index 95529516e..4a1310250 100644 --- a/include/polarssl/pkcs12.h +++ b/include/polarssl/pkcs12.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2013, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/pkcs5.h b/include/polarssl/pkcs5.h index cb6a1e318..d9b6856b1 100644 --- a/include/polarssl/pkcs5.h +++ b/include/polarssl/pkcs5.h @@ -7,7 +7,7 @@ * * Copyright (C) 2006-2013, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/platform.h b/include/polarssl/platform.h index f2d62630b..4473d5051 100644 --- a/include/polarssl/platform.h +++ b/include/polarssl/platform.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/ripemd160.h b/include/polarssl/ripemd160.h index a8a47ee04..49c36c04c 100644 --- a/include/polarssl/ripemd160.h +++ b/include/polarssl/ripemd160.h @@ -5,7 +5,7 @@ * * Copyright (C) 2014-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/rsa.h b/include/polarssl/rsa.h index e7b6be592..53b81eada 100644 --- a/include/polarssl/rsa.h +++ b/include/polarssl/rsa.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/sha1.h b/include/polarssl/sha1.h index e3ea3d891..258a3de22 100644 --- a/include/polarssl/sha1.h +++ b/include/polarssl/sha1.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/sha256.h b/include/polarssl/sha256.h index 64bea59b8..195996dbb 100644 --- a/include/polarssl/sha256.h +++ b/include/polarssl/sha256.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/sha512.h b/include/polarssl/sha512.h index f30c30cf7..6afb8367c 100644 --- a/include/polarssl/sha512.h +++ b/include/polarssl/sha512.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/ssl.h b/include/polarssl/ssl.h index 4fd1a5cf8..387f69cb6 100644 --- a/include/polarssl/ssl.h +++ b/include/polarssl/ssl.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/ssl_cache.h b/include/polarssl/ssl_cache.h index 7b1d73cd7..3bdd94fb2 100644 --- a/include/polarssl/ssl_cache.h +++ b/include/polarssl/ssl_cache.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2013, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/ssl_ciphersuites.h b/include/polarssl/ssl_ciphersuites.h index add937b38..2a1d2ac6f 100644 --- a/include/polarssl/ssl_ciphersuites.h +++ b/include/polarssl/ssl_ciphersuites.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2013, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/threading.h b/include/polarssl/threading.h index 5ed17ee33..4a8288e4f 100644 --- a/include/polarssl/threading.h +++ b/include/polarssl/threading.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2013, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/timing.h b/include/polarssl/timing.h index 50631909b..a3eb510dc 100644 --- a/include/polarssl/timing.h +++ b/include/polarssl/timing.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/version.h b/include/polarssl/version.h index 6f5e5acda..bed886895 100644 --- a/include/polarssl/version.h +++ b/include/polarssl/version.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/x509.h b/include/polarssl/x509.h index 2474b065a..6e5f21717 100644 --- a/include/polarssl/x509.h +++ b/include/polarssl/x509.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/x509_crl.h b/include/polarssl/x509_crl.h index e8ba55b89..fa5c84956 100644 --- a/include/polarssl/x509_crl.h +++ b/include/polarssl/x509_crl.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2013, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/x509_crt.h b/include/polarssl/x509_crt.h index 2ea8aeca1..4fad932bf 100644 --- a/include/polarssl/x509_crt.h +++ b/include/polarssl/x509_crt.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2013, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/x509_csr.h b/include/polarssl/x509_csr.h index 46e3dd92c..ed6c6b5ee 100644 --- a/include/polarssl/x509_csr.h +++ b/include/polarssl/x509_csr.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/polarssl/xtea.h b/include/polarssl/xtea.h index c74246c9c..0c58ab543 100644 --- a/include/polarssl/xtea.h +++ b/include/polarssl/xtea.h @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2013, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/aes.c b/library/aes.c index 38683ee33..c579d7800 100644 --- a/library/aes.c +++ b/library/aes.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/aesni.c b/library/aesni.c index 346a05b17..d4ec9ecb1 100644 --- a/library/aesni.c +++ b/library/aesni.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/arc4.c b/library/arc4.c index 11c21547b..ef0e7f89a 100644 --- a/library/arc4.c +++ b/library/arc4.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/asn1parse.c b/library/asn1parse.c index 6db06d86d..7e8fc32fa 100644 --- a/library/asn1parse.c +++ b/library/asn1parse.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/asn1write.c b/library/asn1write.c index a6421ae70..8d92888b8 100644 --- a/library/asn1write.c +++ b/library/asn1write.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/base64.c b/library/base64.c index 0c6b46c7d..21cd3a6ce 100644 --- a/library/base64.c +++ b/library/base64.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/bignum.c b/library/bignum.c index 774603029..0eb95ee4e 100644 --- a/library/bignum.c +++ b/library/bignum.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/blowfish.c b/library/blowfish.c index 09a79a43d..4bbaaf205 100644 --- a/library/blowfish.c +++ b/library/blowfish.c @@ -3,7 +3,7 @@ * * Copyright (C) 2012-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/camellia.c b/library/camellia.c index 35ca23d53..92f74faad 100644 --- a/library/camellia.c +++ b/library/camellia.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/ccm.c b/library/ccm.c index be26aab8a..8590c2970 100644 --- a/library/ccm.c +++ b/library/ccm.c @@ -3,7 +3,7 @@ * * Copyright (C) 2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/certs.c b/library/certs.c index 8bf60b65a..78eb43e72 100644 --- a/library/certs.c +++ b/library/certs.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/cipher.c b/library/cipher.c index 29c8bd0a6..2f886d987 100644 --- a/library/cipher.c +++ b/library/cipher.c @@ -7,7 +7,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/cipher_wrap.c b/library/cipher_wrap.c index 49e6ce384..e289aa2e9 100644 --- a/library/cipher_wrap.c +++ b/library/cipher_wrap.c @@ -7,7 +7,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/ctr_drbg.c b/library/ctr_drbg.c index b602fd449..5e6384809 100644 --- a/library/ctr_drbg.c +++ b/library/ctr_drbg.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/debug.c b/library/debug.c index d08ecfbaf..24c5e7040 100644 --- a/library/debug.c +++ b/library/debug.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/des.c b/library/des.c index bfc6f32dd..6e08cf2c1 100644 --- a/library/des.c +++ b/library/des.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/dhm.c b/library/dhm.c index ebc7c0c2f..fb7826aaf 100644 --- a/library/dhm.c +++ b/library/dhm.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/ecdh.c b/library/ecdh.c index b7298919b..21823c651 100644 --- a/library/ecdh.c +++ b/library/ecdh.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/ecdsa.c b/library/ecdsa.c index d140139eb..5b62939b0 100644 --- a/library/ecdsa.c +++ b/library/ecdsa.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/ecp.c b/library/ecp.c index 37cb1249f..aca3a2d2c 100644 --- a/library/ecp.c +++ b/library/ecp.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/ecp_curves.c b/library/ecp_curves.c index 614e1fbbf..0464e7d72 100644 --- a/library/ecp_curves.c +++ b/library/ecp_curves.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/entropy.c b/library/entropy.c index 024debf27..7604e0f27 100644 --- a/library/entropy.c +++ b/library/entropy.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/entropy_poll.c b/library/entropy_poll.c index dcf9ceb7e..467268c45 100644 --- a/library/entropy_poll.c +++ b/library/entropy_poll.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/error.c b/library/error.c index 44b11426b..a4e6fc31c 100644 --- a/library/error.c +++ b/library/error.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/gcm.c b/library/gcm.c index 7e81ae09c..415e53af9 100644 --- a/library/gcm.c +++ b/library/gcm.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/havege.c b/library/havege.c index e558e6c89..e496c4ecf 100644 --- a/library/havege.c +++ b/library/havege.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/hmac_drbg.c b/library/hmac_drbg.c index 0f89edeb3..ed06cce83 100644 --- a/library/hmac_drbg.c +++ b/library/hmac_drbg.c @@ -3,7 +3,7 @@ * * Copyright (C) 2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/md.c b/library/md.c index 1e72f445c..b83e6ecd2 100644 --- a/library/md.c +++ b/library/md.c @@ -7,7 +7,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/md2.c b/library/md2.c index f60e10d30..9e9a3a210 100644 --- a/library/md2.c +++ b/library/md2.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/md4.c b/library/md4.c index cf5f9a97b..47f5c9c9e 100644 --- a/library/md4.c +++ b/library/md4.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/md5.c b/library/md5.c index a09bba3e6..50f4ee3aa 100644 --- a/library/md5.c +++ b/library/md5.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/md_wrap.c b/library/md_wrap.c index 068b51f7d..62110ce76 100644 --- a/library/md_wrap.c +++ b/library/md_wrap.c @@ -7,7 +7,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/memory_buffer_alloc.c b/library/memory_buffer_alloc.c index 1490264a4..6cde16a9f 100644 --- a/library/memory_buffer_alloc.c +++ b/library/memory_buffer_alloc.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/net.c b/library/net.c index 17210ef48..fefeaabc6 100644 --- a/library/net.c +++ b/library/net.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/oid.c b/library/oid.c index 9b9df43ba..e42f20d93 100644 --- a/library/oid.c +++ b/library/oid.c @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/padlock.c b/library/padlock.c index 6d70c5c06..3a59a22de 100644 --- a/library/padlock.c +++ b/library/padlock.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/pbkdf2.c b/library/pbkdf2.c index 2bd18b36f..a07c70cc2 100644 --- a/library/pbkdf2.c +++ b/library/pbkdf2.c @@ -8,7 +8,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/pem.c b/library/pem.c index 68981d899..aeaa4b68e 100644 --- a/library/pem.c +++ b/library/pem.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/pk.c b/library/pk.c index dae0d3cec..572e6c8a2 100644 --- a/library/pk.c +++ b/library/pk.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/pk_wrap.c b/library/pk_wrap.c index 58a7cf60c..b6b8218a0 100644 --- a/library/pk_wrap.c +++ b/library/pk_wrap.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/pkcs11.c b/library/pkcs11.c index 0f169e1ca..a5ad23c7e 100644 --- a/library/pkcs11.c +++ b/library/pkcs11.c @@ -7,7 +7,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/pkcs12.c b/library/pkcs12.c index fe8fc37c2..b992dba22 100644 --- a/library/pkcs12.c +++ b/library/pkcs12.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/pkcs5.c b/library/pkcs5.c index 8cebc15c5..ca740460b 100644 --- a/library/pkcs5.c +++ b/library/pkcs5.c @@ -7,7 +7,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/pkparse.c b/library/pkparse.c index 9d91f2f13..bc4fc6e27 100644 --- a/library/pkparse.c +++ b/library/pkparse.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/pkwrite.c b/library/pkwrite.c index d80e62f2e..f761ea04c 100644 --- a/library/pkwrite.c +++ b/library/pkwrite.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/platform.c b/library/platform.c index 561fc9feb..3eb4b1a8e 100644 --- a/library/platform.c +++ b/library/platform.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/ripemd160.c b/library/ripemd160.c index a909cf7e7..768e2659e 100644 --- a/library/ripemd160.c +++ b/library/ripemd160.c @@ -3,7 +3,7 @@ * * Copyright (C) 2014-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/rsa.c b/library/rsa.c index 1d9e780e2..f09231e28 100644 --- a/library/rsa.c +++ b/library/rsa.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/sha1.c b/library/sha1.c index 69b270558..455c7808a 100644 --- a/library/sha1.c +++ b/library/sha1.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/sha256.c b/library/sha256.c index 422bf443c..102402e18 100644 --- a/library/sha256.c +++ b/library/sha256.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/sha512.c b/library/sha512.c index ca74e9026..b9dac62db 100644 --- a/library/sha512.c +++ b/library/sha512.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/ssl_cache.c b/library/ssl_cache.c index f58a524f0..c649129b8 100644 --- a/library/ssl_cache.c +++ b/library/ssl_cache.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/ssl_ciphersuites.c b/library/ssl_ciphersuites.c index 6d1828db6..014cfc90b 100644 --- a/library/ssl_ciphersuites.c +++ b/library/ssl_ciphersuites.c @@ -5,7 +5,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/ssl_cli.c b/library/ssl_cli.c index dbf8c4f65..62ff3cfc5 100644 --- a/library/ssl_cli.c +++ b/library/ssl_cli.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/ssl_srv.c b/library/ssl_srv.c index 359f57f2a..a087b2234 100644 --- a/library/ssl_srv.c +++ b/library/ssl_srv.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/ssl_tls.c b/library/ssl_tls.c index 7383e1c3b..4b5418706 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/threading.c b/library/threading.c index d4692c75f..e89aa9510 100644 --- a/library/threading.c +++ b/library/threading.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/timing.c b/library/timing.c index 672801dfc..fe1daa247 100644 --- a/library/timing.c +++ b/library/timing.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/version.c b/library/version.c index ac77222a6..c10acac64 100644 --- a/library/version.c +++ b/library/version.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/version_features.c b/library/version_features.c index 8b1b5f2b4..658b7cdaa 100644 --- a/library/version_features.c +++ b/library/version_features.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/x509.c b/library/x509.c index 7ddeb2f37..b34cf3255 100644 --- a/library/x509.c +++ b/library/x509.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/x509_create.c b/library/x509_create.c index 537e726f1..ab87ac71f 100644 --- a/library/x509_create.c +++ b/library/x509_create.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/x509_crl.c b/library/x509_crl.c index 087cabc80..2c90582a1 100644 --- a/library/x509_crl.c +++ b/library/x509_crl.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/x509_crt.c b/library/x509_crt.c index ec5469b8b..e114c0f32 100644 --- a/library/x509_crt.c +++ b/library/x509_crt.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/x509_csr.c b/library/x509_csr.c index 7f2821c18..a6fe58176 100644 --- a/library/x509_csr.c +++ b/library/x509_csr.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/x509write_crt.c b/library/x509write_crt.c index ee3448e2a..3e850ceca 100644 --- a/library/x509write_crt.c +++ b/library/x509write_crt.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/x509write_csr.c b/library/x509write_csr.c index e67939ed8..8f297a011 100644 --- a/library/x509write_csr.c +++ b/library/x509write_csr.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/library/xtea.c b/library/xtea.c index 95eb40011..cea9ff82f 100644 --- a/library/xtea.c +++ b/library/xtea.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/aes/aescrypt2.c b/programs/aes/aescrypt2.c index 63ea51c61..1f34748c5 100644 --- a/programs/aes/aescrypt2.c +++ b/programs/aes/aescrypt2.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2013, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/aes/crypt_and_hash.c b/programs/aes/crypt_and_hash.c index 9e4f6967e..7ad07b479 100644 --- a/programs/aes/crypt_and_hash.c +++ b/programs/aes/crypt_and_hash.c @@ -4,7 +4,7 @@ * * Copyright (C) 2006-2011, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/hash/generic_sum.c b/programs/hash/generic_sum.c index d8c626c8f..20ff25269 100644 --- a/programs/hash/generic_sum.c +++ b/programs/hash/generic_sum.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2011, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/hash/hello.c b/programs/hash/hello.c index c6edf3330..7c0546e6c 100644 --- a/programs/hash/hello.c +++ b/programs/hash/hello.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2011, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/hash/md5sum.c b/programs/hash/md5sum.c index 7dc5fdbe4..58c2d0c85 100644 --- a/programs/hash/md5sum.c +++ b/programs/hash/md5sum.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2011, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/hash/sha1sum.c b/programs/hash/sha1sum.c index cc5b42ef3..3eafc4f1b 100644 --- a/programs/hash/sha1sum.c +++ b/programs/hash/sha1sum.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2011, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/hash/sha2sum.c b/programs/hash/sha2sum.c index 659c2717a..3fc1baa8d 100644 --- a/programs/hash/sha2sum.c +++ b/programs/hash/sha2sum.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2013, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/pkey/dh_client.c b/programs/pkey/dh_client.c index 31250bd1e..6fb569b82 100644 --- a/programs/pkey/dh_client.c +++ b/programs/pkey/dh_client.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2011, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/pkey/dh_genprime.c b/programs/pkey/dh_genprime.c index 8aabeedac..720232fe1 100644 --- a/programs/pkey/dh_genprime.c +++ b/programs/pkey/dh_genprime.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2012, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/pkey/dh_server.c b/programs/pkey/dh_server.c index 8c93ba1e1..b7e6482f6 100644 --- a/programs/pkey/dh_server.c +++ b/programs/pkey/dh_server.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2011, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/pkey/ecdsa.c b/programs/pkey/ecdsa.c index f30ec487f..b53367361 100644 --- a/programs/pkey/ecdsa.c +++ b/programs/pkey/ecdsa.c @@ -3,7 +3,7 @@ * * Copyright (C) 2013, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/pkey/gen_key.c b/programs/pkey/gen_key.c index 2fd60d47c..2d981abc5 100644 --- a/programs/pkey/gen_key.c +++ b/programs/pkey/gen_key.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2013, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/pkey/key_app.c b/programs/pkey/key_app.c index 418653cce..04bad874e 100644 --- a/programs/pkey/key_app.c +++ b/programs/pkey/key_app.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2013, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/pkey/key_app_writer.c b/programs/pkey/key_app_writer.c index dad2c13f9..c9830c259 100644 --- a/programs/pkey/key_app_writer.c +++ b/programs/pkey/key_app_writer.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2013, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/pkey/mpi_demo.c b/programs/pkey/mpi_demo.c index 93535b3ee..b5ae13e07 100644 --- a/programs/pkey/mpi_demo.c +++ b/programs/pkey/mpi_demo.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2011, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/pkey/pk_decrypt.c b/programs/pkey/pk_decrypt.c index 6fcc4af14..864469860 100644 --- a/programs/pkey/pk_decrypt.c +++ b/programs/pkey/pk_decrypt.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2013, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/pkey/pk_encrypt.c b/programs/pkey/pk_encrypt.c index 121e3b199..663c2ee7d 100644 --- a/programs/pkey/pk_encrypt.c +++ b/programs/pkey/pk_encrypt.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2011, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/pkey/pk_sign.c b/programs/pkey/pk_sign.c index 3f3b85f41..981591d29 100644 --- a/programs/pkey/pk_sign.c +++ b/programs/pkey/pk_sign.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2013, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/pkey/pk_verify.c b/programs/pkey/pk_verify.c index 0ceb60151..0ce45f6e4 100644 --- a/programs/pkey/pk_verify.c +++ b/programs/pkey/pk_verify.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2013, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/pkey/rsa_decrypt.c b/programs/pkey/rsa_decrypt.c index 215669cca..8df5f0074 100644 --- a/programs/pkey/rsa_decrypt.c +++ b/programs/pkey/rsa_decrypt.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2011, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/pkey/rsa_encrypt.c b/programs/pkey/rsa_encrypt.c index e3cd90ad5..58817e3f1 100644 --- a/programs/pkey/rsa_encrypt.c +++ b/programs/pkey/rsa_encrypt.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2011, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/pkey/rsa_genkey.c b/programs/pkey/rsa_genkey.c index 95bc823f3..ff315987b 100644 --- a/programs/pkey/rsa_genkey.c +++ b/programs/pkey/rsa_genkey.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2011, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/pkey/rsa_sign.c b/programs/pkey/rsa_sign.c index e854f70a3..e4f49701a 100644 --- a/programs/pkey/rsa_sign.c +++ b/programs/pkey/rsa_sign.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2011, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/pkey/rsa_sign_pss.c b/programs/pkey/rsa_sign_pss.c index 252bbf27d..e022db2ec 100644 --- a/programs/pkey/rsa_sign_pss.c +++ b/programs/pkey/rsa_sign_pss.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2011, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/pkey/rsa_verify.c b/programs/pkey/rsa_verify.c index 4e00bdde4..6ff16e4e4 100644 --- a/programs/pkey/rsa_verify.c +++ b/programs/pkey/rsa_verify.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2011, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/pkey/rsa_verify_pss.c b/programs/pkey/rsa_verify_pss.c index 673618446..3ffdfbe3f 100644 --- a/programs/pkey/rsa_verify_pss.c +++ b/programs/pkey/rsa_verify_pss.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2011, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/random/gen_entropy.c b/programs/random/gen_entropy.c index a3785b98d..29e7e2f46 100644 --- a/programs/random/gen_entropy.c +++ b/programs/random/gen_entropy.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2011, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/random/gen_random_ctr_drbg.c b/programs/random/gen_random_ctr_drbg.c index d35e35d80..c21e0948a 100644 --- a/programs/random/gen_random_ctr_drbg.c +++ b/programs/random/gen_random_ctr_drbg.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2011, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/random/gen_random_havege.c b/programs/random/gen_random_havege.c index 289609005..5336fc4e6 100644 --- a/programs/random/gen_random_havege.c +++ b/programs/random/gen_random_havege.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2011, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/ssl/ssl_client1.c b/programs/ssl/ssl_client1.c index c8a61c20d..10a21d18f 100644 --- a/programs/ssl/ssl_client1.c +++ b/programs/ssl/ssl_client1.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2013, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/ssl/ssl_client2.c b/programs/ssl/ssl_client2.c index 11af9065c..0d4a0f209 100644 --- a/programs/ssl/ssl_client2.c +++ b/programs/ssl/ssl_client2.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2013, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/ssl/ssl_fork_server.c b/programs/ssl/ssl_fork_server.c index 990749ef9..ee2e1b807 100644 --- a/programs/ssl/ssl_fork_server.c +++ b/programs/ssl/ssl_fork_server.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2013, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/ssl/ssl_mail_client.c b/programs/ssl/ssl_mail_client.c index 31c0b6ee8..769dd2670 100644 --- a/programs/ssl/ssl_mail_client.c +++ b/programs/ssl/ssl_mail_client.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2012, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/ssl/ssl_pthread_server.c b/programs/ssl/ssl_pthread_server.c index 4a6db7aef..8c6717364 100644 --- a/programs/ssl/ssl_pthread_server.c +++ b/programs/ssl/ssl_pthread_server.c @@ -4,7 +4,7 @@ * * Copyright (C) 2006-2013, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/ssl/ssl_server.c b/programs/ssl/ssl_server.c index c9360d943..fe8eca43e 100644 --- a/programs/ssl/ssl_server.c +++ b/programs/ssl/ssl_server.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2013, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/ssl/ssl_server2.c b/programs/ssl/ssl_server2.c index 15166d22b..3b1f035f2 100644 --- a/programs/ssl/ssl_server2.c +++ b/programs/ssl/ssl_server2.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2013, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/test/benchmark.c b/programs/test/benchmark.c index 7e77f6cd3..cc83746d7 100644 --- a/programs/test/benchmark.c +++ b/programs/test/benchmark.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2013, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/test/o_p_test.c b/programs/test/o_p_test.c index ce1e522b7..b904a9f8d 100644 --- a/programs/test/o_p_test.c +++ b/programs/test/o_p_test.c @@ -3,7 +3,7 @@ * * Copyright (C) 2011-2012 ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/test/selftest.c b/programs/test/selftest.c index 301d6c322..d2f70d2d2 100644 --- a/programs/test/selftest.c +++ b/programs/test/selftest.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2013, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/test/ssl_cert_test.c b/programs/test/ssl_cert_test.c index c55090a97..037c47483 100644 --- a/programs/test/ssl_cert_test.c +++ b/programs/test/ssl_cert_test.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2011, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/test/ssl_test.c b/programs/test/ssl_test.c index 7f58e3dd5..63c32206c 100644 --- a/programs/test/ssl_test.c +++ b/programs/test/ssl_test.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2013, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/util/pem2der.c b/programs/util/pem2der.c index dcd3547f4..74f7a3e81 100644 --- a/programs/util/pem2der.c +++ b/programs/util/pem2der.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2013, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/util/strerror.c b/programs/util/strerror.c index b751ca066..c5598fccf 100644 --- a/programs/util/strerror.c +++ b/programs/util/strerror.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2012, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/wince_main.c b/programs/wince_main.c index c3c8d4a2e..8bf249b87 100644 --- a/programs/wince_main.c +++ b/programs/wince_main.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2011, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/x509/cert_app.c b/programs/x509/cert_app.c index b7f5950ad..a945440f9 100644 --- a/programs/x509/cert_app.c +++ b/programs/x509/cert_app.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2013, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/x509/cert_req.c b/programs/x509/cert_req.c index 41eaea1a4..3b67f6505 100644 --- a/programs/x509/cert_req.c +++ b/programs/x509/cert_req.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2011, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/x509/cert_write.c b/programs/x509/cert_write.c index b402fb16e..eed12cfd8 100644 --- a/programs/x509/cert_write.c +++ b/programs/x509/cert_write.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2013, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/x509/crl_app.c b/programs/x509/crl_app.c index 8d10e3bd2..437022797 100644 --- a/programs/x509/crl_app.c +++ b/programs/x509/crl_app.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2013, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/programs/x509/req_app.c b/programs/x509/req_app.c index bf9610af2..a4be7e69a 100644 --- a/programs/x509/req_app.c +++ b/programs/x509/req_app.c @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2013, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/scripts/data_files/error.fmt b/scripts/data_files/error.fmt index e3549a26f..39d64802e 100644 --- a/scripts/data_files/error.fmt +++ b/scripts/data_files/error.fmt @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/scripts/data_files/version_features.fmt b/scripts/data_files/version_features.fmt index 76d107d95..1d27488c2 100644 --- a/scripts/data_files/version_features.fmt +++ b/scripts/data_files/version_features.fmt @@ -3,7 +3,7 @@ * * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved * - * This file is part of mbed TLS (https://www.polarssl.org) + * This file is part of mbed TLS (https://polarssl.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by