Commit Graph

7052 Commits

Author SHA1 Message Date
Alessandro Ghedini
dad0b512e6 Remove bugs/ and crypto/threads/
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-10-23 18:41:04 +02:00
Richard Levitte
5212d39bd9 Only include SRP headers when OPENSSL_NO_SRP is undefined
[fixes github issue #447]

Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-10-22 23:45:45 +02:00
Richard Levitte
15db6a40d3 make update
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-10-21 23:57:29 +02:00
Richard Levitte
a0e8da5d92 Don't forget to load the CT error strings
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-10-21 23:57:29 +02:00
Richard Levitte
cc79f06c0a Handle CT error macros separately
Because the default error macro generator assumes the header file with
error macros is in include/openssl and therefore generates a C file
with error texts that include <openssl/{name}.h>, we need to generate
the error macros and texts for CT separately, since the CT module
doesn't follow the default criteria.

Reviewed-by: Matt Caswell <matt@openssl.org>
2015-10-21 23:57:29 +02:00
Richard Levitte
788d72ba02 ct_locl.h moved, reflect it in crypto/ct/Makefile
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-10-18 21:31:21 +02:00
Richard Levitte
338cb76220 make update
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-10-18 20:35:22 +02:00
Richard Levitte
eb6d5f9983 Because ct_locl.h is used between modules, move it to internal headers
Rename it to ct_int.h

Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-10-18 20:35:22 +02:00
Dr. Stephen Henson
7f3e6f8c24 set string type when embedding
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-10-18 12:13:54 +01:00
Matt Caswell
8b7080b0b7 Remove Obsolete engines
There are a number of engines in the OpenSSL source code which are now
obsolete. The following engines have been removed: 4758cca, aep, atalla,
cswift, nuron, sureware.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-10-15 17:02:06 +01:00
Dr. Stephen Henson
f51e5ed6b4 Fix self signed handling.
Don't mark a certificate as self signed if keyUsage is present and
certificate signing not asserted.

PR#3979

Reviewed-by: Matt Caswell <matt@openssl.org>
2015-10-15 15:36:58 +01:00
Dr. Stephen Henson
34a42e1489 embed CRL serial number and signature fields
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-10-15 15:36:58 +01:00
Dr. Stephen Henson
81e4943843 embed certificate serial number and signature fields
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-10-15 15:36:58 +01:00
Dr. Stephen Henson
4392479c08 embed value field of X509_EXTENSION
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-10-15 15:36:58 +01:00
Dr. Stephen Henson
4002da0f52 Handle embed flag in ASN1_STRING_copy().
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-10-15 15:36:57 +01:00
Emilia Kasper
6f73d28c20 Remove EVP_CHECK_DES_KEY
Thanks to the OpenBSD community for bringing this to our attention.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-10-14 18:45:33 +02:00
Emilia Kasper
b84939cc96 ct_locl.h: fix some comments
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-10-14 17:19:35 +02:00
Dr. Stephen Henson
4ec36aff2a RFC5753 compliance.
RFC5753 requires that we omit parameters for AES key wrap and set them
to NULL for 3DES wrap. OpenSSL decrypt uses the received algorithm
parameters so can transparently handle either form.

Reviewed-by: Andy Polyakov <appro@openssl.org>
2015-10-13 22:57:47 +01:00
Dr. Stephen Henson
af170194a8 embed OCSP_CERTID
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-10-11 20:33:57 +01:00
Dr. Stephen Henson
47c9a1b509 embed support for ASN1_STRING
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-10-11 20:33:57 +01:00
Dr. Stephen Henson
a332635ea0 Embed various OCSP fields.
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-10-11 20:33:57 +01:00
Dr. Stephen Henson
44c734e95c embed support for CHOICE type
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-10-11 20:33:56 +01:00
Dr. Stephen Henson
c69ce93513 Typo.
PR#4079

Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-10-11 00:06:56 +01:00
Matt Caswell
0f0cfbe24c Fix Windows build
Add the new ct directory to mkfiles.pl and fix the ct Makefile

Reviewed-by: Andy Polyakov <appro@openssl.org>
2015-10-09 12:10:16 +01:00
Adam Eijdenberg
3149baf83c Initial commit for Certificate Transparency support
Original authors:
Rob Stradling <rob@comodo.com>
Dr. Stephen Henson <steve@openssl.org>

Reviewed-by: Emilia Kasper <emilia@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-10-09 11:32:25 +02:00
Matt Caswell
dffe51091f Don't treat a bare OCTETSTRING as DigestInfo in int_rsa_verify
The function int_rsa_verify is an internal function used for verifying an
RSA signature. It takes an argument |dtype| which indicates the digest type
that was used. Dependant on that digest type the processing of the
signature data will vary. In particular if |dtype == NID_mdc2| and the
signature data is a bare OCTETSTRING then it is treated differently to the
default case where the signature data is treated as a DigestInfo (X509_SIG).

Due to a missing "else" keyword the logic actually correctly processes the
OCTETSTRING format signature first, and then attempts to continue and
process it as DigestInfo. This will invariably fail because we already know
that it is a bare OCTETSTRING.

This failure doesn't actualy make a real difference because it ends up at
the |err| label regardless and still returns a "success" result. This patch
just cleans things up to make it look a bit more sane.

RT#4076

Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-10-08 13:50:41 +01:00
Richard Levitte
5850cc75ea When ENGINE_add finds that id or name is missing, actually return
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-10-08 11:53:07 +02:00
Pascal Cuoq
8314146ac5 Don't check pointer we just freed, always set it to NULL.
Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Rich Salz <rsalz@openssl.org>
MR #1231
2015-10-07 18:54:13 +02:00
Pascal Cuoq
c804d23d73 Move BN_CTX_start() call so the error case can always call BN_CTX_end().
Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Rich Salz <rsalz@openssl.org>
MR #1231
2015-10-07 18:54:13 +02:00
Pascal Cuoq
99c2033375 Move BN_CTX_start() call so the error case can always call BN_CTX_end().
Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Rich Salz <rsalz@openssl.org>
MR #1231
2015-10-07 18:54:13 +02:00
Pascal Cuoq
f92768e6f5 Set flags to 0 before calling BN_with_flags()
BN_with_flags() will read the dest->flags to keep the BN_FLG_MALLOCED but
overwrites everything else.

Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Rich Salz <rsalz@openssl.org>
MR #1231
2015-10-07 18:54:12 +02:00
Alessandro Ghedini
2d28462373 Fix travis builds on master
-Allow mingw debug builds to fail on Travis CI
-Fix Travis email notifications config
-Rename a variable to avoid a bogus warning with old GCC
 error: declaration of ``dup'' shadows a global declaration [-Werror=shadow]
-Disable pedantic ms-format warnings with mingw
-Properly define const DH parameters
-Restore --debug flag in Travis CI builds; -d would get incorrectly passed
 to ./Configure in mingw debug builds.

Signed-off-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-10-06 12:30:47 -04:00
Dmitry Belyavskiy
52ee3ed3a1 New cipher and cipher modes standardized in Russia
This change introduces short names and NIDs for Russian GOST ciphers
according to GOST R 34.13-2015

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-10-05 21:55:10 +01:00
Andy Polyakov
5f0580ccf1 Harmonize pointer printing and size_t-fy casts.
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-10-05 09:26:19 +02:00
Andy Polyakov
21ff9ac815 bio/bss_log.c: harmonize format string to silence -Wformat.
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-10-05 09:25:54 +02:00
Andy Polyakov
b13fdc4860 Explicitly cast INVALID_SOCKET to (int) to address warnings on Windows.
Even though SOCKET is effectively declared as (void *) on Windows, it's
not actually a pointer, but an index within per-process table of
kernel objects. The table size is actually limited and its upper limit
is far below upper limit for signed 32-bit integer. This is what makes
cast in question possible.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-10-05 09:22:54 +02:00
Dr. Stephen Henson
f93ad22f6a Free up ASN.1 structures at top level only.
When a decoding error in ASN.1 occurs only free up the partial structure
at the top level. This simplifies embedded handling and fixes freeing
up of structures when presented with malformed input.

Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-10-05 03:31:41 +01:00
Kurt Roeckx
605236f6a8 Fix more d2i cases to properly update the input pointer
Thanks to David Benjamin <davidben@google.com> for pointing them out.

Reviewed-by: Steve Henson <steve@openssl.org>
MR #1198
2015-10-03 13:22:52 +02:00
Rich Salz
9982cbbbf6 Remove BIO_s_file_internal macro.
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-10-02 14:22:05 -04:00
Andy Polyakov
8eed3289b2 bn/asm/armv4-mont.pl: boost NEON performance.
Close difference gap on Cortex-A9, which resulted in further improvement
even on other processors.

Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-09-30 17:48:30 +02:00
Rich Salz
75f648aa06 Make update / libeay.num fix
Looks like someone forgot to do a "make update" since crypto/ts/Makefile
keeps changing.  So include that.

Second is that the declare_dh_bn macro fools the libeay.num script.
The declarations are only needed in one file (dh_rfc5114) so remove
them from the header and put the "raw" declarations directly into that
file.

Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-09-30 11:15:14 -04:00
Matt Caswell
c58f3e4293 Add GOST12 cms/smime capabilities
Add additional NID references in the CMS/SMIME capabilities code to cater
for GOST12.

Patch supplied by Dmitry Belyavsky <beldmit@gmail.com>

Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-09-30 11:39:24 +01:00
David Woodhouse
984d6c6052 Fix no-stdio build
Much related/similar work also done by
Ivan Nestlerode <ivan.nestlerode@sonos.com>

   +Replace FILE BIO's with dummy ops that fail.
   +Include <stdio.h> for sscanf() even with no-stdio (since the declaration
    is there). We rely on sscanf() to parse the OPENSSL_ia32cap environment
    variable, since it can be larger than a 'long'. And we don't rely on the
    availability of strtoull().
   +Remove OPENSSL_stderr(); not used.
   +Make OPENSSL_showfatal() do nothing (currently without stdio there's
    nothing we can do).
   +Remove file-based functionality from ssl/. The function
    prototypes were already gone, but not the functions themselves.
   +Remove unviable conf functionality via SYS_UEFI
   +Add fallback definition of BUFSIZ.
   +Remove functions taking FILE * from header files.
   +Add missing DECLARE_PEM_write_fp_const
   +Disable X509_LOOKUP_hash_dir(). X509_LOOKUP_file() was already compiled out,
    so remove its prototype.
   +Use OPENSSL_showfatal() in CRYPTO_destroy_dynlockid().
   +Eliminate SRP_VBASE_init() and supporting functions. Users will need to
    build the verifier manually instead.
   +Eliminate compiler warning for unused do_pk8pkey_fp().
   +Disable TEST_ENG_OPENSSL_PKEY.
   +Disable GOST engine as is uses [f]printf all over the place.
   +Eliminate compiler warning for unused send_fp_chars().

Signed-off-by: Rich Salz <rsalz@akamai.com>
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-09-29 21:59:19 -04:00
Andy Polyakov
db40a14ecb Fix -Wshadow warnings in mingw builds.
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-09-29 18:05:55 +02:00
Andy Polyakov
156561b0ad Fix pedantic warnings in mingw builds.
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-09-29 18:05:40 +02:00
Andy Polyakov
8be7438f16 Rationalize .gitignore and harmonize pair of Makefiles.
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-09-29 18:02:35 +02:00
Andy Polyakov
b7f5503fa6 Skylake performance results.
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-09-26 19:50:11 +02:00
Andy Polyakov
5e5ece561d Allow ILP32 compilation in AArch64 assembly pack.
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-09-25 13:38:48 +02:00
Andy Polyakov
11208dcfb9 ARMv4 assembly pack: implement support for Thumb2.
As some of ARM processors, more specifically Cortex-Mx series, are
Thumb2-only, we need to support Thumb2-only builds even in assembly.

Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-09-25 13:34:02 +02:00
Matt Caswell
01b7851aa2 Add BIO_CTRL_DGRAM_SET_PEEK_MODE
Add the ability to peek at a message from the DTLS read BIO. This is needed
for the DTLSv1_listen rewrite.

Reviewed-by: Andy Polyakov <appro@openssl.org>
2015-09-23 13:53:26 +01:00