Commit graph

876 commits

Author SHA1 Message Date
Richard Levitte
3cb28d1888 mk1mf: dtlstest needs ssltestlib, include it with a hack
We don't really have a mechanism to include other object files into a given
test program.  For now, a simple hack in mk1mf.pl will do.

RT#4653

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-08-23 00:09:40 +02:00
Richard Levitte
c9e2fab4b3 Fix util/mkerr.pl
- Adjust mkerr.pl to produce the line length we used for source
  reformating.

- Have mkerr.pl keep track of preprocessor directive indentation

  Among others, do not spuriously throw away a #endif at the end of
  header files.

- Make sure mkerr.pl specifies any header inclusion correctly

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-18 22:32:13 +02:00
Matt Caswell
a79a40a9fe Fix SSL compression symbol exporting
Some compression related functions in libssl have dummy versions to be
used when compiled with no-comp. However those dummy functions were not
being exported on Windows so they are unusable when dynamically linked.

Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-17 09:23:36 +01:00
Matt Caswell
a6406c9598 Fix the no-comp option for Windows
no-comp on Windows was not actually suppressing compilation of the code,
although it was suppressing its use.

Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-18 12:13:11 +00:00
Kurt Roeckx
4256957570 Add no-ssl2-method
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>

MR: #2341
2016-03-14 21:13:59 +01:00
Richard Levitte
e76f485391 Touch the correct variables for the system; shlib_wrap.sh on Solaris
If there is cause to think LD_LIBRARY_PATH_32 and LD_PRELOAD_32 are
appropriate variables to touch, do so.  Otherwise, touch the usual
LD_LIBRARY_PATH and LD_PRELOAD.  This covers for older installations
that don't have a mix of 32-bit and 64-bit libs.

Reviewed-by: Andy Polyakov <appro@openssl.org>
(cherry picked from commit a772e9d01a)
2016-03-09 12:21:01 +01:00
Richard Levitte
d3b3715072 Recognise 32-bit Solaris in util/shlib_wrap.sh
Submitted by Erik Forsberg <erik@efca.com>

Reviewed-by: Andy Polyakov <appro@openssl.org>
(cherry picked from commit 86e7543283)
2016-03-09 12:20:53 +01:00
Matt Caswell
08d0ff54d0 Ensure mk1mf.pl is aware of no-weak-ssl-ciphers option
Update mk1mf.pl to properly handle no-weak-ssl-ciphers

Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-01 12:41:49 +00:00
Emilia Kasper
259b664f95 CVE-2016-0798: avoid memory leak in SRP
The SRP user database lookup method SRP_VBASE_get_by_user had confusing
memory management semantics; the returned pointer was sometimes newly
allocated, and sometimes owned by the callee. The calling code has no
way of distinguishing these two cases.

Specifically, SRP servers that configure a secret seed to hide valid
login information are vulnerable to a memory leak: an attacker
connecting with an invalid username can cause a memory leak of around
300 bytes per connection.

Servers that do not configure SRP, or configure SRP but do not configure
a seed are not vulnerable.

In Apache, the seed directive is known as SSLSRPUnknownUserSeed.

To mitigate the memory leak, the seed handling in SRP_VBASE_get_by_user
is now disabled even if the user has configured a seed.

Applications are advised to migrate to SRP_VBASE_get1_by_user. However,
note that OpenSSL makes no strong guarantees about the
indistinguishability of valid and invalid logins. In particular,
computations are currently not carried out in constant time.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-24 18:39:13 +01:00
Andy Polyakov
0fffd52242 util/mk1mf.pl: use LINK_CMD instead of LINK variable.
Trouble is that LINK variable assignment in make-file interferes with
LINK environment variable, which can be used to modify Microsoft's
LINK.EXE behaviour.

RT#4289

Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit d44bb1c31c)

Resolved conflicts:
	util/pl/VC-32.pl
2016-02-11 21:25:24 +01:00
Kristian Amlie
7934ce27cd Don't use "grep -q", "-q" is not POSIX, and fails on Solaris.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-18 16:20:51 +01:00
Dr Stephen Henson
9501418ea2 Don't use applink for static builds.
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-12-09 00:30:29 +00:00
Emilia Kasper
c97c7f8d53 make depend: prefer clang over makedepend
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-10-14 19:08:54 +02:00
Dr. Stephen Henson
d62c64b947 Link in applink with fips_premain_dso
PR#4042

Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-09-29 18:43:02 +01:00
Rich Salz
3be39dc1e3 RT4044: Remove .cvsignore files.
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-09-15 11:58:27 -04:00
Richard Levitte
b012b497ea Add new types to indent.pro
Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit 3da9505dc0)
2015-08-17 18:24:33 +02:00
Dirk Wetter
49cc3f4038 GH336: Return an exit code if report fails
Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit e36ce2d986)
2015-08-01 14:33:09 -04:00
Ernie Hershey
033b558181 GH322: Fix typo in generated comment.
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
(cherry picked from commit ad282e638b)
2015-07-15 03:32:50 -04:00
Richard Levitte
9f0b86c68b Conversion to UTF-8 where needed
This leaves behind files with names ending with '.iso-8859-1'.  These
should be safe to remove.  If something went wrong when re-encoding,
there will be some files with names ending with '.utf8' left behind.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-07-14 01:17:45 +02:00
Richard Levitte
5a3ce86e21 Small script to re-encode files that need it to UTF-8
This requires 'iconv' and that 'file' can take the options '-b' and '-i'.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit f608b4064d)
2015-07-14 01:13:44 +02:00
Dr. Stephen Henson
2a7059c56f Sort @sstacklst correctly.
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-07-09 16:56:45 +01:00
Dr. Stephen Henson
adba3b3bf1 make update
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-06-03 15:18:20 +01:00
StudioEtrange
17b753f23a GitHub284: Fix typo in xx-32.pl scripts.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Signed-off-by: Rich Salz <rsalz@openssl.org>
2015-05-20 04:34:42 -04:00
Andy Polyakov
051b41df41 mk1mf.pl: replace chop for windows.
Backport old patch to make it work in mixture of perls for Windows.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Cherry-picked from 7bb98eee3c
2015-05-15 14:18:21 -04:00
Richard Levitte
42802a94be Have mkerr.pl treat already existing multiline string defs properly
Since source reformat, we ended up with some error reason string
definitions that spanned two lines.  That in itself is fine, but we
sometimes edited them to provide better strings than what could be
automatically determined from the reason macro, for example:

    {ERR_REASON(SSL_R_NO_GOST_CERTIFICATE_SENT_BY_PEER),
     "Peer haven't sent GOST certificate, required for selected ciphersuite"},

