Commit Graph

304 Commits

Author SHA1 Message Date
Manuel Pégourié-Gonnard
ff9e1a4aa4 Document in-out param of dhm_calc_secret() 2014-07-08 18:29:04 +02:00
Manuel Pégourié-Gonnard
002bc86718 Clarify mpi_write_binary()'s doc. 2014-07-08 18:29:03 +02:00
Manuel Pégourié-Gonnard
03917bf7d5 Disable broken Sparc64 bn_mul assembly 2014-07-08 18:29:01 +02:00
Manuel Pégourié-Gonnard
4564af9e3d Fix asm format of bn_mul.h for more portability
Found by Barry K. Nathan.

Quoting from http://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html:

"You can put multiple assembler instructions together in a single asm
template, separated by the characters normally used in assembly code for the
system. A combination that works in most places is a newline to break the
line, plus a tab character to move to the instruction field (written as
‘\n\t’). Sometimes semicolons can be used, if the assembler allows semicolons
as a line-breaking character. Note that some assembler dialects use semicolons
to start a comment."
2014-07-08 18:28:59 +02:00
Barry K. Nathan
22ca9c0197 Fix preprocessor checks for bn_mul PPC asm
On OS X, neither __powerpc__ nor __ppc__ is defined on PPC64, so the
asm code was only being used on PPC32.
2014-07-08 18:28:57 +02:00
Paul Bakker
3dfa07b401 Clearer description for version_get_string_full() regarding 18 bytes 2014-07-08 18:28:35 +02:00
Paul Bakker
1e9423704a Support for seed file writing and reading in Entropy 2014-07-08 11:20:25 +02:00
Paul Bakker
ec8e5db1cf Updated documentation for seed functions w.r.t. return values 2014-07-08 11:18:41 +02:00
Manuel Pégourié-Gonnard
8a56d3044d Update doc of ssl_set_authmode() 2014-07-08 11:11:45 +02:00
Manuel Pégourié-Gonnard
588b66f152 Add a warning against compression in config.h 2014-07-08 11:11:25 +02:00
Alex Wilson
e63560470e Don't try to use MIPS32 asm macros on MIPS64
The MIPS32 bn_mul asm code causes segfaults on MIPS64 and failing
tests. Until someone has time to fix this up, MIPS64 platforms should
fall back to the C implementation (which works fine).
2014-07-08 11:06:05 +02:00
Manuel Pégourié-Gonnard
be04673c49 Forbid sequence number wrapping 2014-07-08 11:04:19 +02:00
Paul Bakker
50a5c53398 Reject certs and CRLs from the future 2014-07-08 10:59:10 +02:00
Paul Bakker
0d844dd650 Add x509parse_time_future() 2014-07-07 17:46:36 +02:00
Manuel Pégourié-Gonnard
13d087b97c Fix asm format for alpha 2014-07-07 16:01:22 +02:00
Manuel Pégourié-Gonnard
5dcd22c8e9 Fix asm format for tricore 2014-07-07 16:01:21 +02:00
Manuel Pégourié-Gonnard
5b30cc191b Fix asm format for microblaze 2014-07-07 16:01:19 +02:00
Manuel Pégourié-Gonnard
4239c03358 Fix asm format for MC68020 2014-07-07 16:01:18 +02:00
Manuel Pégourié-Gonnard
c6f563ce4c Fix BN ASM for PowerPC 2014-07-07 16:01:17 +02:00
Manuel Pégourié-Gonnard
986b7db937 Fix bignum's ASM format for MIPS 2014-07-07 16:01:15 +02:00
Manuel Pégourié-Gonnard
68c96e48ce Fix bignum ASM format for X86-64 2014-07-07 16:01:14 +02:00
Manuel Pégourié-Gonnard
7ab2d5daf5 Clarify comments of mpi_mul_int() 2014-07-07 14:34:06 +02:00
Paul Bakker
a1caf6e1e8 SSL now gracefully handles missing RNG 2014-07-07 14:20:52 +02:00
Manuel Pégourié-Gonnard
5c8434cf52 Safer buffer comparisons in the SSL modules 2014-07-07 14:10:07 +02:00
Paul Bakker
9ccb2116a7 Introduced POLARSSL_HAVE_READDIR_R for systems without it 2014-07-07 13:43:31 +02:00
Paul Bakker
6b06502c4b Changed RSA blinding to a slower but thread-safe version 2013-10-07 12:06:29 +02:00
Paul Bakker
adace27ec9 Prepped for 1.2.10 release 2013-10-04 17:07:26 +02:00
Paul Bakker
495830dd1f Fixed ssl_pkcs11_decrypt() prototype 2013-10-04 11:01:48 +02:00
Paul Bakker
e45574e7de Prepped for 1.2.9 release 2013-09-25 18:42:42 +02:00
Paul Bakker
915ee19887 Do not allow SHA256/SHA384 ciphersuites in < TLS 1.2 2013-09-23 17:30:26 +02:00
Paul Bakker
43f9799ce6 RSA blinding on CRT operations to counter timing attacks 2013-09-23 11:23:31 +02:00
Paul Bakker
34b225f0ee Added C++ style extern in x509write header file 2013-09-11 13:31:55 +02:00
Paul Bakker
1d419500b0 Prepared for PolarSSL release 1.2.8 2013-06-19 11:48:04 +02:00
Paul Bakker
602c31be23 Updated PKCS#12 define dependencies 2013-06-18 16:49:18 +02:00
Paul Bakker
14a222cef2 Moved PKCS#12 PBE functions to cipher / md layer where possible
The 3-key and 2-key Triple DES PBE functions have been replaced with a
single pkcs12_pbe() function that handles both situations (and more).

