Commit Graph

258 Commits

Author SHA1 Message Date
jym 714fcad23a Turn AES NI support code into something more readable.
i386 and amd64 both tested with their own chroot. No regression observed.
2011-07-22 22:50:55 +00:00
joerg 5158e28f3b Disable Clang's integrated assembler for the AES-NI files for now.
Somewhere in this mess of .byte streams, corruption happens. Disassembly
only shows slightly different filling of alignment sequences, further
analysis is needed.

XXX This should be rewritten to be proper assembler code
2011-07-17 19:48:31 +00:00
drochner 929391d8b0 remove SSL3_FLAGS_ALLOW_UNSAFE_LEGACY_RENEGOTIATION -- openssl uses
another mechanism now, and these remainders break renogotiation with
(at least) tor and postgres
2011-07-07 18:11:18 +00:00
spz c22e711e00 cpuid and aesni additions for i386 2011-07-05 16:53:58 +00:00
spz 7d2aeb8d2a more pieces to enable using the assembler routines and aes-ni for amd64 2011-07-05 10:42:54 +00:00
spz e910cee8f4 fix some define and cleanliness issues relevant when test compiling
in dist (which we normally don't do)
2011-07-05 10:29:22 +00:00
spz 0d71cd5d7d use aes-ni for i386 also: from jym@ 2011-07-05 10:25:45 +00:00
spz 3619dd3d7c version bump second part 2011-07-05 10:06:10 +00:00
mrg c111245a78 apply some -Wno-error and/or -fno-strict-aliasing.
all of this should be looked at closer, but some of them are not
very trivial.
2011-06-22 02:49:41 +00:00
mrg 7496e29126 adjust a grep pattern to (only) match the right line with GCC 4.5.
from chuq.
2011-06-21 02:19:30 +00:00
spz 82dcaa0984 - fix a typo in libcrypto.pl
- refresh manpages
2011-06-13 18:53:31 +00:00
spz 9574586d3a fix AES-NI (using David Woodhouse's patch for OpenSSL 1.0.0) & re-enable
inclusion of AES-NI capability
builds, but is untested due to lack of hardware
2011-06-13 14:19:48 +00:00
spz f946e5a9cd remove unhelpful '.file' paths, just name the file itself 2011-06-13 06:22:08 +00:00
christos fd1d0fa83b fix warnings for the patented algos 2011-06-12 16:15:42 +00:00
christos abf33ee14d format fixes, prototype fixes, const fixes 2011-06-11 16:54:56 +00:00
spz f7ec5c1e8b more missing file mentions, kudos Kurt Schreiner (ks at ub.uni-mainz.de) 2011-06-06 13:43:48 +00:00
spz 0f31b40708 more missing files. Are we there yet? 2011-06-06 08:04:19 +00:00
spz 5865763239 add a bunch of files to the lib that we build. 2011-06-06 06:44:57 +00:00
spz 4a68bbbf8c re-gen of the assembler files created these
(changed files were committed previously)
2011-06-06 06:08:52 +00:00
spz 5bf0fb60b1 merge
It builds, which is an improvement to before. It may not work.
AES-NI is disabled and needs to be retrofitted yet
2011-06-05 23:09:44 +00:00
spz 4e3dcb232d Import OpenSSL 1.0.1 stable of 20110605:
this is sort of a sidegrade onto the release branch. Changes against the
last version imported:

*) Backport libcrypto audit of return value checking from HEAD, not
   all cases can be covered as some introduce binary incompatibilities.
   [Steve Henson]

*) Redirect RSA operations to FIPS module including keygen,
   encrypt, decrypt, sign and verify. Block use of non FIPS RSA methods.
   [Steve Henson]

*) Add similar low level API blocking to ciphers.
   [Steve Henson]

*) Low level digest APIs are not approved in FIPS mode: any attempt
   to use these will cause a fatal error. Applications that *really* want
   to use them can use the private_* version instead.
   [Steve Henson]

