Commit Graph

4277 Commits

Author SHA1 Message Date
Manuel Pégourié-Gonnard
300571c431 x509: IP in SAN: fix test data
This is embarrassing, I should have checked the test data from the beginning.
2016-02-16 17:27:24 +01:00
Manuel Pégourié-Gonnard
faaf5fc590 x509: IP in SAN: fix typos caught by János 2016-02-16 16:31:31 +01:00
Manuel Pégourié-Gonnard
a245dae702 Add Changelog entry for current branch 2016-01-29 15:20:34 +01:00
Manuel Pégourié-Gonnard
a9f124378d x509: IP in SAN: integration tests with SSL/TLS 2016-01-29 15:02:41 +01:00
Manuel Pégourié-Gonnard
9855d63acb x509: implement verification of IPs in SAN 2016-01-29 15:02:41 +01:00
Manuel Pégourié-Gonnard
47f71d49c4 x509: improve internal macro definition 2016-01-29 15:02:41 +01:00
Manuel Pégourié-Gonnard
e9d8c09791 x509: slightly more compact style in verify_name 2016-01-29 15:02:41 +01:00
Manuel Pégourié-Gonnard
80c8786bfc x509: factor common code to a function 2016-01-29 15:02:41 +01:00
Manuel Pégourié-Gonnard
187ba489af x509: some internal constness improvements 2016-01-29 15:02:41 +01:00
Manuel Pégourié-Gonnard
95a3c6e6d1 x509: rework documentation for verify()
- reduce redundancy between verify() and _with_profile() for readability and
  maintainability
- improve description of parameters
2016-01-29 15:02:41 +01:00
Manuel Pégourié-Gonnard
b74b50b4b1 x509: rename a few variables and parameters
cn is not fully adequate as the name is not necessarily the Common Name.

Also, it's better have an explicit indication in the name of the variable if
it holds the expected name or some name from the certificate.
2016-01-29 15:02:41 +01:00
Manuel Pégourié-Gonnard
af58894233 x509: refactoring: move code to own function 2016-01-29 15:02:41 +01:00
Manuel Pégourié-Gonnard
3ad9437923 x509: add parse/print support for IPs in SAN
RFC 5280 defines many type of names to be used in the subjectAltName
extension of certificate. So far we only supported dNSName, but there is
demand for IP addresses too.

This is the first step, support for verification will be added in the next
commit.
2016-01-29 15:02:41 +01:00
Manuel Pégourié-Gonnard
803183f5fe Improve error string about X.509 name mismatch
The name is actually check against either SAN or CN, so mentioning only one
in the error string might wrongfully suggest the other was ignored.

OTOH, keep the same error code for both, as the distinction between both types
is a rather low-level detail (and anyway changing the error code returned in
some cases would be an API change so is not an option at this point).
2016-01-27 15:16:16 +01:00
Simon Butcher
bdae02ce90 Corrected references for RSA and DHM
The links in the references in rsa.c and dhm.c were no longer valid and needed
updating.
2016-01-20 00:44:42 +00:00
Simon Butcher
9a3ee57c84 Merge branch 'fixes' into development 2016-01-13 02:08:02 +00:00
Manuel Pégourié-Gonnard
d091ed1911 Add scripts/apidoc_full.sh
This re-introduces the apidoc with full config.h, but hopefully with the race
conditions and other issues that the previous implementation had.

Adapt doxygen test script to use that new script, and also check for errors
in addition to warnings while at it.
2016-01-12 14:48:03 +00:00
Manuel Pégourié-Gonnard
c990189e14 Revert changes done to 'make apidoc' target
This partially reverts 1989caf71c (only the changes to Makefile and
CMakeLists, the addition to scripts/config.pl is kept).

Modifying config.h in the apidoc target creates a race condition with

    make -j4 all apidoc

where some parts of the library, tests or programs could be built with the
wrong config.h, resulting in all kinds of (semi-random) errors. Recent
versions of CMake mitigate this by adding a .NOTPARALLEL target to the
generated Makefile, but people would still get errors with older CMake
versions that are still in use (eg in RHEL 5), and with plain make.

An additional issue is that, by failing to use cp -p, the apidoc target was
updating the timestamp on config.h, which seems to cause further build issues.

Let's get back to the previous, safe, situation. The improved apidoc building
will be resurrected in a script in the next commit.

fixes #390
fixes #391
2016-01-12 14:48:03 +00:00
Simon Butcher
04d42111f4 Reverted the INPUT in doxygen to .
Previous change to include excluded the content in doxygen/input
2016-01-12 00:59:15 +00:00
Manuel Pégourié-Gonnard
35d07bfb45 Exclude more things from doxygen inputs 2016-01-08 17:01:59 +01:00
Manuel Pégourié-Gonnard
de7ae7b2e9 Exclude some warnings from the doxygen test
Apparently travis has an old version of doxygen that doesn't know all tags in
our config. That's not something we care about, we only want to know about
warnings in our doxygen content
2016-01-08 17:01:59 +01:00
Manuel Pégourié-Gonnard
259b08a5d2 Add -s (short) option to all.sh
On my machine, that reduces running time from about 30 minutes to less than 10
minutes, while maintaining a good probability of catching the most likely
issues in practice.
2016-01-08 16:49:17 +01:00
Manuel Pégourié-Gonnard
695e0ba014 Add new doxygen test to travis 2016-01-08 16:49:17 +01:00
Manuel Pégourié-Gonnard
1d552e7583 Add test script for doxygen warnings 2016-01-08 16:49:17 +01:00
Manuel Pégourié-Gonnard
b873f7ac98 Fix doxygen warnings about deprecated tags
Doxygen 1.8.10 warns that those tags are obsolete. Since we're not generating
XML anyway, it seems harmless to remove them even for earlier versions.
2016-01-08 16:49:17 +01:00
Manuel Pégourié-Gonnard
d2655ac2dc Add test for yotta debug build 2016-01-08 15:05:11 +01:00
Manuel Pégourié-Gonnard
365f325e03 Make check-names.sh happy 2016-01-08 15:05:11 +01:00
Manuel Pégourié-Gonnard
25caaf36a6 Avoid build errors with -O0 due to assembly 2016-01-08 14:29:11 +01:00
Manuel Pégourié-Gonnard
3551901cd1 Make ar invocation more portable
armar doesn't understand the syntax without dash. OTOH, the syntax with dash
is the only one specified by POSIX, and it's accepted by GNU ar, BSD ar (as
bundled with OS X) and armar, so it looks like the most portable syntax.

