Commit graph

1667 commits

Author SHA1 Message Date
Manuel Pégourié-Gonnard b8ca723154 Only define mode_func if mode is enabled (CBC etc) 2015-02-16 17:23:59 +00:00
Manuel Pégourié-Gonnard a2424a045a PKCS8 encrypted key depend on PKCS5 or PKCS12 2015-02-16 17:22:47 +00:00
Manuel Pégourié-Gonnard aff2976d10 Merge branch 'build' into development
* build:
  build: make: support windows cross compile
2015-02-16 15:26:09 +00:00
Manuel Pégourié-Gonnard 09eb14c01e Revert "Require unix-utils in path for windows make"
This reverts commit 5d46cca09a.

In preparation of merging an external contribution that superseedes this

Conflicts:
	ChangeLog
2015-02-16 15:25:31 +00:00
Manuel Pégourié-Gonnard f812054d00 Revert "Replace SONAME with SOVERSION in makefile"
This reverts commit 418080010a.

In preparation of merging one external contribution that supersedes this.
2015-02-16 15:24:17 +00:00
Mansour Moufid 99b9259f76 Fix whitespace of 369e6c20. 2015-02-16 10:43:52 +00:00
Mansour Moufid c531b4af3c Apply the semantic patch rm-malloc-cast.cocci.
for dir in library programs; do
        spatch --sp-file scripts/rm-malloc-cast.cocci --dir $dir \
        --in-place;
    done
2015-02-16 10:43:52 +00:00
Manuel Pégourié-Gonnard d48bf6892c Write literal byte more clearly 2015-02-16 09:13:40 +00:00
Manuel Pégourié-Gonnard 85fadb749c Make loop bound more obvious
Helps static analyzers and does not decrease human readability.
2015-02-16 09:13:40 +00:00
Manuel Pégourié-Gonnard 6fdc4cae53 Fix potential signedness issue 2015-02-16 09:13:40 +00:00
Alon Bar-Lev 18ba0cce8b build: make: support windows cross compile
Add WINDOWS_BUILD macro to enable Windows build on *NIX host.

Add optional suffix for executables.

Fix shared object suffix logic to support multiple suffixes.

Fix soname handling to always match output.

WINDOWS macro sets WINDOWS_BUILD.

WINDOWS_BUILD sets .exe executable suffix.

WINDOWS_BUILD shared mode creates dll import library.