*) Redirect cipher operations to FIPS module for FIPS builds.
   [Steve Henson]

*) Redirect digest operations to FIPS module for FIPS builds.
   [Steve Henson]

*) Update build system to add "fips" flag which will link in fipscanister.o
   for static and shared library builds embedding a signature if needed.
   [Steve Henson]

*) Output TLS supported curves in preference order instead of numerical
   order. This is currently hardcoded for the highest order curves first.
   This should be configurable so applications can judge speed vs strength.
   [Steve Henson]

*) Add protection against ECDSA timing attacks as mentioned in the paper
   by Billy Bob Brumley and Nicola Tuveri, see:

      http://eprint.iacr.org/2011/232.pdf

   [Billy Bob Brumley and Nicola Tuveri]

*) Add TLS v1.2 server support for client authentication.
   [Steve Henson]

*) Add support for FIPS mode in ssl library: disable SSLv3, non-FIPS ciphers
   and enable MD5.
   [Steve Henson]

*) Functions FIPS_mode_set() and FIPS_mode() which call the underlying
   FIPS modules versions.
   [Steve Henson]

*) Add TLS v1.2 client side support for client authentication. Keep cache
   of handshake records longer as we don't know the hash algorithm to use
   until after the certificate request message is received.
   [Steve Henson]

*) Initial TLS v1.2 client support. Add a default signature algorithms
   extension including all the algorithms we support. Parse new signature
   format in client key exchange. Relax some ECC signing restrictions for
   TLS v1.2 as indicated in RFC5246.
   [Steve Henson]

*) Add server support for TLS v1.2 signature algorithms extension. Switch
   to new signature format when needed using client digest preference.
   All server ciphersuites should now work correctly in TLS v1.2. No client
   support yet and no support for client certificates.
   [Steve Henson]

*) Initial TLS v1.2 support. Add new SHA256 digest to ssl code, switch
   to SHA256 for PRF when using TLS v1.2 and later. Add new SHA256 based
   ciphersuites. At present only RSA key exchange ciphersuites work with
   TLS v1.2. Add new option for TLS v1.2 replacing the old and obsolete
   SSL_OP_PKCS1_CHECK flags with SSL_OP_NO_TLSv1_2. New TLSv1.2 methods
   and version checking.
   [Steve Henson]

*) New option OPENSSL_NO_SSL_INTERN. If an application can be compiled
   with this defined it will not be affected by any changes to ssl internal
   structures. Add several utility functions to allow openssl application
   to work with OPENSSL_NO_SSL_INTERN defined.
   [Steve Henson]

*) Add SRP support.
   [Tom Wu <tjw@cs.stanford.edu> and Ben Laurie]

*) Add functions to copy EVP_PKEY_METHOD and retrieve flags and id.
   [Steve Henson]

*) Add EC_GFp_nistp224_method(), a 64-bit optimized implementation for
   elliptic curve NIST-P224 with constant-time single point multiplication on
   typical inputs.  EC_GROUP_new_by_curve_name() will automatically use this
   (while EC_GROUP_new_curve_GFp() currently won't and prefers the more
   flexible implementations).

   The implementation requires support for the nonstandard type __uint128_t,
   and so is disabled by default.  To include this in your build of OpenSSL,
   use -DEC_NISTP224_64_GCC_128 on the Configure (or config) command line,
   and run "make depend" (or "make update").
   [Emilia K<E4>sper <emilia.kasper@esat.kuleuven.be> (Google)]

*) Permit abbreviated handshakes when renegotiating using the function
   SSL_renegotiate_abbreviated().
   [Robin Seggelmann <seggelmann@fh-muenster.de>]

*) Add call to ENGINE_register_all_complete() to
   ENGINE_load_builtin_engines(), so some implementations get used
   automatically instead of needing explicit application support.
   [Steve Henson]