fixes #386
2016-01-07 13:55:05 +01:00
Manuel Pégourié-Gonnard
afbb3101ce Update ChangeLog for latest PR merged
fixes #309
2016-01-07 13:26:11 +01:00
Manuel Pégourié-Gonnard
e9c1b1a3bf Merge remote-tracking branch 'yanesca/iss309' into development
* yanesca/iss309:
  Improved on the previous fix and added a test case to cover both types of carries.
  Removed recursion from fix #309.
  Improved on the fix of #309 and extended the test to cover subroutines.
  Tests and fix added for #309 (inplace mpi doubling).
2016-01-07 13:22:27 +01:00
Manuel Pégourié-Gonnard
f92c86e44d Update reference to attack in ChangeLog
We couldn't do that before the attack was public
2016-01-07 13:18:01 +01:00
Simon Butcher
bfafadb45d Change version number to 2.2.1
Changed version for library files and yotta module
2016-01-04 22:26:36 +00:00
Manuel Pégourié-Gonnard
7f88b8ec86 Tune description of a change/bugfix in ChangeLog 2016-01-04 17:36:44 +01:00
Simon Butcher
6e7d3d5462 Corrected naming and text in doxygen rng module
Doxygen input file had incorrect function name for rng function
mbedtls_ctr_drbg_random(), and formatting was fixed.
2016-01-04 16:09:23 +00:00
Manuel Pégourié-Gonnard
76da60c56e Fix doxygen warnings for generic names in config.h
When we use the same documentation for a list of #defines, we used to use a
generic name in the \def command. Use the first name of the list instead so
that doxygen stops complaining, and mention the generic name in the longer
description.

This is not entirely satisfactory as the full list of macros will not be
included in the generated doc, but it's still an improvement as at least the
first macro is documented now, with a hint that there are others.
2016-01-04 13:51:01 +01:00
Manuel Pégourié-Gonnard
1989caf71c Use a full config.h with doxygen
Otherwise we get warnings that some documentation items don't have
corresponding #define, and more importantly the corresponding snippets are not
included in the output.

For that we need a modified version of the "full" argument for config.pl.

Also, the new CMakeLists.txt target only works on Unix (which was already the
case of the Makefile target). Hopefully this is not an issue as people are
unlikely to need that target on Windows.
2016-01-04 12:57:32 +01:00
Manuel Pégourié-Gonnard
ddbb166041 Reintroduce line deleted by accident 2016-01-04 12:40:15 +01:00
Simon Butcher
5b331b9d48 Various fixes to doxygen API generation
* Fixed incorrect file definitions
 * Fixed accidental tag problems in ecjpake.h
 * Corrected function naming in X.509 module definition
2016-01-03 16:14:14 +00:00
Simon Butcher
9803d07a63 Fix for MPI divide on MSVC
Resolves multiple platform issues when building bignum.c with Microsoft
Visual Studio.
2016-01-03 00:24:34 +00:00
Simon Butcher
1285ab5dc2 Fix for memory leak in RSA-SSA signing
Fix in mbedtls_rsa_rsassa_pkcs1_v15_sign() in rsa.c
2016-01-01 21:42:47 +00:00
Simon Butcher
c4a6ce6a4c Merge branch 'origin/iotssl-541-pathlen-bugfix' 2015-12-30 07:52:54 +00:00
Simon Butcher
c97b697939 Fix for unused variable warning 2015-12-27 23:48:17 +00:00
Simon Butcher
f5ba04541e Fix for compiler warnings and style
Changes for C90 compliance, and style following review
2015-12-27 23:01:55 +00:00
Simon Butcher
c42350125e Clarification in ChangeLog 2015-12-23 18:36:16 +00:00
Simon Butcher
4c2bfdbff6 Merge 'iotssl-558-md5-tls-sigs-restricted' 2015-12-23 18:33:54 +00:00
Simon Butcher
9c2626c641 Merge 'iotssl-566-double-free-restricted' 2015-12-23 16:42:03 +00:00
Simon Butcher
00923c1897 Fix typo in Changelog 2015-12-22 19:04:24 +00:00
Simon Butcher
fabce5e137 Merge branch 'misc' into development
Fixes github #358, #362 and IOTSSL-536
2015-12-22 18:56:56 +00:00
Simon Butcher
207990dcf5 Added description of change to the Changelog
Also clarified some comments following review.
2015-12-16 01:51:30 +00:00