WINDOWS_BUILD shared mode link against dll.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
2015-02-14 01:20:17 +02:00
Manuel Pégourié-Gonnard 0928640095 Update generated files 2015-02-13 15:18:33 +00:00
Manuel Pégourié-Gonnard ac1f76c362 Merge remote-tracking branch 'rich/platform' into development
* rich/platform:
  Remove dependency on sscanf in lib x509
  Fix extra guard in memory_buffer_alloc
  rebase from development
  implemented macro overriding for polarssl_* library functions
  fix bug introduced by the addition of snprintf and assert macro which caused tests to fail without polarssl_platform_c defined
  add initial symbols to config and checks to check_config to allow use of macros to define standard functions
  reformat and arrange additions to config alphabetically
  add missing checks to check_config
  add macro definition of assert using polarssl_exit
  modify library/memory_buffer_alloc.c, benchmark.c and the tests main code to use polarssl_exit
  add POLARSSL_PLATFORM_EXIT_ALT
  modify scripts/* and tests/* to use polarssl_snprintf
  modify programs/*.c to use polarssl_snprintf
  modify library/debug.c to use polarssl_snprintf
  modify library/x509*.c to use polarssl_snprintf
  modify library/net.c to use polarssl_snprintf
  modify oid.c to use polarssl_snprintf
  add platform_set_snprintf

Conflicts:
	library/memory_buffer_alloc.c
	programs/pkey/pk_sign.c
	programs/pkey/pk_verify.c
	programs/pkey/rsa_sign_pss.c
	programs/pkey/rsa_verify_pss.c
	programs/ssl/ssl_client2.c
	programs/ssl/ssl_pthread_server.c
	programs/test/benchmark.c
	programs/test/ssl_cert_test.c
2015-02-13 15:11:24 +00:00
Rich Evans 7d5a55a365 Remove dependency on sscanf in lib x509 2015-02-13 13:50:26 +00:00
Rich Evans c8ada6d410 Fix extra guard in memory_buffer_alloc 2015-02-13 13:50:26 +00:00
Rich Evans 77d3638497 modify library/memory_buffer_alloc.c, benchmark.c and the tests main code to use polarssl_exit 2015-02-13 13:50:26 +00:00
Rich Evans c39cb4986b add POLARSSL_PLATFORM_EXIT_ALT 2015-02-13 13:50:26 +00:00
Rich Evans 2387c7d105 modify library/debug.c to use polarssl_snprintf 2015-02-13 13:50:26 +00:00
Rich Evans fac657fd52 modify library/x509*.c to use polarssl_snprintf 2015-02-13 13:50:25 +00:00
Rich Evans a18b11f285 modify library/net.c to use polarssl_snprintf 2015-02-13 13:50:25 +00:00
Rich Evans 8f3a9436a9 modify oid.c to use polarssl_snprintf 2015-02-13 13:50:25 +00:00
Rich Evans 46b0a8d15a add platform_set_snprintf 2015-02-13 13:50:25 +00:00
Rich Evans 36796df815 Added missing stdio in lib x509.c needed for sscanf 2015-02-13 13:50:05 +00:00
Rich Evans d08a605dac Remove platform guard in mem buffer alloc 2015-02-13 13:50:05 +00:00
Manuel Pégourié-Gonnard 3cfb34564f Avoid warning from mingw for shared library 2015-02-13 13:34:08 +00:00
Manuel Pégourié-Gonnard 418080010a Replace SONAME with SOVERSION in makefile
- avoids duplication
- fixes warning about redefined rule with WINDOWS=1
2015-02-13 13:15:13 +00:00
Manuel Pégourié-Gonnard 5d46cca09a Require unix-utils in path for windows make 2015-02-13 12:02:45 +00:00
Manuel Pégourié-Gonnard d72704b0d5 Remove work-around for alleged compiler bug
It turns out the problem was with the way the reporter was invoking its
toolchain, not the toolchain itself.
2015-02-12 09:38:54 +00:00
Manuel Pégourié-Gonnard 2ee8d24ca2 Simplify some constant-time code
Some people recommend using bit operations to avoid the compiler producing a
branch on `ret != 0`, but:
- this makes the code less readable,
- here I got a warning from some compilers about unsigned unary minus
- and anyway modern compilers don't produce a branch here, checked on x64 and
  arm with various -O values.
2015-02-11 15:29:15 +00:00
Manuel Pégourié-Gonnard 06d7519697 Fix msvc warning 2015-02-11 14:54:11 +00:00
Manuel Pégourié-Gonnard fba22fdc7e Avoid warning from ar 2015-02-11 14:24:47 +00:00
Manuel Pégourié-Gonnard 6d71e4e6c3 Fix one more warning on windows 2015-02-11 12:54:35 +00:00
Manuel Pégourié-Gonnard dda5213982 Fix harmless warnings with mingw in timing.c 2015-02-11 12:33:40 +00:00
Manuel Pégourié-Gonnard 38433535e3 Fix hardclock() with mingw64 2015-02-11 12:33:40 +00:00
Manuel Pégourié-Gonnard a273371fc4 Fix "int vs enum" warnings from armcc v5
enumerated type mixed with another type
2015-02-10 17:34:48 +01:00
Manuel Pégourié-Gonnard 7f84905552 Fix two warnings from armcc v5
assignment in condition
2015-02-10 17:34:35 +01:00
Manuel Pégourié-Gonnard 45ec8da7e5 Fix missing include in i386-specific file 2015-02-10 13:50:47 +00:00
Manuel Pégourié-Gonnard 0c851ee1c8 Fix missing include in non-default things 2015-02-10 12:47:52 +00:00
Rich Evans ce2f237697 change test function includes to use one convention 2015-02-10 11:28:46 +00:00
Rich Evans 00ab47026b cleanup library and some basic tests. Includes, add guards to includes 2015-02-10 11:28:46 +00:00
Paul Bakker daae3b749b Prepare for mbed TLS 1.3.10 release 2015-02-08 15:49:54 +01:00
Manuel Pégourié-Gonnard 6674cce892 Fix potential timing issue in RSA pms handling 2015-02-06 11:36:56 +00:00
Manuel Pégourié-Gonnard 555fbf8758 Support composite RDNs in X.509 certs parsing 2015-02-04 17:11:55 +00:00
Manuel Pégourié-Gonnard 860b51642d Fix url again 2015-01-28 17:12:07 +00:00
Manuel Pégourié-Gonnard 65fc6a886a Fix small bug in base64_encode() 2015-01-28 16:49:26 +00:00
Manuel Pégourié-Gonnard 78dbeeffd3 Minor gitginore fixes 2015-01-28 15:34:01 +00:00
Manuel Pégourié-Gonnard 3f738ca40a Move some ignore patterns to subdirectories 2015-01-28 15:33:23 +00:00
Manuel Pégourié-Gonnard 2a9c8b62bf Add cmake compatibility targets 2015-01-28 15:21:25 +00:00
Manuel Pégourié-Gonnard 7cbe1318d8 Fix more stdio inclusion issues 2015-01-28 15:28:30 +01:00
Manuel Pégourié-Gonnard 607d663b41 Add debug info for cert/suite selection 2015-01-28 15:28:30 +01:00