*) Add support for TLS key exporter as described in RFC5705.
   [Robin Seggelmann <seggelmann@fh-muenster.de>, Steve Henson]
2011-06-05 14:55:58 +00:00
joerg a216da57a6 Default to -Wno-sign-compare -Wno-pointer-sign for clang.
Push -Wno-array-bounds down to the cases that depend on it.
Selectively disable warnings for 3rd party software or non-trivial
issues to be reviewed later to get clang -Werror to build most of the
tree.
2011-05-26 12:56:24 +00:00
christos 8d814b5aa6 fix main prototypes. 2011-05-16 00:08:33 +00:00
christos 0648f64e9b no more implicit types in c99 2011-05-15 23:43:56 +00:00
spz 03e283f07f fix for CVE-2011-0014 (OCSP stapling vulnerability in OpenSSL)
patch taken from http://www.openssl.org/news/secadv_20110208.txt
2011-02-10 06:04:54 +00:00
drochner 0bac615281 fix some merge botch and enable cryptodev support on NetBSD again 2011-02-03 19:44:05 +00:00
drochner ee60145ccf fix bug introduced by last security patch, from upstream CVS:
Don't assume a decode error if session tlsext_ecpointformatlist is
not NULL: it can be legitimately set elsewhere.
2010-12-07 10:03:29 +00:00
drochner ad512a613f openssl security patch of the day:
Fix a flaw in the OpenSSL SSL/TLS server code where an old bug
workaround allows malicous clients to modify the stored session cache
ciphersuite. In some cases the ciphersuite can be downgraded to a weaker one
on subsequent connections. See
http://www.openssl.org/news/secadv_20101202.txt
(CVE-2010-4180)
2010-12-07 09:10:21 +00:00
drochner fe04c71aa0 apply patch from http://www.openssl.org/news/secadv_20101116.txt
to fix a race condition which can be exploited in a buffer
overrun attack (CVE-2010-3864)
2010-11-17 12:09:34 +00:00
joerg 398cced2a2 Include DHparams_print_fp 2010-08-21 13:47:37 +00:00
drochner f6781b59b4 fix a double free() in error case, see the thread
"openssl-1.0.0a and glibc detected sthg ;)" in openssl-dev.
I was getting a SEGV with the example posted there.
2010-08-10 11:01:00 +00:00
mrg 4c92852a80 remove almost all the ability to build netbsd with an a.out target.
we're ELF now, and there are many missing checks against OBJECT_FMT.
if we ever consider switching, the we can figure out what new ones
we need but for now it's just clutter.

this doesn't remove any of the support for exec_aout or any actually
required-for-boot a.out support, only the ability to build a netbsd
release in a.out format.  ie, most of this code has been dead for
over a decade.

i've tested builds on vax, amd64, i386, mac68k, macppc, sparc, atari,
amiga, shark, cats, dreamcast, landisk, mmeye and x68k.  this covers
the 5 MACHINE_ARCH's affected, and all the other arch code touched.
it also includes some actual run-time testing of sparc, i386 and
shark, and i performed binary comparison upon amiga and x68k as well.


some minor details relevant:
- move shlib.[ch] from ld.aout_so into ldconfig proper, and cut them
  down to only the parts ldconfig needs
- remove various unused source files
- switch amiga bootblocks to using elf2bb.h instead of aout2bb.h
2010-07-06 05:59:50 +00:00
joerg 1236f09bea Regen with modern pod2man and drop trailing whitespace. 2010-04-12 18:03:46 +00:00
joerg c987ee8936 Rename management target to not overlap with the normal mk rules.
Explicitly drop trailing whitespace after pod2man.
2010-04-12 18:02:46 +00:00
joerg 86c2d11e12 Regen man pages with modern pod2man to get more normalised version. 2010-04-12 17:59:37 +00:00
joerg 1e8d9fce59 Add management target for the man pages. 2010-04-12 17:58:40 +00:00
bouyer 769c627b01 Fix crash in openssl (I suspect caused by malformed packets):
handshake_dgst[] may be used without being allocated, causing NULL
pointer dereference.
Fix by checking that handshake_dgst is not NULL before use.
Reported to openssl as ticket openssl.org #2214.
Fix tested on netbsd-5 by Luke Mewburn with apache, and by me with
freeradius (fixing segmentation fault in both cases).
2010-04-09 04:34:13 +00:00
mrg 10c07693d7 for now, use the C versions of bn and des, not the (32 bit) versions,
on powerpc64.