In addition this allows for some PASSWORD_MISMATCH checking
2013-06-18 16:35:48 +02:00
Paul Bakker
6fa5488779 Centralized module option values in config.h
Allow user-defined settings without editing header files by using
POLARSSL_CONFIG_OPTIONS in config.h
2013-06-17 15:44:03 +02:00
Paul Bakker
1fd4321ba2 PKCS#5 v2 PBES2 support and use in PKCS#8 encrypted certificates
The error code POLARSSL_ERR_X509_PASSWORD_MISMATCH is now properly
returned in case of an encryption failure in the padding. The
POLARSSL_ERR_X509_PASSWORD_REQUIRED error code is only returned for PEM
formatted private keys as for DER formatted ones it is impossible to
distinguish if a DER blob is PKCS#8 encrypted or not.
2013-06-17 15:14:42 +02:00
Paul Bakker
19bd297dc8 PKCS#5 module added. Moved PBKDF2 functionality inside and deprecated
old PBKDF2 module.
2013-06-14 12:06:45 +02:00
Paul Bakker
52b845be34 Fixed bignum.c and bn_mul.h to support Thumb2 and LLVM compiler 2013-06-14 11:37:37 +02:00
Paul Bakker
4087c47043 Added mechanism to provide alternative cipher / hash implementations
All symmetric cipher algorithms and hash algorithms now include support
for a POLARSSL_XXX_ALT flag that prevents the definition of the
algorithm context structure and all 'core' functions.
2013-06-12 16:57:46 +02:00
Paul Bakker
cf6e95d9a8 Parsing of PKCS#8 encrypted private key files added and PKCS#12 basis
PKCS#8 encrypted key file support has been added to x509parse_key() with
support for some PCKS#12 PBE functions (pbeWithSHAAnd128BitRC4,
pbeWithSHAAnd3-KeyTripleDES-CBC and pbeWithSHAAnd2-KeyTripleDES-CBC)
2013-06-12 13:18:15 +02:00
Paul Bakker
1922a4e6aa ssl_parse_certificate() now calls x509parse_crt_der() directly 2013-06-06 15:11:16 +02:00
Paul Bakker
9255e8300e pem_read_buffer() already update use_len after header and footer are read
After header and footer are read, pem_read_buffer() is able to determine
the length of input data used. This allows calling functions to skip
this PEM bit if an error occurs during its parsing.
2013-06-06 15:00:55 +02:00
Paul Bakker
08f06cf49f Disabled the HAVEGE random generator by default
Rationale: The HAVEGE random generator has too many caveats to be a
standard generator that people rely on. The HAVEGE random generator is not
suitable for virtualized environments. In addition the HAVEGE random
generator is dependent on timing and specific processor traits that
cannot be guaranteed by default on compile time.

Our advice: only use HAVEGE as an additional random source for your
entropy pool, never as your primary source.
2013-06-06 14:05:26 +02:00
Paul Bakker
eae09db9e5 Fixed const correctness issues that have no impact on the ABI 2013-06-06 12:35:54 +02:00
Paul Bakker
822e958bb2 Prepared for PolarSSL 1.2.7 release 2013-04-13 11:56:17 +02:00
Paul Bakker
f4a84b1154 Added default value comment for ssl_set_ciphersuites*() 2013-04-12 15:33:30 +02:00
Paul Bakker
cecfd95aba Minor checks to prevent NULL-pointer exceptions
(cherry picked from commit c295b834a2)
2013-04-12 13:18:07 +02:00
Paul Bakker
a62729888b Ability to specify allowed ciphersuites based on the protocol version.
The ciphersuites parameter in the ssl_session structure changed from
'int *' to 'int **' and is now malloced in ssl_init() and freed in
ssl_free().

The new function ssl_set_ciphersuite_for_version() sets specific entries
inside this array. ssl_set_ciphersuite() sets all entries to the same
value.
2013-04-12 13:13:43 +02:00
Paul Bakker
d4c5944212 Fixed MPI assembly for ARM when -O2 is used
GCC with -O2 or higher also needs to now about 'cc' in the clobber list.
(cherry picked from commit eff2e6d414)

Conflicts:
	ChangeLog
2013-04-12 09:40:38 +02:00