However, mkerr.pl didn't treat those two-line definitions right, and
they ended up being retranslated to whatever the macro name would
indicate, for example:

    {ERR_REASON(SSL_R_NO_GOST_CERTIFICATE_SENT_BY_PEER),
     "No gost certificate sent by peer"},

Clearly not what we wanted.  This change fixes this problem.

Reviewed-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit 2cfdfe0918)
2015-04-08 21:46:15 +02:00
Dr. Stephen Henson
ef116b0003 update ordinals
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-03-09 16:57:24 +00:00
Matt Caswell
6ee3997134 Update mkerr.pl for new format
Make the output from mkerr.pl consistent with the newly reformatted code.

Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-03-06 14:07:05 +00:00
Dr. Stephen Henson
6fff54b0ce Fix format script.
The format script didn't correctly recognise some ASN.1 macros and
didn't reformat some files as a result. Fix script and reformat
affected files.

Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit 437b14b533)
2015-03-02 13:43:17 +00:00
Rich Salz
db7cb7ab9a Remove unused eng_rsax and related asm file
Reviewed-by: Andy Polyakov <appro@openssl.org>
2015-01-26 10:46:26 -05:00
Dr. Stephen Henson
a1b20ff654 Delete trailing whitespace from output.
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22 09:28:43 +00:00
Dr. Stephen Henson
628afe685e Add -d debug option to save preprocessed files.
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22 09:28:38 +00:00
Dr. Stephen Henson
defc825e9e Test option -nc
Add option -nc which sets COMMENTS=true but disables all indent comment
reformatting options.

Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22 09:28:32 +00:00
Matt Caswell
3807db9d91 Add ecp_nistz256.c to list of files skipped by openssl-format-source
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22 09:28:20 +00:00
Matt Caswell
0f344da8f7 Manually reformat aes_x86core.c and add it to the list of files skipped by
openssl-format-source

Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22 09:28:14 +00:00
Matt Caswell
d18d367d90 Amend openssl-format-source so that it give more repeatable output
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22 09:27:41 +00:00
Matt Caswell
e4e5457c29 Manually reformat aes_core.c
Add aes_core.c to the list of files not processed by openssl-format-source

Conflicts:
	crypto/aes/aes_core.c

Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22 09:27:10 +00:00
Matt Caswell
9b214383c1 Add obj_dat.h to the list of files that will not be processed by
openssl-format-source

Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22 09:27:05 +00:00
Matt Caswell
39108d595e Fix logic to check for indent.pro
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22 09:25:58 +00:00
Matt Caswell
d2f8517ad0 Fix make errors
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22 09:25:13 +00:00
Richard Levitte
27df27d4b9 Make the script a little more location agnostic
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22 09:25:06 +00:00
Matt Caswell
4a81e0f0d6 Provide script for filtering data initialisers for structs/unions. indent just can't handle it.
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22 09:24:59 +00:00
Dr. Stephen Henson
24e6a032bf Script fixes.
Don't use double newline for headers.
Don't interpret ASN1_PCTX as start of an ASN.1 module.

Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22 09:24:44 +00:00
Richard Levitte
9d63b5e375 Run expand before perl, to make sure things are properly aligned
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22 09:24:38 +00:00
Richard Levitte
a45030fc9b Force the use of our indent profile
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22 09:24:32 +00:00
Tim Hudson
45b575a031 Provide source reformating script. Requires GNU indent to be
available.

Script written by Tim Hudson, with amendments by Steve Henson, Rich Salz and
Matt Caswell

Reviewed-by: Matt Caswell <matt@openssl.org>
2015-01-22 09:24:12 +00:00
Matt Caswell
36f694e09a Make output from openssl version -f consistent with previous versions
Reviewed-by: Andy Polyakov <appro@openssl.org>
(cherry picked from commit 2d2671790e)
2015-01-13 11:28:54 +00:00
Matt Caswell
5cee72382c Fix build failure on Windows due to undefined cflags identifier
Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit 5c5e7e1a7e)
2015-01-08 19:24:09 +00:00
Matt Caswell
8dc461eccf Remove blank line from start of cflags character array in buildinf.h
Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit b691154e18)
2015-01-06 15:35:15 +00:00
Dr. Stephen Henson
d96c24926d update ordinals
Reviewed-by: Emilia Käsper <emilia@openssl.org>
(cherry picked from commit 31c65a7bc0)
2015-01-05 16:51:41 +00:00
Matt Caswell
b651407268 Fix a problem if CFLAGS is too long cversion.c fails to compile when config
is run with --strict-warnings.

Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit 488f16e31b)
2014-12-19 14:05:25 +00:00