from dennis.c.ferguson@gmail.com in PR#43073.
2010-03-30 07:23:51 +00:00
bouyer 542d193bfe Apply patchset 19476 from openssl repository, fixing CVE-2010-0740.
from http://www.openssl.org/news/secadv_20100324.txt:
"In TLS connections, certain incorrectly formatted records can cause an OpenSSL
client or server to crash due to a read attempt at NULL".
2010-03-28 11:32:29 +00:00
joerg 0cb1711763 Ensure that SHA384 always calls the SHA384 functions.
Should fix PR 42881.
2010-03-01 21:47:43 +00:00
wiz 8f657e21de Fix typo (specifed -> specified). 2010-02-18 14:00:39 +00:00
joerg 0fa8619ec0 Fix some POD errors in the OpenSSL man pages. Regen them. Install some
missing man pages.
2010-01-24 21:19:53 +00:00
joerg 92dbe11dbb Make VERSION work with newer OpenSSL. 2010-01-24 19:16:05 +00:00
taca bf8e25a5bf Fix to deal with CVE-2009-4355 from OpenSSL's repositroy. 2010-01-22 03:42:47 +00:00
tonnerre e5ca1f295b Instead of unconditionally disabling SSL3 renegociation, add the flag
SSL3_FLAGS_ALLOW_UNSAFE_LEGACY_RENEGOTIATION which can be set by the
software which needs unsafe renegociation. Patch from OpenSSL CVS.
2010-01-10 16:39:10 +00:00
christos bfc463fe1e merge conflicts and undo the session renegotiation disabling code. 2009-12-27 00:48:55 +00:00
christos cef2ee707e import SNAP-20091226 2009-12-26 23:29:52 +00:00
christos 4ab80ffe22 Disable SSL V3 session renegotiation since the protocol parameters of the
old session are not cryptographically tied to the new session ones.
NB: Applications that require session re-negotiation will fail after this
update.
2009-12-03 23:44:33 +00:00
christos 13492ada53 This code is really broken. It allocates struct sockaddr on the stack
and expects to work with IPV6. Tell the hints that we only want IPV4
for now, so that we don't try to bind to an IPV6 address as returned
by getaddrinfo, and then we bash in V4 in the family!
jeez
2009-08-15 01:25:54 +00:00
christos e70d1f0896 don't try to free a buffer that came from the arguments, make a copy instead.
This can happen if we specify --port
2009-08-15 01:03:03 +00:00
christos bb8cb2851b resolve conflicts 2009-08-05 18:38:21 +00:00
christos 86adef1b84 import 20090805 snapshot. 2009-08-05 18:31:57 +00:00
christos d7ed66ca45 make tests compile! 2009-07-20 20:41:05 +00:00
christos 75efea6592 bump libcrypto and friends; OpenSSL abi change: do_cipher last argument
changed from u_int to size_t. Affects _LP64 only.
2009-07-20 17:30:52 +00:00
christos 9610bc301c make sha256/512 binary compatible with the libc version which we now use. 2009-07-20 15:34:49 +00:00
christos 75534b786a Add one more generated file and install in /usr/bin 2009-07-19 23:33:34 +00:00
christos 49d46fa3c8 - add build glue
- apply our changes
2009-07-19 23:30:37 +00:00
christos a89c9211e5 import new openssl snapshot 2009-07-19 23:01:17 +00:00