Commit Graph

3238 Commits

Author SHA1 Message Date
christos c48b6ae7fc new config file 2019-01-07 15:43:17 +00:00
christos 71d1bfd50f merge conflicts. 2019-01-07 15:43:04 +00:00
christos 8cc77b481a tpm-tools (1.3.9.1)
- Builds with openssl 1.1.0
    - Align code properly so gcc-6 does not complain
    - update symbol file.
    - drop 02-cflags-errors-unused.patch, -Werror is gone.
    - update 03-fix-bool-error-parseStringWithValues.patch, different fix
      upstream, does not look right.

tpm-tools (1.3.8.2)

  * Add patch 03 to fix FTBFS with gcc-5
  * Merge patch 04 to fix FTBFS with clang
    Thanks to Alexander <email address hidden> for the patch.
  * Bump Standards Version to 3.9.6
2019-01-07 15:37:41 +00:00
christos 1cebe59da2 merge conflicts 2019-01-07 15:18:03 +00:00
christos 1023804e38 * TROUSERS_0_3_14
- Changes to support OpenSSL 1.1.0
- Removed some warnings for proper builds
- Changes to allow building on OS X
- Fixed memory leaks
- Fixed failure to recognize connections from localhost over IPv6
- Fixed for an exploitable local denial of service in tcsd

* TROUSERS_0_3_13
- Changed exported functions which had a name too common, to avoid collision
- Assessed daemon security using manual techniques and coverit
- Fixed major security bugs and memory leaks
- Added debug support to run tcsd with a different user/group
- Daemon now properly closes sockets before shutting down

* TROUSERS_0_3_12
- Added new network code for RPC, which supports IPv6
- Users of client applications can configure the hostname of the tcsd server
they want to connect through the TSS_TCSD_HOSTNAME env var (only works if
application didn't set a hostname in the context)
- Added disable_ipv4 and disable_ipv6 config options for server

* TROUSERS_0_3_11
- Fix build process for distros
- License was changed from GPL to BSD
- Many bugfixes
- updated man pages
2019-01-07 14:57:23 +00:00
christos ba1213d69a regen 2019-01-06 22:22:02 +00:00
christos 6210d3c848 PR/53838: Scole Mail: OPENSSL_rdtsc() is reading a time counter
for randomness, and the powerpc code uses mftbu and mftb for access.
The 601 is different than other powerpcs. It doesn't have a time
base register (TBR), but a real time clock (RTC) so it needs to
use different calls like mfrtcu/mfrtcl instead.
2019-01-06 22:20:50 +00:00
christos a391bfdb6d add new file (Robert Swindells) 2018-12-09 21:39:48 +00:00
christos deb6f0161a Add engines infrastructure, not hooked to the build:
1. sets needs to be fixed
2. need to decide if I am going to add engine.so.MAJOR or use engine.so
   like OpenSSL wants
3. padlock is MD (x86) needs asm to be added, and conditionally built
2018-12-08 23:24:01 +00:00
christos bf8eace1c0 Merge conflicts 2018-12-08 22:35:42 +00:00
christos f4f044c4b1 Changes between 1.1.1 and 1.1.1a [20 Nov 2018]
*) Timing vulnerability in DSA signature generation

     The OpenSSL DSA signature algorithm has been shown to be vulnerable to a
     timing side channel attack. An attacker could use variations in the signing
     algorithm to recover the private key.

     This issue was reported to OpenSSL on 16th October 2018 by Samuel Weiser.
     (CVE-2018-0734)
     [Paul Dale]

  *) Timing vulnerability in ECDSA signature generation

     The OpenSSL ECDSA signature algorithm has been shown to be vulnerable to a
     timing side channel attack. An attacker could use variations in the signing
     algorithm to recover the private key.

     This issue was reported to OpenSSL on 25th October 2018 by Samuel Weiser.
     (CVE-2018-0735)
     [Paul Dale]

  *) Added EVP_PKEY_ECDH_KDF_X9_63 and ecdh_KDF_X9_63() as replacements for
     the EVP_PKEY_ECDH_KDF_X9_62 KDF type and ECDH_KDF_X9_62(). The old names
     are retained for backwards compatibility.
     [Antoine Salon]

  *) Fixed the issue that RAND_add()/RAND_seed() silently discards random input
     if its length exceeds 4096 bytes. The limit has been raised to a buffer size
     of two gigabytes and the error handling improved.

     This issue was reported to OpenSSL by Dr. Falko Strenzke. It has been
     categorized as a normal bug, not a security issue, because the DRBG reseeds
     automatically and is fully functional even without additional randomness
     provided by the application.
2018-12-08 22:33:03 +00:00
christos 0ef48146df Put back devcrypto (what was called cryptodev) engine support. 2018-12-08 17:07:27 +00:00
maya 5e0e9ff149 Don't expose a getauxval symbol.
The code already knows how to handle it, but it assumes anyone who uses
GCC or clang might resolve the getauxval function to something eventually.

The only time we will expose getauxval is if a package tries to substitute
getauxval too, and then code will start having mysterious failures.

getauxval is purely a linux function (as far as I can see), so limit it to
that.

PR pkg/53387, PR port-arm/53386
2018-11-20 07:30:17 +00:00
ozaki-r 16fc099a65 Use Cm instead of Li or Ar for fixed command strings 2018-11-19 04:54:37 +00:00
mlelstv 3118701f5e Fix some error handling, json support, keyring handling. 2018-11-13 14:52:30 +00:00
martin f6fb28f512 Ooops - fix editor accident in previous 2018-10-15 12:45:52 +00:00
martin ad88e5ac0b Define OPENSSL_NO_EC_NISTP_64_GCC_128 for sparc64, the code does
not work there (or maybe any big endian machine).
Fixes PR bin/53670.
2018-10-15 12:27:58 +00:00
maxv f1c81f6829 Remove dead files that have never been built, and likely can't build since
they are not correct C files.
2018-10-14 08:36:09 +00:00
maxv 0fe8cb7566 Clean up setkey: remove dead wood, KNF, localify, and slightly improve. 2018-10-14 08:27:39 +00:00
maxv 7666e47285 Fix SF#24: incorrect authentication algorithms, copy-pasto. 2018-10-13 15:38:28 +00:00
maxv 2be45af163 Fix ticket SF#91: pass the correct size for tbuf. 2018-10-13 15:17:45 +00:00
maxv 05d534bebd Reduce the diff against the latest release. Also remove netbsd-import.sh,
since we are upstream now.
2018-10-13 15:08:51 +00:00
christos f84d9921ff Add the EC_GFp_nistp*_method's 2018-10-10 14:57:31 +00:00
martin c822cfe197 On 32bit platforms set OPENSSL_NO_EC_NISTP_64_GCC_128 again, the non
standard __uint128_t is required for the code, but only provided by gcc
on 64bit archs.
2018-10-10 06:16:55 +00:00
christos 34a6ee4275 enable OPENSSL_NO_EC_NISTP_64_GCC_128, requested by wiz 2018-10-10 01:29:25 +00:00
christos be750853ee elide a warning that triggers on arm/clang 2018-10-08 18:01:23 +00:00
christos 006807b168 Skip man pages that conflict (but have different case with libc: {hmac,md5}.3
and libdes: des_random_key.3)
2018-10-08 16:31:35 +00:00
christos 5f39f5717b disable another clang warning 2018-10-06 15:31:09 +00:00
christos 52b4b66650 From Thomas Reim:
Current racoon code cannot detect duplicate last fragments as it uses
the fragment flag instead of the fragment number.

The code does not consider that the IKE payload fragments might not be
received in the correct order. In this case, packet complete detection
will again fail and VPN clients abandoned from VPN service.
Nevertheless, clients still can add fragments to the fragment queue and
fill it up to the possible 255 fragments. Only duplicates are detected,
but not the fragments with a number greater than the last fragment
number.

The last fragment number is kept in the Phase 1 handler
after fragment queue deletion, which may lead to error notifications
after succesful reassembly of the IKE phase 1 message.

In general, the 2017's CVE fix added laconic and difficult to understand
failure notifications, which do not much help for analysis, why a VPN
client was blocked by racoon server.

This patch fixes the code and aligns it to Microsoft/Cisco IKE
fragmentation specification. It provides error logging which is in line
with above specification and adds some debug info to the logs to better
support analysis VPN client blackballing.

XXX: pullup-8
2018-10-05 20:12:37 +00:00
joerg 04f39e5059 Add missing format string annotation. 2018-10-04 13:38:41 +00:00
christos 1eb7c866e6 Don't treat mostly connection closed events as filtering events.
There a a failed to negotiate instance too, but I don't want to generate
more diff.
2018-10-02 22:44:07 +00:00
christos 6ed279ad58 Undo previous change. It made filtering a lot more aggressive. 2018-10-02 22:40:28 +00:00
christos 451f4db714 PR/53646: Thomas Reim: Incorrect detection of the packet complete code in
fragment list check.

While the fix in https://launchpad.net/~rdratlos/+archive/ubuntu/racoon

	- if (i > last_frag) /* It is complete */
	+ if (i >= last_frag) /* It is complete */

has the correct behavior, it violates the test for successful
completion of the invariant of the loop:

    for (i = 1; i <= last_frag; i++) {
	if (!check_fragment_index())
	    break;
    }
    if (i > last_frag)
	return ok;

It is better to move the check for NULL in the loop earlier, so that
the final iteration is done and the test is kept the same. It makes
the code easier to understand and preserves the original intent.

XXX: pullup-8
2018-10-02 18:49:24 +00:00
christos 277582e5d7 Use hex string syntax to prevent overflow warnings for character constants
>= 128.
2018-10-02 13:53:51 +00:00
christos 949cd49583 Annotate format functions and fix format errors. 2018-09-30 19:23:13 +00:00
martin 7cf9d82c2e Newer gcc seems to use __ARM_ARCH_ISA_THUMB to tell use we have thumb
instructions available
2018-09-30 09:46:41 +00:00
martin cde2e090ac Regen 2018-09-29 19:45:18 +00:00
martin 2cc7a20425 Upstream does not support armv4 any more - but it is trivial to add
add regen time. Make the "regen" target here do it.
2018-09-29 19:44:57 +00:00
christos 5c87189615 be less aggressive about blocking connections from disconnected sessions. 2018-09-29 15:10:44 +00:00
christos 52fef4034c fix build 2018-09-28 17:28:01 +00:00
christos 9c90d67021 Remove debugging accidentally left in! Noticed by Tobias Ulmer 2018-09-27 18:18:53 +00:00
christos 285c5abcb8 use the standard code instead of ours 2018-09-25 14:17:49 +00:00
christos 0d38e0d044 no need for our copy of memequal 2018-09-25 14:16:33 +00:00
christos d6dadc43cc put back sparccap.c; too hard to iron out the bn_mont stuff. 2018-09-24 20:36:51 +00:00
christos 777e7b79f5 sparcv9cap is a c file. 2018-09-24 20:15:38 +00:00
christos 72ff73fc7e use sparcv9cap.S 2018-09-24 19:50:51 +00:00
christos ed78d1de0f Don't include the libc CRYPTO_memcmp file (it has a different prototype
now) and it is provided by openssl in C, or use the assembly versions.
2018-09-24 11:03:39 +00:00
christos d06d8258da don't override the sha man page provided by libc. 2018-09-24 11:02:12 +00:00
christos 9f80cc1672 sparc has memcmp and cpuid 2018-09-24 00:45:12 +00:00
christos 9d109c93ae we provide memcmp and rdtsc 2018-09-23 21:44:01 +00:00
christos d99d513f3c Kill stack protector warnings.
XXX: need to understand why gcc complains; it is not obvious to me.
2018-09-23 21:43:00 +00:00
christos 600c077f8b oops forgot to commit (add libcryptotest) 2018-09-23 15:08:41 +00:00
christos e0ea3921ea merge conflicts 2018-09-23 13:32:54 +00:00
christos 13d40330b8 OpenSSL CHANGES
_______________

 This is a high-level summary of the most important changes.
 For a full list of changes, see the git commit log; for example,
 https://github.com/openssl/openssl/commits/ and pick the appropriate
 release branch.

 Changes between 1.1.0i and 1.1.1 [11 Sep 2018]

  *) Add a new ClientHello callback. Provides a callback interface that gives
     the application the ability to adjust the nascent SSL object at the
     earliest stage of ClientHello processing, immediately after extensions have
     been collected but before they have been processed. In particular, this
     callback can adjust the supported TLS versions in response to the contents
     of the ClientHello
     [Benjamin Kaduk]

  *) Add SM2 base algorithm support.
     [Jack Lloyd]

  *) s390x assembly pack: add (improved) hardware-support for the following
     cryptographic primitives: sha3, shake, aes-gcm, aes-ccm, aes-ctr, aes-ofb,
     aes-cfb/cfb8, aes-ecb.
     [Patrick Steuer]

  *) Make EVP_PKEY_asn1_new() a bit stricter about its input.  A NULL pem_str
     parameter is no longer accepted, as it leads to a corrupt table.  NULL
     pem_str is reserved for alias entries only.
     [Richard Levitte]

  *) Use the new ec_scalar_mul_ladder scaffold to implement a specialized ladder
     step for prime curves. The new implementation is based on formulae from
     differential addition-and-doubling in homogeneous projective coordinates
     from Izu-Takagi "A fast parallel elliptic curve multiplication resistant
     against side channel attacks" and Brier-Joye "Weierstrass Elliptic Curves
     and Side-Channel Attacks" Eq. (8) for y-coordinate recovery, modified
     to work in projective coordinates.
     [Billy Bob Brumley, Nicola Tuveri]

  *) Change generating and checking of primes so that the error rate of not
     being prime depends on the intended use based on the size of the input.
     For larger primes this will result in more rounds of Miller-Rabin.
     The maximal error rate for primes with more than 1080 bits is lowered
     to 2^-128.
     [Kurt Roeckx, Annie Yousar]

  *) Increase the number of Miller-Rabin rounds for DSA key generating to 64.
     [Kurt Roeckx]

  *) The 'tsget' script is renamed to 'tsget.pl', to avoid confusion when
     moving between systems, and to avoid confusion when a Windows build is
     done with mingw vs with MSVC.  For POSIX installs, there's still a
     symlink or copy named 'tsget' to avoid that confusion as well.
     [Richard Levitte]

  *) Revert blinding in ECDSA sign and instead make problematic addition
     length-invariant. Switch even to fixed-length Montgomery multiplication.
     [Andy Polyakov]

  *) Use the new ec_scalar_mul_ladder scaffold to implement a specialized ladder
     step for binary curves. The new implementation is based on formulae from
     differential addition-and-doubling in mixed Lopez-Dahab projective
     coordinates, modified to independently blind the operands.
     [Billy Bob Brumley, Sohaib ul Hassan, Nicola Tuveri]

  *) Add a scaffold to optionally enhance the Montgomery ladder implementation
     for `ec_scalar_mul_ladder` (formerly `ec_mul_consttime`) allowing
     EC_METHODs to implement their own specialized "ladder step", to take
     advantage of more favorable coordinate systems or more efficient
     differential addition-and-doubling algorithms.
     [Billy Bob Brumley, Sohaib ul Hassan, Nicola Tuveri]

  *) Modified the random device based seed sources to keep the relevant
     file descriptors open rather than reopening them on each access.
     This allows such sources to operate in a chroot() jail without
     the associated device nodes being available. This behaviour can be
     controlled using RAND_keep_random_devices_open().
     [Paul Dale]

  *) Numerous side-channel attack mitigations have been applied. This may have
     performance impacts for some algorithms for the benefit of improved
     security. Specific changes are noted in this change log by their respective
     authors.
     [Matt Caswell]

  *) AIX shared library support overhaul. Switch to AIX "natural" way of
     handling shared libraries, which means collecting shared objects of
     different versions and bitnesses in one common archive. This allows to
     mitigate conflict between 1.0 and 1.1 side-by-side installations. It
     doesn't affect the way 3rd party applications are linked, only how
     multi-version installation is managed.
     [Andy Polyakov]

  *) Make ec_group_do_inverse_ord() more robust and available to other
     EC cryptosystems, so that irrespective of BN_FLG_CONSTTIME, SCA
     mitigations are applied to the fallback BN_mod_inverse().
     When using this function rather than BN_mod_inverse() directly, new
     EC cryptosystem implementations are then safer-by-default.
     [Billy Bob Brumley]

  *) Add coordinate blinding for EC_POINT and implement projective
     coordinate blinding for generic prime curves as a countermeasure to
     chosen point SCA attacks.
     [Sohaib ul Hassan, Nicola Tuveri, Billy Bob Brumley]

  *) Add blinding to ECDSA and DSA signatures to protect against side channel
     attacks discovered by Keegan Ryan (NCC Group).
     [Matt Caswell]

  *) Enforce checking in the pkeyutl command line app to ensure that the input
     length does not exceed the maximum supported digest length when performing
     a sign, verify or verifyrecover operation.
     [Matt Caswell]

  *) SSL_MODE_AUTO_RETRY is enabled by default. Applications that use blocking
     I/O in combination with something like select() or poll() will hang. This
     can be turned off again using SSL_CTX_clear_mode().
     Many applications do not properly handle non-application data records, and
     TLS 1.3 sends more of such records. Setting SSL_MODE_AUTO_RETRY works
     around the problems in those applications, but can also break some.
     It's recommended to read the manpages about SSL_read(), SSL_write(),
     SSL_get_error(), SSL_shutdown(), SSL_CTX_set_mode() and
     SSL_CTX_set_read_ahead() again.
     [Kurt Roeckx]

  *) When unlocking a pass phrase protected PEM file or PKCS#8 container, we
     now allow empty (zero character) pass phrases.
     [Richard Levitte]

  *) Apply blinding to binary field modular inversion and remove patent
     pending (OPENSSL_SUN_GF2M_DIV) BN_GF2m_mod_div implementation.
     [Billy Bob Brumley]

  *) Deprecate ec2_mult.c and unify scalar multiplication code paths for
     binary and prime elliptic curves.
     [Billy Bob Brumley]

  *) Remove ECDSA nonce padding: EC_POINT_mul is now responsible for
     constant time fixed point multiplication.
     [Billy Bob Brumley]

  *) Revise elliptic curve scalar multiplication with timing attack
     defenses: ec_wNAF_mul redirects to a constant time implementation
     when computing fixed point and variable point multiplication (which
     in OpenSSL are mostly used with secret scalars in keygen, sign,
     ECDH derive operations).
     [Billy Bob Brumley, Nicola Tuveri, Cesar Pereida García,
      Sohaib ul Hassan]

  *) Updated CONTRIBUTING
     [Rich Salz]

  *) Updated DRBG / RAND to request nonce and additional low entropy
     randomness from the system.
     [Matthias St. Pierre]

  *) Updated 'openssl rehash' to use OpenSSL consistent default.
     [Richard Levitte]

  *) Moved the load of the ssl_conf module to libcrypto, which helps
     loading engines that libssl uses before libssl is initialised.
     [Matt Caswell]

  *) Added EVP_PKEY_sign() and EVP_PKEY_verify() for EdDSA
     [Matt Caswell]

  *) Fixed X509_NAME_ENTRY_set to get multi-valued RDNs right in all cases.
     [Ingo Schwarze, Rich Salz]

  *) Added output of accepting IP address and port for 'openssl s_server'
     [Richard Levitte]

  *) Added a new API for TLSv1.3 ciphersuites:
        SSL_CTX_set_ciphersuites()
        SSL_set_ciphersuites()
     [Matt Caswell]

  *) Memory allocation failures consistenly add an error to the error
     stack.
     [Rich Salz]

  *) Don't use OPENSSL_ENGINES and OPENSSL_CONF environment values
     in libcrypto when run as setuid/setgid.
     [Bernd Edlinger]

  *) Load any config file by default when libssl is used.
     [Matt Caswell]

  *) Added new public header file <openssl/rand_drbg.h> and documentation
     for the RAND_DRBG API. See manual page RAND_DRBG(7) for an overview.
     [Matthias St. Pierre]

  *) QNX support removed (cannot find contributors to get their approval
     for the license change).
     [Rich Salz]

  *) TLSv1.3 replay protection for early data has been implemented. See the
     SSL_read_early_data() man page for further details.
     [Matt Caswell]

  *) Separated TLSv1.3 ciphersuite configuration out from TLSv1.2 ciphersuite
     configuration. TLSv1.3 ciphersuites are not compatible with TLSv1.2 and
     below. Similarly TLSv1.2 ciphersuites are not compatible with TLSv1.3.
     In order to avoid issues where legacy TLSv1.2 ciphersuite configuration
     would otherwise inadvertently disable all TLSv1.3 ciphersuites the
     configuration has been separated out. See the ciphers man page or the
     SSL_CTX_set_ciphersuites() man page for more information.
     [Matt Caswell]

  *) On POSIX (BSD, Linux, ...) systems the ocsp(1) command running
     in responder mode now supports the new "-multi" option, which
     spawns the specified number of child processes to handle OCSP
     requests.  The "-timeout" option now also limits the OCSP
     responder's patience to wait to receive the full client request
     on a newly accepted connection. Child processes are respawned
     as needed, and the CA index file is automatically reloaded
     when changed.  This makes it possible to run the "ocsp" responder
     as a long-running service, making the OpenSSL CA somewhat more
     feature-complete.  In this mode, most diagnostic messages logged
     after entering the event loop are logged via syslog(3) rather than
     written to stderr.
     [Viktor Dukhovni]

  *) Added support for X448 and Ed448. Heavily based on original work by
     Mike Hamburg.
     [Matt Caswell]

  *) Extend OSSL_STORE with capabilities to search and to narrow the set of
     objects loaded.  This adds the functions OSSL_STORE_expect() and
     OSSL_STORE_find() as well as needed tools to construct searches and
     get the search data out of them.
     [Richard Levitte]

  *) Support for TLSv1.3 added. Note that users upgrading from an earlier
     version of OpenSSL should review their configuration settings to ensure
     that they are still appropriate for TLSv1.3. For further information see:
     https://wiki.openssl.org/index.php/TLS1.3
     [Matt Caswell]

  *) Grand redesign of the OpenSSL random generator

     The default RAND method now utilizes an AES-CTR DRBG according to
     NIST standard SP 800-90Ar1. The new random generator is essentially
     a port of the default random generator from the OpenSSL FIPS 2.0
     object module. It is a hybrid deterministic random bit generator
     using an AES-CTR bit stream and which seeds and reseeds itself
     automatically using trusted system entropy sources.

     Some of its new features are:
      o Support for multiple DRBG instances with seed chaining.
      o The default RAND method makes use of a DRBG.
      o There is a public and private DRBG instance.
      o The DRBG instances are fork-safe.
      o Keep all global DRBG instances on the secure heap if it is enabled.
      o The public and private DRBG instance are per thread for lock free
        operation
     [Paul Dale, Benjamin Kaduk, Kurt Roeckx, Rich Salz, Matthias St. Pierre]

  *) Changed Configure so it only says what it does and doesn't dump
     so much data.  Instead, ./configdata.pm should be used as a script
     to display all sorts of configuration data.
     [Richard Levitte]

  *) Added processing of "make variables" to Configure.
     [Richard Levitte]

  *) Added SHA512/224 and SHA512/256 algorithm support.
     [Paul Dale]

  *) The last traces of Netware support, first removed in 1.1.0, have
     now been removed.
     [Rich Salz]

  *) Get rid of Makefile.shared, and in the process, make the processing
     of certain files (rc.obj, or the .def/.map/.opt files produced from
     the ordinal files) more visible and hopefully easier to trace and
     debug (or make silent).
     [Richard Levitte]

  *) Make it possible to have environment variable assignments as
     arguments to config / Configure.
     [Richard Levitte]

  *) Add multi-prime RSA (RFC 8017) support.
     [Paul Yang]

  *) Add SM3 implemented according to GB/T 32905-2016
     [ Jack Lloyd <jack.lloyd@ribose.com>,
       Ronald Tse <ronald.tse@ribose.com>,
       Erick Borsboom <erick.borsboom@ribose.com> ]

  *) Add 'Maximum Fragment Length' TLS extension negotiation and support
     as documented in RFC6066.
     Based on a patch from Tomasz Moń
     [Filipe Raimundo da Silva]

  *) Add SM4 implemented according to GB/T 32907-2016.
     [ Jack Lloyd <jack.lloyd@ribose.com>,
       Ronald Tse <ronald.tse@ribose.com>,
       Erick Borsboom <erick.borsboom@ribose.com> ]

  *) Reimplement -newreq-nodes and ERR_error_string_n; the
     original author does not agree with the license change.
     [Rich Salz]

  *) Add ARIA AEAD TLS support.
     [Jon Spillett]

  *) Some macro definitions to support VS6 have been removed.  Visual
     Studio 6 has not worked since 1.1.0
     [Rich Salz]

  *) Add ERR_clear_last_mark(), to allow callers to clear the last mark
     without clearing the errors.
     [Richard Levitte]

  *) Add "atfork" functions.  If building on a system that without
     pthreads, see doc/man3/OPENSSL_fork_prepare.pod for application
     requirements.  The RAND facility now uses/requires this.
     [Rich Salz]

  *) Add SHA3.
     [Andy Polyakov]

  *) The UI API becomes a permanent and integral part of libcrypto, i.e.
     not possible to disable entirely.  However, it's still possible to
     disable the console reading UI method, UI_OpenSSL() (use UI_null()
     as a fallback).

     To disable, configure with 'no-ui-console'.  'no-ui' is still
     possible to use as an alias.  Check at compile time with the
     macro OPENSSL_NO_UI_CONSOLE.  The macro OPENSSL_NO_UI is still
     possible to check and is an alias for OPENSSL_NO_UI_CONSOLE.
     [Richard Levitte]

  *) Add a STORE module, which implements a uniform and URI based reader of
     stores that can contain keys, certificates, CRLs and numerous other
     objects.  The main API is loosely based on a few stdio functions,
     and includes OSSL_STORE_open, OSSL_STORE_load, OSSL_STORE_eof,
     OSSL_STORE_error and OSSL_STORE_close.
     The implementation uses backends called "loaders" to implement arbitrary
     URI schemes.  There is one built in "loader" for the 'file' scheme.
     [Richard Levitte]

  *) Add devcrypto engine.  This has been implemented against cryptodev-linux,
     then adjusted to work on FreeBSD 8.4 as well.
     Enable by configuring with 'enable-devcryptoeng'.  This is done by default
     on BSD implementations, as cryptodev.h is assumed to exist on all of them.
     [Richard Levitte]

  *) Module names can prefixed with OSSL_ or OPENSSL_.  This affects
     util/mkerr.pl, which is adapted to allow those prefixes, leading to
     error code calls like this:

         OSSL_FOOerr(OSSL_FOO_F_SOMETHING, OSSL_FOO_R_WHATEVER);

     With this change, we claim the namespaces OSSL and OPENSSL in a manner
     that can be encoded in C.  For the foreseeable future, this will only
     affect new modules.
     [Richard Levitte and Tim Hudson]

  *) Removed BSD cryptodev engine.
     [Rich Salz]

  *) Add a build target 'build_all_generated', to build all generated files
     and only that.  This can be used to prepare everything that requires
     things like perl for a system that lacks perl and then move everything
     to that system and do the rest of the build there.
     [Richard Levitte]

  *) In the UI interface, make it possible to duplicate the user data.  This
     can be used by engines that need to retain the data for a longer time
     than just the call where this user data is passed.
     [Richard Levitte]

  *) Ignore the '-named_curve auto' value for compatibility of applications
     with OpenSSL 1.0.2.
     [Tomas Mraz <tmraz@fedoraproject.org>]

  *) Fragmented SSL/TLS alerts are no longer accepted. An alert message is 2
     bytes long. In theory it is permissible in SSLv3 - TLSv1.2 to fragment such
     alerts across multiple records (some of which could be empty). In practice
     it make no sense to send an empty alert record, or to fragment one. TLSv1.3
     prohibts this altogether and other libraries (BoringSSL, NSS) do not
     support this at all. Supporting it adds significant complexity to the
     record layer, and its removal is unlikely to cause inter-operability
     issues.
     [Matt Caswell]

  *) Add the ASN.1 types INT32, UINT32, INT64, UINT64 and variants prefixed
     with Z.  These are meant to replace LONG and ZLONG and to be size safe.
     The use of LONG and ZLONG is discouraged and scheduled for deprecation
     in OpenSSL 1.2.0.
     [Richard Levitte]

  *) Add the 'z' and 'j' modifiers to BIO_printf() et al formatting string,
     'z' is to be used for [s]size_t, and 'j' - with [u]int64_t.
     [Richard Levitte, Andy Polyakov]

  *) Add EC_KEY_get0_engine(), which does for EC_KEY what RSA_get0_engine()
     does for RSA, etc.
     [Richard Levitte]

  *) Have 'config' recognise 64-bit mingw and choose 'mingw64' as the target
     platform rather than 'mingw'.
     [Richard Levitte]

  *) The functions X509_STORE_add_cert and X509_STORE_add_crl return
     success if they are asked to add an object which already exists
     in the store. This change cascades to other functions which load
     certificates and CRLs.
     [Paul Dale]

  *) x86_64 assembly pack: annotate code with DWARF CFI directives to
     facilitate stack unwinding even from assembly subroutines.
     [Andy Polyakov]

  *) Remove VAX C specific definitions of OPENSSL_EXPORT, OPENSSL_EXTERN.
     Also remove OPENSSL_GLOBAL entirely, as it became a no-op.
     [Richard Levitte]

  *) Remove the VMS-specific reimplementation of gmtime from crypto/o_times.c.
     VMS C's RTL has a fully up to date gmtime() and gmtime_r() since V7.1,
     which is the minimum version we support.
     [Richard Levitte]

  *) Certificate time validation (X509_cmp_time) enforces stricter
     compliance with RFC 5280. Fractional seconds and timezone offsets
     are no longer allowed.
     [Emilia Käsper]

  *) Add support for ARIA
     [Paul Dale]

  *) s_client will now send the Server Name Indication (SNI) extension by
     default unless the new "-noservername" option is used. The server name is
     based on the host provided to the "-connect" option unless overridden by
     using "-servername".
     [Matt Caswell]

  *) Add support for SipHash
     [Todd Short]

  *) OpenSSL now fails if it receives an unrecognised record type in TLS1.0
     or TLS1.1. Previously this only happened in SSLv3 and TLS1.2. This is to
     prevent issues where no progress is being made and the peer continually
     sends unrecognised record types, using up resources processing them.
     [Matt Caswell]

  *) 'openssl passwd' can now produce SHA256 and SHA512 based output,
     using the algorithm defined in
     https://www.akkadia.org/drepper/SHA-crypt.txt
     [Richard Levitte]

  *) Heartbeat support has been removed; the ABI is changed for now.
     [Richard Levitte, Rich Salz]

  *) Support for SSL_OP_NO_ENCRYPT_THEN_MAC in SSL_CONF_cmd.
     [Emilia Käsper]

  *) The RSA "null" method, which was partially supported to avoid patent
     issues, has been replaced to always returns NULL.
     [Rich Salz]
2018-09-23 13:17:27 +00:00
maxv c1cd5851ce Remove dead references to netinet6/ipsec.h. 2018-09-06 09:54:36 +00:00
maxv 6890048b2b sync with reality 2018-09-06 09:38:05 +00:00
christos 85196978fc fix memory leaks: https://github.com/NetBSD/src/issues/6 2018-08-28 09:10:28 +00:00
tnn 6aea9f691d annotate pthread_exit as __dead (to appease clang) 2018-08-27 17:47:48 +00:00
christos 55a4608bfb merge conflicts 2018-08-26 07:46:36 +00:00
christos 78a9456a0a Potentially-incompatible changes
================================

This release includes a number of changes that may affect existing
configurations:

 * ssh-keygen(1): write OpenSSH format private keys by default
   instead of using OpenSSL's PEM format. The OpenSSH format,
   supported in OpenSSH releases since 2014 and described in the
   PROTOCOL.key file in the source distribution, offers substantially
   better protection against offline password guessing and supports
   key comments in private keys. If necessary, it is possible to write
   old PEM-style keys by adding "-m PEM" to ssh-keygen's arguments
   when generating or updating a key.

 * sshd(8): remove internal support for S/Key multiple factor
   authentication. S/Key may still be used via PAM or BSD auth.

 * ssh(1): remove vestigal support for running ssh(1) as setuid. This
   used to be required for hostbased authentication and the (long
   gone) rhosts-style authentication, but has not been necessary for
   a long time. Attempting to execute ssh as a setuid binary, or with
   uid != effective uid will now yield a fatal error at runtime.

 * sshd(8): the semantics of PubkeyAcceptedKeyTypes and the similar
   HostbasedAcceptedKeyTypes options have changed. These now specify
   signature algorithms that are accepted for their respective
   authentication mechanism, where previously they specified accepted
   key types. This distinction matters when using the RSA/SHA2
   signature algorithms "rsa-sha2-256", "rsa-sha2-512" and their
   certificate counterparts. Configurations that override these
   options but omit these algorithm names may cause unexpected
   authentication failures (no action is required for configurations
   that accept the default for these options).

 * sshd(8): the precedence of session environment variables has
   changed. ~/.ssh/environment and environment="..." options in
   authorized_keys files can no longer override SSH_* variables set
   implicitly by sshd.

 * ssh(1)/sshd(8): the default IPQoS used by ssh/sshd has changed.
   They will now use DSCP AF21 for interactive traffic and CS1 for
   bulk.  For a detailed rationale, please see the commit message:
   https://cvsweb.openbsd.org/src/usr.bin/ssh/readconf.c#rev1.284
2018-08-26 07:39:56 +00:00
kre 6016e29be1 Revert previous and do it the way it is supposed to be done.
Thanks to the heads up from rjs@
2018-08-18 23:35:18 +00:00
kre 8df699ecee Allow the symbols in the newly added conf_ssl.c to be exposed as globals. 2018-08-18 17:37:25 +00:00
rjs b338538cf3 Add conf_ssl.c to build. 2018-08-18 16:40:02 +00:00
christos 2500041cec merge conflicts 2018-08-18 08:59:03 +00:00
christos 132cc1c4ae Changes between 1.1.0h and 1.1.0i [14 Aug 2018]
*) Client DoS due to large DH parameter

     During key agreement in a TLS handshake using a DH(E) based ciphersuite a
     malicious server can send a very large prime value to the client. This will
     cause the client to spend an unreasonably long period of time generating a
     key for this prime resulting in a hang until the client has finished. This
     could be exploited in a Denial Of Service attack.

     This issue was reported to OpenSSL on 5th June 2018 by Guido Vranken
     (CVE-2018-0732)
     [Guido Vranken]

  *) Cache timing vulnerability in RSA Key Generation

     The OpenSSL RSA Key generation algorithm has been shown to be vulnerable to
     a cache timing side channel attack. An attacker with sufficient access to
     mount cache timing attacks during the RSA key generation process could
     recover the private key.

     This issue was reported to OpenSSL on 4th April 2018 by Alejandro Cabrera
     Aldaya, Billy Brumley, Cesar Pereida Garcia and Luis Manuel Alvarez Tapia.
     (CVE-2018-0737)
     [Billy Brumley]

  *) Make EVP_PKEY_asn1_new() a bit stricter about its input.  A NULL pem_str
     parameter is no longer accepted, as it leads to a corrupt table.  NULL
     pem_str is reserved for alias entries only.
     [Richard Levitte]

  *) Revert blinding in ECDSA sign and instead make problematic addition
     length-invariant. Switch even to fixed-length Montgomery multiplication.
     [Andy Polyakov]

  *) Change generating and checking of primes so that the error rate of not
     being prime depends on the intended use based on the size of the input.
     For larger primes this will result in more rounds of Miller-Rabin.
     The maximal error rate for primes with more than 1080 bits is lowered
     to 2^-128.
     [Kurt Roeckx, Annie Yousar]

  *) Increase the number of Miller-Rabin rounds for DSA key generating to 64.
     [Kurt Roeckx]

  *) Add blinding to ECDSA and DSA signatures to protect against side channel
     attacks discovered by Keegan Ryan (NCC Group).
     [Matt Caswell]

  *) When unlocking a pass phrase protected PEM file or PKCS#8 container, we
     now allow empty (zero character) pass phrases.
     [Richard Levitte]

  *) Certificate time validation (X509_cmp_time) enforces stricter
     compliance with RFC 5280. Fractional seconds and timezone offsets
     are no longer allowed.
     [Emilia Käsper]

  *) Fixed a text canonicalisation bug in CMS

     Where a CMS detached signature is used with text content the text goes
     through a canonicalisation process first prior to signing or verifying a
     signature. This process strips trailing space at the end of lines, converts
     line terminators to CRLF and removes additional trailing line terminators
     at the end of a file. A bug in the canonicalisation process meant that
     some characters, such as form-feed, were incorrectly treated as whitespace
     and removed. This is contrary to the specification (RFC5485). This fix
     could mean that detached text data signed with an earlier version of
     OpenSSL 1.1.0 may fail to verify using the fixed version, or text data
     signed with a fixed OpenSSL may fail to verify with an earlier version of
     OpenSSL 1.1.0. A workaround is to only verify the canonicalised text data
     and use the "-binary" flag (for the "cms" command line application) or set
     the SMIME_BINARY/PKCS7_BINARY/CMS_BINARY flags (if using CMS_verify()).
     [Matt Caswell]
2018-08-18 08:30:43 +00:00
christos 0fdeed761f add another exit 254 to avoid blacklistd notification 2018-08-13 09:55:20 +00:00
christos fd2346d686 avoid redefinition 2018-08-13 09:54:19 +00:00
christos efb7d8e3ed sprinke const 2018-08-13 09:53:51 +00:00
christos d06e49026c change some 255's to 254's to avoid being too aggressive blacklisting. 2018-08-09 08:32:41 +00:00
christos a6c76c426a Add missing functions for racoon2 to compile under netbsd-8
From Chuck Zmudzinski
XXX: pullup-8 (to openssl not openssl.old)
2018-08-08 19:19:36 +00:00
kre 08d8416c00 Add a "gcc is stupid" comment to the previous change, as even
the most cursory analysis shows that the var ("eg") is not (cannot
be) used unitialialised, just gcc is too dumb to work it out.

In this case, the code could be rewritten easily enough to
appease even gcc, but that would cause unnecessary code churn,
and some minor duplication, so just put up with the nonsense init...
2018-08-03 12:49:41 +00:00
kamil 33878bd4a3 Appease GCC in the openssh code when built with UBSan
Initialize eg to NULL in sshkey_ecdsa_key_to_nid().
The compiler warns that it might be uninitialized.
2018-08-03 04:32:12 +00:00
christos e4d58523d5 remove -DGHASH_ASM_X86; it is already defined. 2018-08-01 13:46:58 +00:00
christos ff9b27fb63 Add missing defines:
https://github.com/openssl/openssl/pull/6828
When ghash-x86.S is generated with -DOPENSSL_IA32_SSE2 we need to compile
gcm128.c with the same flags.
Reported by manu@
2018-08-01 11:39:53 +00:00
kamil f57bc4a2fe Avoid undefined behavior in netpgpverify/sha2.c
Do not change the signedness bit with a left shift operation.
Cast to unsigned integer to prevent this.

sha2.c:79:16, left shift of 154 by 24 places cannot be represented in type 'int'

Detected with micro-UBSan in the user mode.
2018-07-26 00:31:13 +00:00
kamil 518ec213b0 Avoid undefined behavior in netpgpverify
Do not change the signedness bit with a left shift operation.
Cast to unsigned integer to prevent this.

pgpsum.c:187:18, left shift of 130 by 24 places cannot be represented in type 'int'

Detected with micro-UBSan in the user mode.
2018-07-26 00:26:45 +00:00
wiz 21ab6dd43b Fix Dd argument. 2018-07-18 16:42:49 +00:00
joerg 2b1a674ab1 Drop special case for clang/aarch64. 2018-07-17 18:56:24 +00:00
christos 44192cc494 limit the aarch64 hack to clang. 2018-07-16 00:47:54 +00:00
christos 3426f2b9a5 select assembler based on ACTIVE_CC 2018-07-16 00:08:12 +00:00
martin f9113cc07d Provide an explicit dependency on heimbase 2018-07-12 11:13:50 +00:00
sevan 0266197a3e Amend whitelisted filesystem paths ssh-agent will look for PKCS11 related
libraries so that things work out of the box with pkgsrc without having to
explicitly whitelist things.

ok christos
2018-07-10 22:12:08 +00:00
martin d9126d9021 Explicit heimbase dependency (similar to other recent MKREPRO fixes) 2018-07-10 13:17:36 +00:00
martin 7afa4d19cf Explicit libheimbase dependency, similar to Christos' change to
libheimntlm/Makefile, hopefully fixing another MKREPRO fallout.
XXX pullup 8
2018-07-06 08:54:30 +00:00
martin ed5800cebe Add explicit path to libwind - patch from Christos, may fix some MKREPRO
fallout. XXX pullup 8
2018-07-06 08:31:43 +00:00
christos 9c2395c2ef Since now we are called from cleanup_exit() make sure that we have a state
to work with. Found by ASAN.
2018-06-24 15:36:31 +00:00
kamil 911756fc6b Do not reference buffer after the code scope {}
rk_getpwuid_r() returns a pointer pwd->pw_dir to a buffer pwbuf[].

It's not safe to store another a copy of pwd->pw_dir in outter scope and
use it out of the scope where there exists pwbuf[].

This fixes a problem reported by ASan under MKSANITIZER.
2018-06-16 18:51:36 +00:00
riastradh 74179ba271 Disable loading XMSS keys by default too.
Nobody should be using XMSS host keys without an explicit decision,
because they're qualitatively different from all other types of host
keys in that they require keeping state.

This also eliminates a harmless but confusing warning that began
after we stopped generating XMSS keys by default.
2018-06-07 15:26:09 +00:00
maxv 9cc33dc2c2 drop __P, suggested by sevan 2018-05-28 20:45:38 +00:00
maxv 02ed4ce0ae drop __P, suggested by sevan 2018-05-28 20:34:45 +00:00
maxv d5ded68d11 fix -Wold-style-definition 2018-05-28 19:52:18 +00:00
maxv a8c2f61e83 Remove ipsec_bindump, there is no prototype, so the function can't be used. 2018-05-28 19:39:21 +00:00
maxv ff1d84b094 fix -Wdiscarded-qualifiers 2018-05-28 19:36:42 +00:00
maxv abcef802a2 fix -Wunused and -Wold-style-definition 2018-05-28 19:22:40 +00:00
christos e1b6c9c92d remove DES_random_key.3 since it is in libdes. 2018-05-24 19:03:47 +00:00
christos 649a6add8b Increase strictness of blacklistd patches to include timeouts, operating
system errors, and pam failures.
2018-05-23 16:04:13 +00:00
christos 2ded5b1a5c rename {MD5,HMAC} to openssl_{MD5,HMAC}. Also add man pages for openssl_MD2
and openssl_MD4 to avoid conflicts with case-preserving but case-insensitive
filesystems and the corresponding libc lower case man pages.
2018-05-23 01:58:40 +00:00
maxv df9d65850f Add a note about FreeBSD. 2018-05-20 09:14:18 +00:00
maxv dc0ca504c7 Update, after ten years. Importantly, add a "History" section, to explain
what's going on.

We have now become "upstream", and most of the ipsec-tools development is
done in NetBSD's CVS. However, many distributions still take their
tarballs from SourceForge (which is defunct, and not maintained).
2018-05-20 08:55:25 +00:00
maxv 4eb599a9b3 Style. 2018-05-20 06:15:45 +00:00
maxv 79383b8281 Remove dead code, and style. 2018-05-19 20:40:40 +00:00
maxv e2ff693411 Remove unused 'error' variables, it's obvious they should have no use. 2018-05-19 20:21:23 +00:00
maxv 165b31ce96 Use strict prototypes, when they don't introduce more warnings than they fix.
Also localify a few functions.
2018-05-19 20:14:56 +00:00
maxv abe88a07be Remove unused labels, functions, and function prototypes. 2018-05-19 19:47:47 +00:00
maxv 78d5ecb35f More unused variables. 2018-05-19 19:32:16 +00:00
maxv ff699fb469 Remove unused variables. 2018-05-19 19:23:15 +00:00
maxv 253ae9a65a Style, a little... 2018-05-19 18:51:59 +00:00
sevan 658d9240b5 remove definition of LUA_USE_APICHECK, it is a build time option for Lua
itself. Not for modules.
2018-05-11 20:19:25 +00:00
sevan 75ae0b631f Add descriptions for
netpgp_match_keys()
netpgp_match_keys_json()
netpgp_match_pubkeys()
netpgp_validate_sigs()
netpgp_format_json()
2018-05-10 15:00:36 +00:00
sevan 909174d46f Add a description of netpgp_unsetvar and netpgp_list_keys_json. 2018-05-09 23:34:25 +00:00
wiz 0de9c84c84 Fix typo, add 'and' in list. 2018-05-09 07:59:38 +00:00
sevan d135d5f327 Add the type of information returned about maintainer. 2018-05-09 00:24:50 +00:00
christos 3357bd401d don't build for non pic 2018-05-03 01:14:54 +00:00
christos bf7113376a Create a new bsd.hostinit.mk file and put the build definitions for all host
programs there; make all Makefiles that use bsd.hostprog.mk include it.
Namely turn off MKREPRO and don't make lint, man pages, info files etc.
Remove the Makefile.inc files that contained these same settings, and
remove the settings from Makefile.host
2018-05-01 19:59:42 +00:00
sevan a492831e1e The secret key is required for decryption and signing. Indicate it by setting
the "need seckey" variable before calling init.
2018-04-30 22:17:46 +00:00
sevan b3cd80a889 Unbreak script for Lua 5.3.
This change breaks support for older releases of Lua but it is deemed ok.
2018-04-30 21:40:59 +00:00
sevan b05246b276 sign_file function expects 5 parameters, include the output filename. 2018-04-29 23:30:59 +00:00
sevan 06d8aeb822 Hello netpgp(3lua) 2018-04-29 19:47:34 +00:00
sevan 88f8705bc9 Add support for Lua 5.3 2018-04-29 19:34:57 +00:00
sevan c912c8ab8d Enable checking arguments for validity. 2018-04-29 19:31:38 +00:00
sevan 00192c93dd Utilise the passed output filename rather that using a hardcoded name 2018-04-29 19:28:11 +00:00
sevan d57d6d22a8 Add the following functions to the list (TODO - add descriptions)
netpgp_unsetvar
netpgp_list_keys_json
netpgp_match_keys
netpgp_match_keys_json
netpgp_match_pubkeys
netpgp_validate_sigs
netpgp_format_json

Remove netpgp_match_list_keys() as function does not exist

Add missing output file to netpgp_verify_file() argument list

Sprinkle const to arguments
2018-04-29 14:21:16 +00:00
spz 3d2ae3570c avoid busy-waiting on a dead child 2018-04-29 05:36:04 +00:00
christos 169d9d570d CVE-2018-0737: Set constant time for rsa computation:
https://www.openssl.org/news/vulnerabilities.html
This needs to be pulled up to -8 using:
    349a41da1a
2018-04-17 14:48:48 +00:00
wiz 2a2e02284d Remove trailing whitespace. 2018-04-16 08:17:18 +00:00
sevan cfb1377110 Break down explanation of netpgp_init to make it easier to extend.
Document how the userid is obtained.
2018-04-15 23:00:36 +00:00
joerg 4d3469e188 Fix clang build by adding __dead annotations. 2018-04-08 21:56:48 +00:00
christos ff7da8bd8e fix compilation for non LDAP
remove error comment
2018-04-08 13:39:42 +00:00
christos f958df48a3 fix unconst 2018-04-07 00:36:55 +00:00
christos 08f1d13fb0 restore default xx salt. 2018-04-07 00:26:12 +00:00
christos 78327f041b merge conflicts 2018-04-06 23:04:43 +00:00
christos 5306042184 *) Constructed ASN.1 types with a recursive definition could exceed the stack
Constructed ASN.1 types with a recursive definition (such as can be found
     in PKCS7) could eventually exceed the stack given malicious input with
     excessive recursion. This could result in a Denial Of Service attack. There
     are no such structures used within SSL/TLS that come from untrusted sources
     so this is considered safe.

     This issue was reported to OpenSSL on 4th January 2018 by the OSS-fuzz
     project.
     (CVE-2018-0739)
     [Matt Caswell]

  *) Incorrect CRYPTO_memcmp on HP-UX PA-RISC

     Because of an implementation bug the PA-RISC CRYPTO_memcmp function is
     effectively reduced to only comparing the least significant bit of each
     byte. This allows an attacker to forge messages that would be considered as
     authenticated in an amount of tries lower than that guaranteed by the
     security claims of the scheme. The module can only be compiled by the
     HP-UX assembler, so that only HP-UX PA-RISC targets are affected.

     This issue was reported to OpenSSL on 2nd March 2018 by Peter Waltenberg
     (IBM).
     (CVE-2018-0733)
     [Andy Polyakov]

  *) Add a build target 'build_all_generated', to build all generated files
     and only that.  This can be used to prepare everything that requires
     things like perl for a system that lacks perl and then move everything
     to that system and do the rest of the build there.
     [Richard Levitte]

  *) Backport SSL_OP_NO_RENGOTIATION

     OpenSSL 1.0.2 and below had the ability to disable renegotiation using the
     (undocumented) SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS flag. Due to the opacity
     changes this is no longer possible in 1.1.0. Therefore the new
     SSL_OP_NO_RENEGOTIATION option from 1.1.1-dev has been backported to
     1.1.0 to provide equivalent functionality.

     Note that if an application built against 1.1.0h headers (or above) is run
     using an older version of 1.1.0 (prior to 1.1.0h) then the option will be
     accepted but nothing will happen, i.e. renegotiation will not be prevented.
     [Matt Caswell]

  *) Removed the OS390-Unix config target.  It relied on a script that doesn't
     exist.
     [Rich Salz]

  *) rsaz_1024_mul_avx2 overflow bug on x86_64

     There is an overflow bug in the AVX2 Montgomery multiplication procedure
     used in exponentiation with 1024-bit moduli. No EC algorithms are affected.
     Analysis suggests that attacks against RSA and DSA as a result of this
     defect would be very difficult to perform and are not believed likely.
     Attacks against DH1024 are considered just feasible, because most of the
     work necessary to deduce information about a private key may be performed
     offline. The amount of resources required for such an attack would be
     significant. However, for an attack on TLS to be meaningful, the server
     would have to share the DH1024 private key among multiple clients, which is
     no longer an option since CVE-2016-0701.

     This only affects processors that support the AVX2 but not ADX extensions
     like Intel Haswell (4th generation).

     This issue was reported to OpenSSL by David Benjamin (Google). The issue
     was originally found via the OSS-Fuzz project.
     (CVE-2017-3738)
     [Andy Polyakov]
2018-04-06 22:49:06 +00:00
christos db50f7682d - use c99 initializers
- add kdc offset functions
2018-04-06 19:57:03 +00:00
christos 2e9ba29a65 don't forget to initialize the kdc_offset (it was random before) 2018-04-06 19:56:43 +00:00
christos ffae97bbe8 merge conflicts 2018-04-06 18:58:59 +00:00
christos ad340bdf0b OpenSSH 7.7 was released on 2018-04-02. It is available from the
mirrors listed at http://www.openssh.com/ shortly.

OpenSSH is a 100% complete SSH protocol 2.0 implementation and
includes sftp client and server support.

Once again, we would like to thank the OpenSSH community for their
continued support of the project, especially those who contributed
code or patches, reported bugs, tested snapshots or donated to the
project. More information on donations may be found at:
http://www.openssh.com/donations.html

Potentially-incompatible changes
================================

This release includes a number of changes that may affect existing
configurations:

 * ssh(1)/sshd(8): Drop compatibility support for some very old SSH
   implementations, including ssh.com <=2.* and OpenSSH <= 3.*. These
   versions were all released in or before 2001 and predate the final
   SSH RFCs. The support in question isn't necessary for RFC-compliant
   SSH implementations.

Changes since OpenSSH 7.6
=========================

This is primarily a bugfix release.

New Features
------------

 * All: Add experimental support for PQC XMSS keys (Extended Hash-
   Based Signatures) based on the algorithm described in
   https://tools.ietf.org/html/draft-irtf-cfrg-xmss-hash-based-signatures-12
   The XMSS signature code is experimental and not compiled in by
   default.

 * sshd(8): Add a "rdomain" criteria for the sshd_config Match keyword
   to allow conditional configuration that depends on which routing
   domain a connection was received on (currently supported on OpenBSD
   and Linux).

 * sshd_config(5): Add an optional rdomain qualifier to the
   ListenAddress directive to allow listening on different routing
   domains. This is supported only on OpenBSD and Linux at present.

 * sshd_config(5): Add RDomain directive to allow the authenticated
   session to be placed in an explicit routing domain. This is only
   supported on OpenBSD at present.

 * sshd(8): Add "expiry-time" option for authorized_keys files to
   allow for expiring keys.

 * ssh(1): Add a BindInterface option to allow binding the outgoing
   connection to an interface's address (basically a more usable
   BindAddress)

 * ssh(1): Expose device allocated for tun/tap forwarding via a new
   %T expansion for LocalCommand. This allows LocalCommand to be used
   to prepare the interface.

 * sshd(8): Expose the device allocated for tun/tap forwarding via a
   new SSH_TUNNEL environment variable. This allows automatic setup of
   the interface and surrounding network configuration automatically on
   the server.

 * ssh(1)/scp(1)/sftp(1): Add URI support to ssh, sftp and scp, e.g.
   ssh://user@host or sftp://user@host/path.  Additional connection
   parameters described in draft-ietf-secsh-scp-sftp-ssh-uri-04 are not
   implemented since the ssh fingerprint format in the draft uses the
   deprecated MD5 hash with no way to specify the any other algorithm.

 * ssh-keygen(1): Allow certificate validity intervals that specify
   only a start or stop time (instead of both or neither).

 * sftp(1): Allow "cd" and "lcd" commands with no explicit path
   argument. lcd will change to the local user's home directory as
   usual. cd will change to the starting directory for session (because
   the protocol offers no way to obtain the remote user's home
   directory). bz#2760

 * sshd(8): When doing a config test with sshd -T, only require the
   attributes that are actually used in Match criteria rather than (an
   incomplete list of) all criteria.

Bugfixes
--------

 * ssh(1)/sshd(8): More strictly check signature types during key
   exchange against what was negotiated. Prevents downgrade of RSA
   signatures made with SHA-256/512 to SHA-1.

 * sshd(8): Fix support for client that advertise a protocol version
   of "1.99" (indicating that they are prepared to accept both SSHv1 and
   SSHv2). This was broken in OpenSSH 7.6 during the removal of SSHv1
   support. bz#2810

 * ssh(1): Warn when the agent returns a ssh-rsa (SHA1) signature when
   a rsa-sha2-256/512 signature was requested. This condition is possible
   when an old or non-OpenSSH agent is in use. bz#2799

 * ssh-agent(1): Fix regression introduced in 7.6 that caused ssh-agent
   to fatally exit if presented an invalid signature request message.

 * sshd_config(5): Accept yes/no flag options case-insensitively, as
   has been the case in ssh_config(5) for a long time. bz#2664

 * ssh(1): Improve error reporting for failures during connection.
   Under some circumstances misleading errors were being shown. bz#2814

 * ssh-keyscan(1): Add -D option to allow printing of results directly
   in SSHFP format. bz#2821

 * regress tests: fix PuTTY interop test broken in last release's SSHv1
   removal. bz#2823

 * ssh(1): Compatibility fix for some servers that erroneously drop the
   connection when the IUTF8 (RFC8160) option is sent.

 * scp(1): Disable RemoteCommand and RequestTTY in the ssh session
   started by scp (sftp was already doing this.)

 * ssh-keygen(1): Refuse to create a certificate with an unusable
   number of principals.

 * ssh-keygen(1): Fatally exit if ssh-keygen is unable to write all the
   public key during key generation. Previously it would silently
   ignore errors writing the comment and terminating newline.

 * ssh(1): Do not modify hostname arguments that are addresses by
   automatically forcing them to lower-case. Instead canonicalise them
   to resolve ambiguities (e.g. ::0001 => ::1) before they are matched
   against known_hosts. bz#2763

 * ssh(1): Don't accept junk after "yes" or "no" responses to hostkey
   prompts. bz#2803

 * sftp(1): Have sftp print a warning about shell cleanliness when
   decoding the first packet fails, which is usually caused by shells
   polluting stdout of non-interactive startups. bz#2800

 * ssh(1)/sshd(8): Switch timers in packet code from using wall-clock
   time to monotonic time, allowing the packet layer to better function
   over a clock step and avoiding possible integer overflows during
   steps.

 * Numerous manual page fixes and improvements.

Portability
-----------

 * sshd(8): Correctly detect MIPS ABI in use at configure time. Fixes
   sandbox violations on some environments.

 * sshd(8): Remove UNICOS support. The hardware and software are literal
   museum pieces and support in sshd is too intrusive to justify
   maintaining.

 * All: Build and link with "retpoline" flags when available to mitigate
   the "branch target injection" style (variant 2) of the Spectre
   branch-prediction vulnerability.

 * All: Add auto-generated dependency information to Makefile.

 * Numerous fixed to the RPM spec files.

Checksums:
==========

- SHA1 (openssh-7.7.tar.gz) = 24812e05fa233014c847c7775748316e7f8a836c
- SHA256 (openssh-7.7.tar.gz) = T4ua1L/vgAYqwB0muRahvnm5ZUr3PLY9nPljaG8egvo=

- SHA1 (openssh-7.7p1.tar.gz) = 446fe9ed171f289f0d62197dffdbfdaaf21c49f2
- SHA256 (openssh-7.7p1.tar.gz) = 1zvn5oTpnvzQJL4Vowv/y+QbASsvezyQhK7WIXdea48=

Please note that the SHA256 signatures are base64 encoded and not
hexadecimal (which is the default for most checksum tools). The PGP
key used to sign the releases is available as RELEASE_KEY.asc from
the mirror sites.

Reporting Bugs:
===============

- Please read http://www.openssh.com/report.html
  Security bugs should be reported directly to openssh@openssh.com
2018-04-06 18:56:07 +00:00
ryo 04e2d8f4a5 when CPPFLAGS include a parameter that has any spaces (e.g. CPPFLAGS="-DBN_LLONG=\"long long\""),
$CPP $CPPFLAGS fails. (aarch64--netbsd-clang: error: no such file or directory: 'long"')

advice to use "eval" by soda@. thanks.
2018-04-06 15:47:08 +00:00
sevan f1fc57f92c Drop superfluous zero prefix for single digit number days.
heads up by wiz
2018-04-04 21:39:35 +00:00
sevan 9835dc7a54 Some further changes from PR bin/48395. 2018-04-03 21:57:14 +00:00
sevan 7119252bd3 Revert previous change as the typedef should now work as intended.
Thanks christos, martin
2018-04-02 10:30:06 +00:00
christos f92f386dca remove unused struct tag. 2018-04-01 23:38:02 +00:00
sevan 189f355498 netpgp_t is a structure 2018-04-01 23:25:27 +00:00
christos e24b32683b Avoid double frees (thanks asan) 2018-04-01 22:59:57 +00:00
christos 7b335de413 make debugrm compile again. 2018-04-01 22:35:22 +00:00
christos 222f47901a use the OpenSSL version of des_modes.7 since it is newer. 2018-03-15 18:40:16 +00:00
mrg 6e029617f0 add *template.x to CLEANFILES. 2018-03-13 03:06:51 +00:00
mrg 76e973d086 match opening ( with closing ) instead of closing }.
fixes mips builds... partly.
2018-03-09 21:49:55 +00:00
christos 419bfd3d3e use the proper match pattern 2018-03-09 12:40:23 +00:00
christos b84f7f92e0 Disable assembly stubs for the big endian variants of mips (could be more
precise? are all of them broken?)
2018-03-09 12:39:30 +00:00
christos 97b4576f10 Add the rest of the earm flavors; madness. 2018-03-09 01:34:30 +00:00
christos c9896dce02 Don't define the v8 functions for v7! 2018-03-09 01:33:57 +00:00
christos a10a55c9e9 oops forgot to commit this. 2018-03-08 13:38:02 +00:00
christos 4be809cba5 need CRYPTO_memcmp() 2018-03-08 03:15:08 +00:00
christos 49ec5300d6 add size directives. 2018-03-08 03:14:31 +00:00
christos 128142209e remove the SHA256_Init man page; we are using ours from libc. 2018-03-07 22:40:26 +00:00
christos 884443877d fix build on non-earm 2018-03-07 20:38:39 +00:00
christos 82641d7407 only use the 64 bit abi if specified on the command line. 2018-03-07 19:44:31 +00:00
christos 020c64a4e7 HACK around aarch64 having "long long" "__int64_t" 2018-03-07 16:06:57 +00:00
christos bf6a9fb3d4 Enable AES_ASM explicitly not by just looking at the processor, like we
do for other archs!
2018-03-07 16:06:29 +00:00
christos 1aaa4bda28 regen; some assembly files don't work so disable for now. 2018-03-07 16:05:44 +00:00
mlelstv 847d546cb0 Use local ELF labels and avoid an unsupported 16bit relocation. 2018-03-07 06:55:01 +00:00
christos cf226b6835 need CRYPTO_memcmp 2018-03-06 19:32:16 +00:00
christos 33c1542bb7 need CRYPTO_memequal 2018-03-06 19:30:56 +00:00
christos c79601bd37 fix v8 PMULL detection (Robert Swindells) 2018-03-06 18:36:09 +00:00
christos ac465b1fa5 For mips64:
Avoid branch delay spot warnings: Warning: macro instruction expanded into
multiple instructions in a branch delay slot
2018-03-06 18:32:37 +00:00
christos 1e125808a4 Avoid branch delay spot warnings: Warning: macro instruction expanded into
multiple instructions in a branch delay slot
XXX: Manually need to fix in auto-generation.
2018-03-06 13:47:25 +00:00
christos 30f7db8025 Add a case for 7, remove arm64crypto.S 2018-03-06 13:37:43 +00:00
christos 6410c86794 Handle mips64 properly. 2018-03-05 16:43:50 +00:00
christos 7e8fa9f58b need CRYPTO_memcmp. 2018-03-05 01:00:12 +00:00
christos 496e722b68 make the key functions public, and provide function type and size attributes. 2018-03-05 00:59:43 +00:00
christos 2ac7033a22 regen 2018-03-04 16:45:12 +00:00
christos 3f6efeccf9 hack for lint 2018-03-04 04:09:03 +00:00
christos 1847e6b0e8 Alpha Stuff 2018-03-04 04:00:45 +00:00
christos e7039be786 regen. 2018-03-04 03:25:18 +00:00
christos 76c4f34245 regen 2018-03-04 00:59:44 +00:00
christos 48c10bd910 remove useless grep 2018-03-04 00:24:21 +00:00
christos dffa37b04e provide CRYPTO_memcmp for the have-nots. 2018-03-03 04:32:46 +00:00
christos edeef4718e Regen for OpenSSL-1.1
XXX: we could add the new assembly files to speed-up things but now we
are only using the assembly stubs that 1.0 used.
2018-03-03 00:20:57 +00:00
christos 3eb848e5fb Remove unused part of the Makefile (Muhammed.Shameem) 2018-03-02 13:26:40 +00:00
christos 8083c34295 make this link again:
- we don't want to define the reference impl flag because there is no
  complete c reference impl for nistz256
- we want to define an empty OPENSSL_cpuid_setup() because we don't want
  to use the v9 one... this function is called from 2 places:
  1. in the sparccpuid.S assembly, which we need for the CRYPTO_mem*
     functions -- but we could get rid of the v9 stuff with
     #ifdef __sparc_v9__ for size and we don't bother
  2. crypto/init.c
2018-02-26 01:33:05 +00:00
mrg 2e19323388 add LIBKRB5_LDADD/LIBKRB5_DPADD and their static counterparts
to bsd.prog.mk.  use them instead of hard coding various lists
of libraries for krb5.

this fixes static builds.
2018-02-25 00:16:48 +00:00
christos 1bfb3e3818 dedup 2018-02-24 21:51:22 +00:00
christos 34c1b54ff7 we don't yet have __atomic_is_lock_free 2018-02-24 21:47:34 +00:00
christos 6462075721 fix sparc. 2018-02-24 21:45:57 +00:00
christos 96c8300010 add the right assembler flags for the two new files. 2018-02-24 20:23:58 +00:00
martin 031637411f Backout my over-eager backout - we need this for sparc64 building netbsd32
compat libs, but still lots of #ifdef's missing to make this ready for
usage by sparc.
2018-02-20 13:14:02 +00:00
martin 9d80f6b600 Backout previous "regen" - the regen target in this directory is bogus,
there is no "sparcv9" nor any "vis" in the default CPU targets for
NetBSD/sparc.
2018-02-20 12:48:46 +00:00
christos e1e22576fa Avoid ssp error on sparc64 2018-02-18 23:41:44 +00:00
christos 1c6734b209 Regen. 2018-02-18 23:38:47 +00:00
christos 82081465bf Provide SHAR384 flavors: The OpenSSL SHA512_Final implementation is re-used
to implement SHA384_Final, but does the right thing by checking the internally
kept digest size. The NetBSD libc implementation provides two entry points
that write a different size digest, so if we use the SHA512_Final from here
we end up overwriting memory.
2018-02-13 22:35:47 +00:00
christos 0f39d79ef1 Provide the means to use the libc sha2 internally instead of the openssl
implementation; this does not really matter since their structs are larger
than ours, but it helps when we want to verify that we are not using any
of the openssl code.
2018-02-13 22:32:10 +00:00
christos ba6745c33a Add a (void *) cast to make things compile with our own sha2 header 2018-02-13 22:29:14 +00:00
christos ab7c594717 add missing test files added in the vendor branch. 2018-02-13 17:39:38 +00:00
martin 24e4f9aca2 Fix copy & pasto (dsa code vs. rsa code) in previous, fixes PR lib/53012
and recentish sshfs test failures.
2018-02-13 09:51:33 +00:00
christos 8ceb60ceb8 we need variables to be signed here. 2018-02-12 02:15:31 +00:00
christos e83bfb8257 fix pasto 2018-02-10 16:16:28 +00:00
nakayama fe7c136ffd Restore pic and sse2 enabled code to make libcrypto works as before. 2018-02-10 13:29:55 +00:00
christos 4f511e6924 fix typo 2018-02-10 06:22:22 +00:00
christos 9d3e52666a Fix TEXTREL's 2018-02-10 05:51:06 +00:00
christos e155b97cb7 fix BN_to_integer to get rid of __UNCONST. Trick question:
How many BN_to_integer implementations does Heimdal contain (I only fixed 2).
2018-02-09 23:22:12 +00:00
christos f5725ffc1d Use the magic FILESBUILD variable so that it builds with BUILD/UPDATE unset.
Why again FILESBUILD is not the default and needs to be set?
2018-02-09 22:46:19 +00:00
christos 0a6da94db6 add reset, needed by nsd. 2018-02-09 17:11:14 +00:00
christos f8cfffe1e3 XXX: use /dev/stdout because OpenSSL changed the params for i386!!?!? 2018-02-09 16:06:59 +00:00
christos 89869e261c more file 2018-02-09 13:37:16 +00:00
christos b8fabe00c3 i386 provides "partial words" assembly support. 2018-02-09 13:35:45 +00:00
christos 455943d417 new script does not know -D, regen 2018-02-09 13:25:41 +00:00
christos 329127fb83 only set the compat version for OpenSSL-1.0 2018-02-09 01:54:46 +00:00
christos db213f8f02 adjust to renamed file 2018-02-08 23:32:38 +00:00
christos 8df8164852 need openssl/dh.h 2018-02-08 23:04:13 +00:00
christos 4e65a86b8b use the right map file 2018-02-08 22:51:06 +00:00
christos 704db68e2d Add a linker script 2018-02-08 22:49:14 +00:00
christos 975583d54a fix the man pages, add a linker script 2018-02-08 22:48:55 +00:00
christos b8b3c5f24b update build glue 2018-02-08 21:57:23 +00:00
christos 5af5305085 merged conflicts 2018-02-08 21:51:22 +00:00
christos c7da899b45 Changes between 1.1.0f and 1.1.0g [2 Nov 2017]
*) bn_sqrx8x_internal carry bug on x86_64

     There is a carry propagating bug in the x86_64 Montgomery squaring
     procedure. No EC algorithms are affected. Analysis suggests that attacks
     against RSA and DSA as a result of this defect would be very difficult to
     perform and are not believed likely. Attacks against DH are considered just
     feasible (although very difficult) because most of the work necessary to
     deduce information about a private key may be performed offline. The amount
     of resources required for such an attack would be very significant and
     likely only accessible to a limited number of attackers. An attacker would
     additionally need online access to an unpatched system using the target
     private key in a scenario with persistent DH parameters and a private
     key that is shared between multiple clients.

     This only affects processors that support the BMI1, BMI2 and ADX extensions
     like Intel Broadwell (5th generation) and later or AMD Ryzen.

     This issue was reported to OpenSSL by the OSS-Fuzz project.
     (CVE-2017-3736)
     [Andy Polyakov]

  *) Malformed X.509 IPAddressFamily could cause OOB read

     If an X.509 certificate has a malformed IPAddressFamily extension,
     OpenSSL could do a one-byte buffer overread. The most likely result
     would be an erroneous display of the certificate in text format.

     This issue was reported to OpenSSL by the OSS-Fuzz project.
     (CVE-2017-3735)
     [Rich Salz]

  *) Ignore the '-named_curve auto' value for compatibility of applications
     with OpenSSL 1.0.2.
     [Tomas Mraz <tmraz@fedoraproject.org>]

  *) Support for SSL_OP_NO_ENCRYPT_THEN_MAC in SSL_CONF_cmd.
     [Emilia Käsper]

 Changes between 1.1.0e and 1.1.0f [25 May 2017]

  *) Have 'config' recognise 64-bit mingw and choose 'mingw64' as the target
     platform rather than 'mingw'.
     [Richard Levitte]

  *) Remove the VMS-specific reimplementation of gmtime from crypto/o_times.c.
     VMS C's RTL has a fully up to date gmtime() and gmtime_r() since V7.1,
     which is the minimum version we support.
     [Richard Levitte]

 Changes between 1.1.0d and 1.1.0e [16 Feb 2017]

  *) Encrypt-Then-Mac renegotiation crash

     During a renegotiation handshake if the Encrypt-Then-Mac extension is
     negotiated where it was not in the original handshake (or vice-versa) then
     this can cause OpenSSL to crash (dependant on ciphersuite). Both clients
     and servers are affected.

     This issue was reported to OpenSSL by Joe Orton (Red Hat).
     (CVE-2017-3733)
     [Matt Caswell]

 Changes between 1.1.0c and 1.1.0d [26 Jan 2017]

  *) Truncated packet could crash via OOB read

     If one side of an SSL/TLS path is running on a 32-bit host and a specific
     cipher is being used, then a truncated packet can cause that host to
     perform an out-of-bounds read, usually resulting in a crash.

     This issue was reported to OpenSSL by Robert Święcki of Google.
     (CVE-2017-3731)
     [Andy Polyakov]

  *) Bad (EC)DHE parameters cause a client crash

     If a malicious server supplies bad parameters for a DHE or ECDHE key
     exchange then this can result in the client attempting to dereference a
     NULL pointer leading to a client crash. This could be exploited in a Denial
     of Service attack.

     This issue was reported to OpenSSL by Guido Vranken.
     (CVE-2017-3730)
     [Matt Caswell]

  *) BN_mod_exp may produce incorrect results on x86_64

     There is a carry propagating bug in the x86_64 Montgomery squaring
     procedure. No EC algorithms are affected. Analysis suggests that attacks
     against RSA and DSA as a result of this defect would be very difficult to
     perform and are not believed likely. Attacks against DH are considered just
     feasible (although very difficult) because most of the work necessary to
     deduce information about a private key may be performed offline. The amount
     of resources required for such an attack would be very significant and
     likely only accessible to a limited number of attackers. An attacker would
     additionally need online access to an unpatched system using the target
     private key in a scenario with persistent DH parameters and a private
     key that is shared between multiple clients. For example this can occur by
     default in OpenSSL DHE based SSL/TLS ciphersuites. Note: This issue is very
     similar to CVE-2015-3193 but must be treated as a separate problem.

     This issue was reported to OpenSSL by the OSS-Fuzz project.
     (CVE-2017-3732)
     [Andy Polyakov]

 Changes between 1.1.0b and 1.1.0c [10 Nov 2016]

  *) ChaCha20/Poly1305 heap-buffer-overflow

     TLS connections using *-CHACHA20-POLY1305 ciphersuites are susceptible to
     a DoS attack by corrupting larger payloads. This can result in an OpenSSL
     crash. This issue is not considered to be exploitable beyond a DoS.

     This issue was reported to OpenSSL by Robert Święcki (Google Security Team)
     (CVE-2016-7054)
     [Richard Levitte]

  *) CMS Null dereference

     Applications parsing invalid CMS structures can crash with a NULL pointer
     dereference. This is caused by a bug in the handling of the ASN.1 CHOICE
     type in OpenSSL 1.1.0 which can result in a NULL value being passed to the
     structure callback if an attempt is made to free certain invalid encodings.
     Only CHOICE structures using a callback which do not handle NULL value are
     affected.

     This issue was reported to OpenSSL by Tyler Nighswander of ForAllSecure.
     (CVE-2016-7053)
     [Stephen Henson]

  *) Montgomery multiplication may produce incorrect results

     There is a carry propagating bug in the Broadwell-specific Montgomery
     multiplication procedure that handles input lengths divisible by, but
     longer than 256 bits. Analysis suggests that attacks against RSA, DSA
     and DH private keys are impossible. This is because the subroutine in
     question is not used in operations with the private key itself and an input
     of the attacker's direct choice. Otherwise the bug can manifest itself as
     transient authentication and key negotiation failures or reproducible
     erroneous outcome of public-key operations with specially crafted input.
     Among EC algorithms only Brainpool P-512 curves are affected and one
     presumably can attack ECDH key negotiation. Impact was not analyzed in
     detail, because pre-requisites for attack are considered unlikely. Namely
     multiple clients have to choose the curve in question and the server has to
     share the private key among them, neither of which is default behaviour.
     Even then only clients that chose the curve will be affected.

     This issue was publicly reported as transient failures and was not
     initially recognized as a security issue. Thanks to Richard Morgan for
     providing reproducible case.
     (CVE-2016-7055)
     [Andy Polyakov]

  *) OpenSSL now fails if it receives an unrecognised record type in TLS1.0
     or TLS1.1. Previously this only happened in SSLv3 and TLS1.2. This is to
     prevent issues where no progress is being made and the peer continually
     sends unrecognised record types, using up resources processing them.
     [Matt Caswell]

  *) Removed automatic addition of RPATH in shared libraries and executables,
     as this was a remainder from OpenSSL 1.0.x and isn't needed any more.
     [Richard Levitte]

 Changes between 1.1.0a and 1.1.0b [26 Sep 2016]

  *) Fix Use After Free for large message sizes

     The patch applied to address CVE-2016-6307 resulted in an issue where if a
     message larger than approx 16k is received then the underlying buffer to
     store the incoming message is reallocated and moved. Unfortunately a
     dangling pointer to the old location is left which results in an attempt to
     write to the previously freed location. This is likely to result in a
     crash, however it could potentially lead to execution of arbitrary code.

     This issue only affects OpenSSL 1.1.0a.

     This issue was reported to OpenSSL by Robert Święcki.
     (CVE-2016-6309)
     [Matt Caswell]

 Changes between 1.1.0 and 1.1.0a [22 Sep 2016]

  *) OCSP Status Request extension unbounded memory growth

     A malicious client can send an excessively large OCSP Status Request
     extension. If that client continually requests renegotiation, sending a
     large OCSP Status Request extension each time, then there will be unbounded
     memory growth on the server. This will eventually lead to a Denial Of
     Service attack through memory exhaustion. Servers with a default
     configuration are vulnerable even if they do not support OCSP. Builds using
     the "no-ocsp" build time option are not affected.

     This issue was reported to OpenSSL by Shi Lei (Gear Team, Qihoo 360 Inc.)
     (CVE-2016-6304)
     [Matt Caswell]

  *) SSL_peek() hang on empty record

     OpenSSL 1.1.0 SSL/TLS will hang during a call to SSL_peek() if the peer
     sends an empty record. This could be exploited by a malicious peer in a
     Denial Of Service attack.

     This issue was reported to OpenSSL by Alex Gaynor.
     (CVE-2016-6305)
     [Matt Caswell]

  *) Excessive allocation of memory in tls_get_message_header() and
     dtls1_preprocess_fragment()

     A (D)TLS message includes 3 bytes for its length in the header for the
     message. This would allow for messages up to 16Mb in length. Messages of
     this length are excessive and OpenSSL includes a check to ensure that a
     peer is sending reasonably sized messages in order to avoid too much memory
     being consumed to service a connection. A flaw in the logic of version
     1.1.0 means that memory for the message is allocated too early, prior to
     the excessive message length check. Due to way memory is allocated in
     OpenSSL this could mean an attacker could force up to 21Mb to be allocated
     to service a connection. This could lead to a Denial of Service through
     memory exhaustion. However, the excessive message length check still takes
     place, and this would cause the connection to immediately fail. Assuming
     that the application calls SSL_free() on the failed connection in a timely
     manner then the 21Mb of allocated memory will then be immediately freed
     again. Therefore the excessive memory allocation will be transitory in
     nature. This then means that there is only a security impact if:

     1) The application does not call SSL_free() in a timely manner in the event
     that the connection fails
     or
     2) The application is working in a constrained environment where there is
     very little free memory
     or
     3) The attacker initiates multiple connection attempts such that there are
     multiple connections in a state where memory has been allocated for the
     connection; SSL_free() has not yet been called; and there is insufficient
     memory to service the multiple requests.

     Except in the instance of (1) above any Denial Of Service is likely to be
     transitory because as soon as the connection fails the memory is
     subsequently freed again in the SSL_free() call. However there is an
     increased risk during this period of application crashes due to the lack of
     memory - which would then mean a more serious Denial of Service.

     This issue was reported to OpenSSL by Shi Lei (Gear Team, Qihoo 360 Inc.)
     (CVE-2016-6307 and CVE-2016-6308)
     [Matt Caswell]

  *) solaris-x86-cc, i.e. 32-bit configuration with vendor compiler,
     had to be removed. Primary reason is that vendor assembler can't
     assemble our modules with -KPIC flag. As result it, assembly
     support, was not even available as option. But its lack means
     lack of side-channel resistant code, which is incompatible with
     security by todays standards. Fortunately gcc is readily available
     prepackaged option, which we firmly point at...
     [Andy Polyakov]

 Changes between 1.0.2h and 1.1.0  [25 Aug 2016]

  *) Windows command-line tool supports UTF-8 opt-in option for arguments
     and console input. Setting OPENSSL_WIN32_UTF8 environment variable
     (to any value) allows Windows user to access PKCS#12 file generated
     with Windows CryptoAPI and protected with non-ASCII password, as well
     as files generated under UTF-8 locale on Linux also protected with
     non-ASCII password.
     [Andy Polyakov]

  *) To mitigate the SWEET32 attack (CVE-2016-2183), 3DES cipher suites
     have been disabled by default and removed from DEFAULT, just like RC4.
     See the RC4 item below to re-enable both.
     [Rich Salz]

  *) The method for finding the storage location for the Windows RAND seed file
     has changed. First we check %RANDFILE%. If that is not set then we check
     the directories %HOME%, %USERPROFILE% and %SYSTEMROOT% in that order. If
     all else fails we fall back to C:\.
     [Matt Caswell]

  *) The EVP_EncryptUpdate() function has had its return type changed from void
     to int. A return of 0 indicates and error while a return of 1 indicates
     success.
     [Matt Caswell]

  *) The flags RSA_FLAG_NO_CONSTTIME, DSA_FLAG_NO_EXP_CONSTTIME and
     DH_FLAG_NO_EXP_CONSTTIME which previously provided the ability to switch
     off the constant time implementation for RSA, DSA and DH have been made
     no-ops and deprecated.
     [Matt Caswell]

  *) Windows RAND implementation was simplified to only get entropy by
     calling CryptGenRandom(). Various other RAND-related tickets
     were also closed.
     [Joseph Wylie Yandle, Rich Salz]

  *) The stack and lhash API's were renamed to start with OPENSSL_SK_
     and OPENSSL_LH_, respectively.  The old names are available
     with API compatibility.  They new names are now completely documented.
     [Rich Salz]

  *) Unify TYPE_up_ref(obj) methods signature.
     SSL_CTX_up_ref(), SSL_up_ref(), X509_up_ref(), EVP_PKEY_up_ref(),
     X509_CRL_up_ref(), X509_OBJECT_up_ref_count() methods are now returning an
     int (instead of void) like all others TYPE_up_ref() methods.
     So now these methods also check the return value of CRYPTO_atomic_add(),
     and the validity of object reference counter.
     [fdasilvayy@gmail.com]

  *) With Windows Visual Studio builds, the .pdb files are installed
     alongside the installed libraries and executables.  For a static
     library installation, ossl_static.pdb is the associate compiler
     generated .pdb file to be used when linking programs.
     [Richard Levitte]

  *) Remove openssl.spec.  Packaging files belong with the packagers.
     [Richard Levitte]

  *) Automatic Darwin/OSX configuration has had a refresh, it will now
     recognise x86_64 architectures automatically.  You can still decide
     to build for a different bitness with the environment variable
     KERNEL_BITS (can be 32 or 64), for example:

         KERNEL_BITS=32 ./config

     [Richard Levitte]

  *) Change default algorithms in pkcs8 utility to use PKCS#5 v2.0,
     256 bit AES and HMAC with SHA256.
     [Steve Henson]

  *) Remove support for MIPS o32 ABI on IRIX (and IRIX only).
     [Andy Polyakov]

  *) Triple-DES ciphers have been moved from HIGH to MEDIUM.
     [Rich Salz]

  *) To enable users to have their own config files and build file templates,
     Configure looks in the directory indicated by the environment variable
     OPENSSL_LOCAL_CONFIG_DIR as well as the in-source Configurations/
     directory.  On VMS, OPENSSL_LOCAL_CONFIG_DIR is expected to be a logical
     name and is used as is.
     [Richard Levitte]

  *) The following datatypes were made opaque: X509_OBJECT, X509_STORE_CTX,
     X509_STORE, X509_LOOKUP, and X509_LOOKUP_METHOD.  The unused type
     X509_CERT_FILE_CTX was removed.
     [Rich Salz]

  *) "shared" builds are now the default. To create only static libraries use
     the "no-shared" Configure option.
     [Matt Caswell]

  *) Remove the no-aes, no-hmac, no-rsa, no-sha and no-md5 Configure options.
     All of these option have not worked for some while and are fundamental
     algorithms.
     [Matt Caswell]

  *) Make various cleanup routines no-ops and mark them as deprecated. Most
     global cleanup functions are no longer required because they are handled
     via auto-deinit (see OPENSSL_init_crypto and OPENSSL_init_ssl man pages).
     Explicitly de-initing can cause problems (e.g. where a library that uses
     OpenSSL de-inits, but an application is still using it). The affected
     functions are CONF_modules_free(), ENGINE_cleanup(), OBJ_cleanup(),
     EVP_cleanup(), BIO_sock_cleanup(), CRYPTO_cleanup_all_ex_data(),
     RAND_cleanup(), SSL_COMP_free_compression_methods(), ERR_free_strings() and
     COMP_zlib_cleanup().
     [Matt Caswell]

  *) --strict-warnings no longer enables runtime debugging options
     such as REF_DEBUG. Instead, debug options are automatically
     enabled with '--debug' builds.
     [Andy Polyakov, Emilia Käsper]

  *) Made DH and DH_METHOD opaque. The structures for managing DH objects
     have been moved out of the public header files. New functions for managing
     these have been added.
     [Matt Caswell]

  *) Made RSA and RSA_METHOD opaque. The structures for managing RSA
     objects have been moved out of the public header files. New
     functions for managing these have been added.
     [Richard Levitte]

  *) Made DSA and DSA_METHOD opaque. The structures for managing DSA objects
     have been moved out of the public header files. New functions for managing
     these have been added.
     [Matt Caswell]

  *) Made BIO and BIO_METHOD opaque. The structures for managing BIOs have been
     moved out of the public header files. New functions for managing these
     have been added.
     [Matt Caswell]

  *) Removed no-rijndael as a config option. Rijndael is an old name for AES.
     [Matt Caswell]

  *) Removed the mk1mf build scripts.
     [Richard Levitte]

  *) Headers are now wrapped, if necessary, with OPENSSL_NO_xxx, so
     it is always safe to #include a header now.
     [Rich Salz]

  *) Removed the aged BC-32 config and all its supporting scripts
     [Richard Levitte]

  *) Removed support for Ultrix, Netware, and OS/2.
     [Rich Salz]

  *) Add support for HKDF.
     [Alessandro Ghedini]

  *) Add support for blake2b and blake2s
     [Bill Cox]

  *) Added support for "pipelining". Ciphers that have the
     EVP_CIPH_FLAG_PIPELINE flag set have a capability to process multiple
     encryptions/decryptions simultaneously. There are currently no built-in
     ciphers with this property but the expectation is that engines will be able
     to offer it to significantly improve throughput. Support has been extended
     into libssl so that multiple records for a single connection can be
     processed in one go (for >=TLS 1.1).
     [Matt Caswell]

  *) Added the AFALG engine. This is an async capable engine which is able to
     offload work to the Linux kernel. In this initial version it only supports
     AES128-CBC. The kernel must be version 4.1.0 or greater.
     [Catriona Lucey]

  *) OpenSSL now uses a new threading API. It is no longer necessary to
     set locking callbacks to use OpenSSL in a multi-threaded environment. There
     are two supported threading models: pthreads and windows threads. It is
     also possible to configure OpenSSL at compile time for "no-threads". The
     old threading API should no longer be used. The functions have been
     replaced with "no-op" compatibility macros.
     [Alessandro Ghedini, Matt Caswell]

  *) Modify behavior of ALPN to invoke callback after SNI/servername
     callback, such that updates to the SSL_CTX affect ALPN.
     [Todd Short]

  *) Add SSL_CIPHER queries for authentication and key-exchange.
     [Todd Short]

  *) Changes to the DEFAULT cipherlist:
       - Prefer (EC)DHE handshakes over plain RSA.
       - Prefer AEAD ciphers over legacy ciphers.
       - Prefer ECDSA over RSA when both certificates are available.
       - Prefer TLSv1.2 ciphers/PRF.
       - Remove DSS, SEED, IDEA, CAMELLIA, and AES-CCM from the
         default cipherlist.
     [Emilia Käsper]

  *) Change the ECC default curve list to be this, in order: x25519,
     secp256r1, secp521r1, secp384r1.
     [Rich Salz]

  *) RC4 based libssl ciphersuites are now classed as "weak" ciphers and are
     disabled by default. They can be re-enabled using the
     enable-weak-ssl-ciphers option to Configure.
     [Matt Caswell]

  *) If the server has ALPN configured, but supports no protocols that the
     client advertises, send a fatal "no_application_protocol" alert.
     This behaviour is SHALL in RFC 7301, though it isn't universally
     implemented by other servers.
     [Emilia Käsper]

  *) Add X25519 support.
     Add ASN.1 and EVP_PKEY methods for X25519. This includes support
     for public and private key encoding using the format documented in
     draft-ietf-curdle-pkix-02. The corresponding EVP_PKEY method supports
     key generation and key derivation.

     TLS support complies with draft-ietf-tls-rfc4492bis-08 and uses
     X25519(29).
     [Steve Henson]

  *) Deprecate SRP_VBASE_get_by_user.
     SRP_VBASE_get_by_user had inconsistent memory management behaviour.
     In order to fix an unavoidable memory leak (CVE-2016-0798),
     SRP_VBASE_get_by_user was changed to ignore the "fake user" SRP
     seed, even if the seed is configured.

     Users should use SRP_VBASE_get1_by_user instead. Note that in
     SRP_VBASE_get1_by_user, caller must free the returned value. Note
     also that even though configuring the SRP seed attempts to hide
     invalid usernames by continuing the handshake with fake
     credentials, this behaviour is not constant time and no strong
     guarantees are made that the handshake is indistinguishable from
     that of a valid user.
     [Emilia Käsper]

  *) Configuration change; it's now possible to build dynamic engines
     without having to build shared libraries and vice versa.  This
     only applies to the engines in engines/, those in crypto/engine/
     will always be built into libcrypto (i.e. "static").

     Building dynamic engines is enabled by default; to disable, use
     the configuration option "disable-dynamic-engine".

     The only requirements for building dynamic engines are the
     presence of the DSO module and building with position independent
     code, so they will also automatically be disabled if configuring
     with "disable-dso" or "disable-pic".

     The macros OPENSSL_NO_STATIC_ENGINE and OPENSSL_NO_DYNAMIC_ENGINE
     are also taken away from openssl/opensslconf.h, as they are
     irrelevant.
     [Richard Levitte]

  *) Configuration change; if there is a known flag to compile
     position independent code, it will always be applied on the
     libcrypto and libssl object files, and never on the application
     object files.  This means other libraries that use routines from
     libcrypto / libssl can be made into shared libraries regardless
     of how OpenSSL was configured.

     If this isn't desirable, the configuration options "disable-pic"
     or "no-pic" can be used to disable the use of PIC.  This will
     also disable building shared libraries and dynamic engines.
     [Richard Levitte]

  *) Removed JPAKE code.  It was experimental and has no wide use.
     [Rich Salz]

  *) The INSTALL_PREFIX Makefile variable has been renamed to
     DESTDIR.  That makes for less confusion on what this variable
     is for.  Also, the configuration option --install_prefix is
     removed.
     [Richard Levitte]

  *) Heartbeat for TLS has been removed and is disabled by default
     for DTLS; configure with enable-heartbeats.  Code that uses the
     old #define's might need to be updated.
     [Emilia Käsper, Rich Salz]

  *) Rename REF_CHECK to REF_DEBUG.
     [Rich Salz]

  *) New "unified" build system

     The "unified" build system is aimed to be a common system for all
     platforms we support.  With it comes new support for VMS.

     This system builds supports building in a different directory tree
     than the source tree.  It produces one Makefile (for unix family
     or lookalikes), or one descrip.mms (for VMS).

     The source of information to make the Makefile / descrip.mms is
     small files called 'build.info', holding the necessary
     information for each directory with source to compile, and a
     template in Configurations, like unix-Makefile.tmpl or
     descrip.mms.tmpl.

     With this change, the library names were also renamed on Windows
     and on VMS.  They now have names that are closer to the standard
     on Unix, and include the major version number, and in certain
     cases, the architecture they are built for.  See "Notes on shared
     libraries" in INSTALL.

     We rely heavily on the perl module Text::Template.
     [Richard Levitte]

  *) Added support for auto-initialisation and de-initialisation of the library.
     OpenSSL no longer requires explicit init or deinit routines to be called,
     except in certain circumstances. See the OPENSSL_init_crypto() and
     OPENSSL_init_ssl() man pages for further information.
     [Matt Caswell]

  *) The arguments to the DTLSv1_listen function have changed. Specifically the
     "peer" argument is now expected to be a BIO_ADDR object.

  *) Rewrite of BIO networking library. The BIO library lacked consistent
     support of IPv6, and adding it required some more extensive
     modifications.  This introduces the BIO_ADDR and BIO_ADDRINFO types,
     which hold all types of addresses and chains of address information.
     It also introduces a new API, with functions like BIO_socket,
     BIO_connect, BIO_listen, BIO_lookup and a rewrite of BIO_accept.
     The source/sink BIOs BIO_s_connect, BIO_s_accept and BIO_s_datagram
     have been adapted accordingly.
     [Richard Levitte]

  *) RSA_padding_check_PKCS1_type_1 now accepts inputs with and without
     the leading 0-byte.
     [Emilia Käsper]

  *) CRIME protection: disable compression by default, even if OpenSSL is
     compiled with zlib enabled. Applications can still enable compression
     by calling SSL_CTX_clear_options(ctx, SSL_OP_NO_COMPRESSION), or by
     using the SSL_CONF library to configure compression.
     [Emilia Käsper]

  *) The signature of the session callback configured with
     SSL_CTX_sess_set_get_cb was changed. The read-only input buffer
     was explicitly marked as 'const unsigned char*' instead of
     'unsigned char*'.
     [Emilia Käsper]

  *) Always DPURIFY. Remove the use of uninitialized memory in the
     RNG, and other conditional uses of DPURIFY. This makes -DPURIFY a no-op.
     [Emilia Käsper]

  *) Removed many obsolete configuration items, including
        DES_PTR, DES_RISC1, DES_RISC2, DES_INT
        MD2_CHAR, MD2_INT, MD2_LONG
        BF_PTR, BF_PTR2
        IDEA_SHORT, IDEA_LONG
        RC2_SHORT, RC2_LONG, RC4_LONG, RC4_CHUNK, RC4_INDEX
     [Rich Salz, with advice from Andy Polyakov]

  *) Many BN internals have been moved to an internal header file.
     [Rich Salz with help from Andy Polyakov]

  *) Configuration and writing out the results from it has changed.
     Files such as Makefile include/openssl/opensslconf.h and are now
     produced through general templates, such as Makefile.in and
     crypto/opensslconf.h.in and some help from the perl module
     Text::Template.

     Also, the center of configuration information is no longer
     Makefile.  Instead, Configure produces a perl module in
     configdata.pm which holds most of the config data (in the hash
     table %config), the target data that comes from the target
     configuration in one of the Configurations/*.conf files (in
     %target).
     [Richard Levitte]

  *) To clarify their intended purposes, the Configure options
     --prefix and --openssldir change their semantics, and become more
     straightforward and less interdependent.

     --prefix shall be used exclusively to give the location INSTALLTOP
     where programs, scripts, libraries, include files and manuals are
     going to be installed.  The default is now /usr/local.

     --openssldir shall be used exclusively to give the default
     location OPENSSLDIR where certificates, private keys, CRLs are
     managed.  This is also where the default openssl.cnf gets
     installed.
     If the directory given with this option is a relative path, the
     values of both the --prefix value and the --openssldir value will
     be combined to become OPENSSLDIR.
     The default for --openssldir is INSTALLTOP/ssl.

     Anyone who uses --openssldir to specify where OpenSSL is to be
     installed MUST change to use --prefix instead.
     [Richard Levitte]

  *) The GOST engine was out of date and therefore it has been removed. An up
     to date GOST engine is now being maintained in an external repository.
     See: https://wiki.openssl.org/index.php/Binaries. Libssl still retains
     support for GOST ciphersuites (these are only activated if a GOST engine
     is present).
     [Matt Caswell]

  *) EGD is no longer supported by default; use enable-egd when
     configuring.
     [Ben Kaduk and Rich Salz]

  *) The distribution now has Makefile.in files, which are used to
     create Makefile's when Configure is run.  *Configure must be run
     before trying to build now.*
     [Rich Salz]

  *) The return value for SSL_CIPHER_description() for error conditions
     has changed.
     [Rich Salz]

  *) Support for RFC6698/RFC7671 DANE TLSA peer authentication.

     Obtaining and performing DNSSEC validation of TLSA records is
     the application's responsibility.  The application provides
     the TLSA records of its choice to OpenSSL, and these are then
     used to authenticate the peer.

     The TLSA records need not even come from DNS.  They can, for
     example, be used to implement local end-entity certificate or
     trust-anchor "pinning", where the "pin" data takes the form
     of TLSA records, which can augment or replace verification
     based on the usual WebPKI public certification authorities.
     [Viktor Dukhovni]

  *) Revert default OPENSSL_NO_DEPRECATED setting.  Instead OpenSSL
     continues to support deprecated interfaces in default builds.
     However, applications are strongly advised to compile their
     source files with -DOPENSSL_API_COMPAT=0x10100000L, which hides
     the declarations of all interfaces deprecated in 0.9.8, 1.0.0
     or the 1.1.0 releases.

     In environments in which all applications have been ported to
     not use any deprecated interfaces OpenSSL's Configure script
     should be used with the --api=1.1.0 option to entirely remove
     support for the deprecated features from the library and
     unconditionally disable them in the installed headers.
     Essentially the same effect can be achieved with the "no-deprecated"
     argument to Configure, except that this will always restrict
     the build to just the latest API, rather than a fixed API
     version.

     As applications are ported to future revisions of the API,
     they should update their compile-time OPENSSL_API_COMPAT define
     accordingly, but in most cases should be able to continue to
     compile with later releases.

     The OPENSSL_API_COMPAT versions for 1.0.0, and 0.9.8 are
     0x10000000L and 0x00908000L, respectively.  However those
     versions did not support the OPENSSL_API_COMPAT feature, and
     so applications are not typically tested for explicit support
     of just the undeprecated features of either release.
     [Viktor Dukhovni]

  *) Add support for setting the minimum and maximum supported protocol.
     It can bet set via the SSL_set_min_proto_version() and
     SSL_set_max_proto_version(), or via the SSL_CONF's MinProtocol and
     MaxProtcol.  It's recommended to use the new APIs to disable
     protocols instead of disabling individual protocols using
     SSL_set_options() or SSL_CONF's Protocol.  This change also
     removes support for disabling TLS 1.2 in the OpenSSL TLS
     client at compile time by defining OPENSSL_NO_TLS1_2_CLIENT.
     [Kurt Roeckx]

  *) Support for ChaCha20 and Poly1305 added to libcrypto and libssl.
     [Andy Polyakov]

  *) New EC_KEY_METHOD, this replaces the older ECDSA_METHOD and ECDH_METHOD
     and integrates ECDSA and ECDH functionality into EC. Implementations can
     now redirect key generation and no longer need to convert to or from
     ECDSA_SIG format.

     Note: the ecdsa.h and ecdh.h headers are now no longer needed and just
     include the ec.h header file instead.
     [Steve Henson]

  *) Remove support for all 40 and 56 bit ciphers.  This includes all the export
     ciphers who are no longer supported and drops support the ephemeral RSA key
     exchange. The LOW ciphers currently doesn't have any ciphers in it.
     [Kurt Roeckx]

  *) Made EVP_MD_CTX, EVP_MD, EVP_CIPHER_CTX, EVP_CIPHER and HMAC_CTX
     opaque.  For HMAC_CTX, the following constructors and destructors
     were added:

        HMAC_CTX *HMAC_CTX_new(void);
        void HMAC_CTX_free(HMAC_CTX *ctx);

     For EVP_MD and EVP_CIPHER, complete APIs to create, fill and
     destroy such methods has been added.  See EVP_MD_meth_new(3) and
     EVP_CIPHER_meth_new(3) for documentation.

     Additional changes:
     1) EVP_MD_CTX_cleanup(), EVP_CIPHER_CTX_cleanup() and
        HMAC_CTX_cleanup() were removed.  HMAC_CTX_reset() and
        EVP_MD_CTX_reset() should be called instead to reinitialise
        an already created structure.
     2) For consistency with the majority of our object creators and
        destructors, EVP_MD_CTX_(create|destroy) were renamed to
        EVP_MD_CTX_(new|free).  The old names are retained as macros
        for deprecated builds.
     [Richard Levitte]

  *) Added ASYNC support. Libcrypto now includes the async sub-library to enable
     cryptographic operations to be performed asynchronously as long as an
     asynchronous capable engine is used. See the ASYNC_start_job() man page for
     further details. Libssl has also had this capability integrated with the
     introduction of the new mode SSL_MODE_ASYNC and associated error
     SSL_ERROR_WANT_ASYNC. See the SSL_CTX_set_mode() and SSL_get_error() man
     pages. This work was developed in partnership with Intel Corp.
     [Matt Caswell]

  *) SSL_{CTX_}set_ecdh_auto() has been removed and ECDH is support is
     always enabled now.  If you want to disable the support you should
     exclude it using the list of supported ciphers. This also means that the
     "-no_ecdhe" option has been removed from s_server.
     [Kurt Roeckx]

  *) SSL_{CTX}_set_tmp_ecdh() which can set 1 EC curve now internally calls
     SSL_{CTX_}set1_curves() which can set a list.
     [Kurt Roeckx]

  *) Remove support for SSL_{CTX_}set_tmp_ecdh_callback().  You should set the
     curve you want to support using SSL_{CTX_}set1_curves().
     [Kurt Roeckx]

  *) State machine rewrite. The state machine code has been significantly
     refactored in order to remove much duplication of code and solve issues
     with the old code (see ssl/statem/README for further details). This change
     does have some associated API changes. Notably the SSL_state() function
     has been removed and replaced by SSL_get_state which now returns an
     "OSSL_HANDSHAKE_STATE" instead of an int. SSL_set_state() has been removed
     altogether. The previous handshake states defined in ssl.h and ssl3.h have
     also been removed.
     [Matt Caswell]

  *) All instances of the string "ssleay" in the public API were replaced
     with OpenSSL (case-matching; e.g., OPENSSL_VERSION for #define's)
     Some error codes related to internal RSA_eay API's were renamed.
     [Rich Salz]

  *) The demo files in crypto/threads were moved to demo/threads.
     [Rich Salz]

  *) Removed obsolete engines: 4758cca, aep, atalla, cswift, nuron, gmp,
     sureware and ubsec.
     [Matt Caswell, Rich Salz]

  *) New ASN.1 embed macro.

     New ASN.1 macro ASN1_EMBED. This is the same as ASN1_SIMPLE except the
     structure is not allocated: it is part of the parent. That is instead of

     FOO *x;

     it must be:

     FOO x;

     This reduces memory fragmentation and make it impossible to accidentally
     set a mandatory field to NULL.

     This currently only works for some fields specifically a SEQUENCE, CHOICE,
     or ASN1_STRING type which is part of a parent SEQUENCE. Since it is
     equivalent to ASN1_SIMPLE it cannot be tagged, OPTIONAL, SET OF or
     SEQUENCE OF.
     [Steve Henson]

  *) Remove EVP_CHECK_DES_KEY, a compile-time option that never compiled.
     [Emilia Käsper]

  *) Removed DES and RC4 ciphersuites from DEFAULT. Also removed RC2 although
     in 1.0.2 EXPORT was already removed and the only RC2 ciphersuite is also
     an EXPORT one. COMPLEMENTOFDEFAULT has been updated accordingly to add
     DES and RC4 ciphersuites.
     [Matt Caswell]

  *) Rewrite EVP_DecodeUpdate (base64 decoding) to fix several bugs.
     This changes the decoding behaviour for some invalid messages,
     though the change is mostly in the more lenient direction, and
     legacy behaviour is preserved as much as possible.
     [Emilia Käsper]

  *) Fix no-stdio build.
    [ David Woodhouse <David.Woodhouse@intel.com> and also
      Ivan Nestlerode <ivan.nestlerode@sonos.com> ]

  *) New testing framework
     The testing framework has been largely rewritten and is now using
     perl and the perl modules Test::Harness and an extended variant of
     Test::More called OpenSSL::Test to do its work.  All test scripts in
     test/ have been rewritten into test recipes, and all direct calls to
     executables in test/Makefile have become individual recipes using the
     simplified testing OpenSSL::Test::Simple.

     For documentation on our testing modules, do:

        perldoc test/testlib/OpenSSL/Test/Simple.pm
        perldoc test/testlib/OpenSSL/Test.pm

     [Richard Levitte]

  *) Revamped memory debug; only -DCRYPTO_MDEBUG and -DCRYPTO_MDEBUG_ABORT
     are used; the latter aborts on memory leaks (usually checked on exit).
     Some undocumented "set malloc, etc., hooks" functions were removed
     and others were changed.  All are now documented.
     [Rich Salz]

  *) In DSA_generate_parameters_ex, if the provided seed is too short,
     return an error
     [Rich Salz and Ismo Puustinen <ismo.puustinen@intel.com>]

  *) Rewrite PSK to support ECDHE_PSK, DHE_PSK and RSA_PSK. Add ciphersuites
     from RFC4279, RFC4785, RFC5487, RFC5489.

     Thanks to Christian J. Dietrich and Giuseppe D'Angelo for the
     original RSA_PSK patch.
     [Steve Henson]

  *) Dropped support for the SSL3_FLAGS_DELAY_CLIENT_FINISHED flag. This SSLeay
     era flag was never set throughout the codebase (only read). Also removed
     SSL3_FLAGS_POP_BUFFER which was only used if
     SSL3_FLAGS_DELAY_CLIENT_FINISHED was also set.
     [Matt Caswell]

  *) Changed the default name options in the "ca", "crl", "req" and "x509"
     to be "oneline" instead of "compat".
     [Richard Levitte]

  *) Remove SSL_OP_TLS_BLOCK_PADDING_BUG. This is SSLeay legacy, we're
     not aware of clients that still exhibit this bug, and the workaround
     hasn't been working properly for a while.
     [Emilia Käsper]

  *) The return type of BIO_number_read() and BIO_number_written() as well as
     the corresponding num_read and num_write members in the BIO structure has
     changed from unsigned long to uint64_t. On platforms where an unsigned
     long is 32 bits (e.g. Windows) these counters could overflow if >4Gb is
     transferred.
     [Matt Caswell]

  *) Given the pervasive nature of TLS extensions it is inadvisable to run
     OpenSSL without support for them. It also means that maintaining
     the OPENSSL_NO_TLSEXT option within the code is very invasive (and probably
     not well tested). Therefore the OPENSSL_NO_TLSEXT option has been removed.
     [Matt Caswell]

  *) Removed support for the two export grade static DH ciphersuites
     EXP-DH-RSA-DES-CBC-SHA and EXP-DH-DSS-DES-CBC-SHA. These two ciphersuites
     were newly added (along with a number of other static DH ciphersuites) to
     1.0.2. However the two export ones have *never* worked since they were
     introduced. It seems strange in any case to be adding new export
     ciphersuites, and given "logjam" it also does not seem correct to fix them.
     [Matt Caswell]

  *) Version negotiation has been rewritten. In particular SSLv23_method(),
     SSLv23_client_method() and SSLv23_server_method() have been deprecated,
     and turned into macros which simply call the new preferred function names
     TLS_method(), TLS_client_method() and TLS_server_method(). All new code
     should use the new names instead. Also as part of this change the ssl23.h
     header file has been removed.
     [Matt Caswell]

  *) Support for Kerberos ciphersuites in TLS (RFC2712) has been removed. This
     code and the associated standard is no longer considered fit-for-purpose.
     [Matt Caswell]

  *) RT2547 was closed.  When generating a private key, try to make the
     output file readable only by the owner.  This behavior change might
     be noticeable when interacting with other software.

  *) Documented all exdata functions.  Added CRYPTO_free_ex_index.
     Added a test.
     [Rich Salz]

  *) Added HTTP GET support to the ocsp command.
     [Rich Salz]

  *) Changed default digest for the dgst and enc commands from MD5 to
     sha256
     [Rich Salz]

  *) RAND_pseudo_bytes has been deprecated. Users should use RAND_bytes instead.
     [Matt Caswell]

  *) Added support for TLS extended master secret from
     draft-ietf-tls-session-hash-03.txt. Thanks for Alfredo Pironti for an
     initial patch which was a great help during development.
     [Steve Henson]

  *) All libssl internal structures have been removed from the public header
     files, and the OPENSSL_NO_SSL_INTERN option has been removed (since it is
     now redundant). Users should not attempt to access internal structures
     directly. Instead they should use the provided API functions.
     [Matt Caswell]

  *) config has been changed so that by default OPENSSL_NO_DEPRECATED is used.
     Access to deprecated functions can be re-enabled by running config with
     "enable-deprecated". In addition applications wishing to use deprecated
     functions must define OPENSSL_USE_DEPRECATED. Note that this new behaviour
     will, by default, disable some transitive includes that previously existed
     in the header files (e.g. ec.h will no longer, by default, include bn.h)
     [Matt Caswell]

  *) Added support for OCB mode. OpenSSL has been granted a patent license
     compatible with the OpenSSL license for use of OCB. Details are available
     at https://www.openssl.org/source/OCB-patent-grant-OpenSSL.pdf. Support
     for OCB can be removed by calling config with no-ocb.
     [Matt Caswell]

  *) SSLv2 support has been removed.  It still supports receiving a SSLv2
     compatible client hello.
     [Kurt Roeckx]

  *) Increased the minimal RSA keysize from 256 to 512 bits [Rich Salz],
     done while fixing the error code for the key-too-small case.
     [Annie Yousar <a.yousar@informatik.hu-berlin.de>]

  *) CA.sh has been removed; use CA.pl instead.
     [Rich Salz]

  *) Removed old DES API.
     [Rich Salz]

  *) Remove various unsupported platforms:
        Sony NEWS4
        BEOS and BEOS_R5
        NeXT
        SUNOS
        MPE/iX
        Sinix/ReliantUNIX RM400
        DGUX
        NCR
        Tandem
        Cray
        16-bit platforms such as WIN16
     [Rich Salz]

  *) Clean up OPENSSL_NO_xxx #define's
        Use setbuf() and remove OPENSSL_NO_SETVBUF_IONBF
        Rename OPENSSL_SYSNAME_xxx to OPENSSL_SYS_xxx
        OPENSSL_NO_EC{DH,DSA} merged into OPENSSL_NO_EC
        OPENSSL_NO_RIPEMD160, OPENSSL_NO_RIPEMD merged into OPENSSL_NO_RMD160
        OPENSSL_NO_FP_API merged into OPENSSL_NO_STDIO
        Remove OPENSSL_NO_BIO OPENSSL_NO_BUFFER OPENSSL_NO_CHAIN_VERIFY
        OPENSSL_NO_EVP OPENSSL_NO_FIPS_ERR OPENSSL_NO_HASH_COMP
        OPENSSL_NO_LHASH OPENSSL_NO_OBJECT OPENSSL_NO_SPEED OPENSSL_NO_STACK
        OPENSSL_NO_X509 OPENSSL_NO_X509_VERIFY
        Remove MS_STATIC; it's a relic from platforms <32 bits.
     [Rich Salz]

  *) Cleaned up dead code
        Remove all but one '#ifdef undef' which is to be looked at.
     [Rich Salz]

  *) Clean up calling of xxx_free routines.
        Just like free(), fix most of the xxx_free routines to accept
        NULL.  Remove the non-null checks from callers.  Save much code.
     [Rich Salz]

  *) Add secure heap for storage of private keys (when possible).
     Add BIO_s_secmem(), CBIGNUM, etc.
     Contributed by Akamai Technologies under our Corporate CLA.
     [Rich Salz]

  *) Experimental support for a new, fast, unbiased prime candidate generator,
     bn_probable_prime_dh_coprime(). Not currently used by any prime generator.
     [Felix Laurie von Massenbach <felix@erbridge.co.uk>]

  *) New output format NSS in the sess_id command line tool. This allows
     exporting the session id and the master key in NSS keylog format.
     [Martin Kaiser <martin@kaiser.cx>]

  *) Harmonize version and its documentation. -f flag is used to display
     compilation flags.
     [mancha <mancha1@zoho.com>]

  *) Fix eckey_priv_encode so it immediately returns an error upon a failure
     in i2d_ECPrivateKey.  Thanks to Ted Unangst for feedback on this issue.
     [mancha <mancha1@zoho.com>]

  *) Fix some double frees. These are not thought to be exploitable.
     [mancha <mancha1@zoho.com>]

  *) A missing bounds check in the handling of the TLS heartbeat extension
     can be used to reveal up to 64k of memory to a connected client or
     server.

     Thanks for Neel Mehta of Google Security for discovering this bug and to
     Adam Langley <agl@chromium.org> and Bodo Moeller <bmoeller@acm.org> for
     preparing the fix (CVE-2014-0160)
     [Adam Langley, Bodo Moeller]

  *) Fix for the attack described in the paper "Recovering OpenSSL
     ECDSA Nonces Using the FLUSH+RELOAD Cache Side-channel Attack"
     by Yuval Yarom and Naomi Benger. Details can be obtained from:
     http://eprint.iacr.org/2014/140

     Thanks to Yuval Yarom and Naomi Benger for discovering this
     flaw and to Yuval Yarom for supplying a fix (CVE-2014-0076)
     [Yuval Yarom and Naomi Benger]

  *) Use algorithm specific chains in SSL_CTX_use_certificate_chain_file():
     this fixes a limitation in previous versions of OpenSSL.
     [Steve Henson]

  *) Experimental encrypt-then-mac support.

     Experimental support for encrypt then mac from
     draft-gutmann-tls-encrypt-then-mac-02.txt

     To enable it set the appropriate extension number (0x42 for the test
     server) using e.g. -DTLSEXT_TYPE_encrypt_then_mac=0x42

     For non-compliant peers (i.e. just about everything) this should have no
     effect.

     WARNING: EXPERIMENTAL, SUBJECT TO CHANGE.

     [Steve Henson]

  *) Add EVP support for key wrapping algorithms, to avoid problems with
     existing code the flag EVP_CIPHER_CTX_WRAP_ALLOW has to be set in
     the EVP_CIPHER_CTX or an error is returned. Add AES and DES3 wrap
     algorithms and include tests cases.
     [Steve Henson]

  *) Extend CMS code to support RSA-PSS signatures and RSA-OAEP for
     enveloped data.
     [Steve Henson]

  *) Extended RSA OAEP support via EVP_PKEY API. Options to specify digest,
     MGF1 digest and OAEP label.
     [Steve Henson]

  *) Make openssl verify return errors.
     [Chris Palmer <palmer@google.com> and Ben Laurie]

  *) New function ASN1_TIME_diff to calculate the difference between two
     ASN1_TIME structures or one structure and the current time.
     [Steve Henson]

  *) Update fips_test_suite to support multiple command line options. New
     test to induce all self test errors in sequence and check expected
     failures.
     [Steve Henson]

  *) Add FIPS_{rsa,dsa,ecdsa}_{sign,verify} functions which digest and
     sign or verify all in one operation.
     [Steve Henson]

  *) Add fips_algvs: a multicall fips utility incorporating all the algorithm
     test programs and fips_test_suite. Includes functionality to parse
     the minimal script output of fipsalgest.pl directly.
     [Steve Henson]

  *) Add authorisation parameter to FIPS_module_mode_set().
     [Steve Henson]

  *) Add FIPS selftest for ECDH algorithm using P-224 and B-233 curves.
     [Steve Henson]

  *) Use separate DRBG fields for internal and external flags. New function
     FIPS_drbg_health_check() to perform on demand health checking. Add
     generation tests to fips_test_suite with reduced health check interval to
     demonstrate periodic health checking. Add "nodh" option to
     fips_test_suite to skip very slow DH test.
     [Steve Henson]

  *) New function FIPS_get_cipherbynid() to lookup FIPS supported ciphers
     based on NID.
     [Steve Henson]

  *) More extensive health check for DRBG checking many more failure modes.
     New function FIPS_selftest_drbg_all() to handle every possible DRBG
     combination: call this in fips_test_suite.
     [Steve Henson]

  *) Add support for canonical generation of DSA parameter 'g'. See
     FIPS 186-3 A.2.3.

  *) Add support for HMAC DRBG from SP800-90. Update DRBG algorithm test and
     POST to handle HMAC cases.
     [Steve Henson]

  *) Add functions FIPS_module_version() and FIPS_module_version_text()
     to return numerical and string versions of the FIPS module number.
     [Steve Henson]

  *) Rename FIPS_mode_set and FIPS_mode to FIPS_module_mode_set and
     FIPS_module_mode. FIPS_mode and FIPS_mode_set will be implemented
     outside the validated module in the FIPS capable OpenSSL.
     [Steve Henson]

  *) Minor change to DRBG entropy callback semantics. In some cases
     there is no multiple of the block length between min_len and
     max_len. Allow the callback to return more than max_len bytes
     of entropy but discard any extra: it is the callback's responsibility
     to ensure that the extra data discarded does not impact the
     requested amount of entropy.
     [Steve Henson]

  *) Add PRNG security strength checks to RSA, DSA and ECDSA using
     information in FIPS186-3, SP800-57 and SP800-131A.
     [Steve Henson]

  *) CCM support via EVP. Interface is very similar to GCM case except we
     must supply all data in one chunk (i.e. no update, final) and the
     message length must be supplied if AAD is used. Add algorithm test
     support.
     [Steve Henson]

  *) Initial version of POST overhaul. Add POST callback to allow the status
     of POST to be monitored and/or failures induced. Modify fips_test_suite
     to use callback. Always run all selftests even if one fails.
     [Steve Henson]

  *) XTS support including algorithm test driver in the fips_gcmtest program.
     Note: this does increase the maximum key length from 32 to 64 bytes but
     there should be no binary compatibility issues as existing applications
     will never use XTS mode.
     [Steve Henson]

  *) Extensive reorganisation of FIPS PRNG behaviour. Remove all dependencies
     to OpenSSL RAND code and replace with a tiny FIPS RAND API which also
     performs algorithm blocking for unapproved PRNG types. Also do not
     set PRNG type in FIPS_mode_set(): leave this to the application.
     Add default OpenSSL DRBG handling: sets up FIPS PRNG and seeds with
     the standard OpenSSL PRNG: set additional data to a date time vector.
     [Steve Henson]

  *) Rename old X9.31 PRNG functions of the form FIPS_rand* to FIPS_x931*.
     This shouldn't present any incompatibility problems because applications
     shouldn't be using these directly and any that are will need to rethink
     anyway as the X9.31 PRNG is now deprecated by FIPS 140-2
     [Steve Henson]

  *) Extensive self tests and health checking required by SP800-90 DRBG.
     Remove strength parameter from FIPS_drbg_instantiate and always
     instantiate at maximum supported strength.
     [Steve Henson]

  *) Add ECDH code to fips module and fips_ecdhvs for primitives only testing.
     [Steve Henson]

  *) New algorithm test program fips_dhvs to handle DH primitives only testing.
     [Steve Henson]

  *) New function DH_compute_key_padded() to compute a DH key and pad with
     leading zeroes if needed: this complies with SP800-56A et al.
     [Steve Henson]

  *) Initial implementation of SP800-90 DRBGs for Hash and CTR. Not used by
     anything, incomplete, subject to change and largely untested at present.
     [Steve Henson]

  *) Modify fipscanisteronly build option to only build the necessary object
     files by filtering FIPS_EX_OBJ through a perl script in crypto/Makefile.
     [Steve Henson]

  *) Add experimental option FIPSSYMS to give all symbols in
     fipscanister.o and FIPS or fips prefix. This will avoid
     conflicts with future versions of OpenSSL. Add perl script
     util/fipsas.pl to preprocess assembly language source files
     and rename any affected symbols.
     [Steve Henson]

  *) Add selftest checks and algorithm block of non-fips algorithms in
     FIPS mode. Remove DES2 from selftests.
     [Steve Henson]

  *) Add ECDSA code to fips module. Add tiny fips_ecdsa_check to just
     return internal method without any ENGINE dependencies. Add new
     tiny fips sign and verify functions.
     [Steve Henson]

  *) New build option no-ec2m to disable characteristic 2 code.
     [Steve Henson]

  *) New build option "fipscanisteronly". This only builds fipscanister.o
     and (currently) associated fips utilities. Uses the file Makefile.fips
     instead of Makefile.org as the prototype.
     [Steve Henson]

  *) Add some FIPS mode restrictions to GCM. Add internal IV generator.
     Update fips_gcmtest to use IV generator.
     [Steve Henson]

  *) Initial, experimental EVP support for AES-GCM. AAD can be input by
     setting output buffer to NULL. The *Final function must be
     called although it will not retrieve any additional data. The tag
     can be set or retrieved with a ctrl. The IV length is by default 12
     bytes (96 bits) but can be set to an alternative value. If the IV
     length exceeds the maximum IV length (currently 16 bytes) it cannot be
     set before the key.
     [Steve Henson]

  *) New flag in ciphers: EVP_CIPH_FLAG_CUSTOM_CIPHER. This means the
     underlying do_cipher function handles all cipher semantics itself
     including padding and finalisation. This is useful if (for example)
     an ENGINE cipher handles block padding itself. The behaviour of
     do_cipher is subtly changed if this flag is set: the return value
     is the number of characters written to the output buffer (zero is
     no longer an error code) or a negative error code. Also if the
     input buffer is NULL and length 0 finalisation should be performed.
     [Steve Henson]

  *) If a candidate issuer certificate is already part of the constructed
     path ignore it: new debug notification X509_V_ERR_PATH_LOOP for this case.
     [Steve Henson]

  *) Improve forward-security support: add functions

       void SSL_CTX_set_not_resumable_session_callback(SSL_CTX *ctx, int (*cb)(SSL *ssl, int is_forward_secure))
       void SSL_set_not_resumable_session_callback(SSL *ssl, int (*cb)(SSL *ssl, int is_forward_secure))

     for use by SSL/TLS servers; the callback function will be called whenever a
     new session is created, and gets to decide whether the session may be
     cached to make it resumable (return 0) or not (return 1).  (As by the
     SSL/TLS protocol specifications, the session_id sent by the server will be
     empty to indicate that the session is not resumable; also, the server will
     not generate RFC 4507 (RFC 5077) session tickets.)

     A simple reasonable callback implementation is to return is_forward_secure.
     This parameter will be set to 1 or 0 depending on the ciphersuite selected
     by the SSL/TLS server library, indicating whether it can provide forward
     security.
     [Emilia Käsper <emilia.kasper@esat.kuleuven.be> (Google)]

  *) New -verify_name option in command line utilities to set verification
     parameters by name.
     [Steve Henson]

  *) Initial CMAC implementation. WARNING: EXPERIMENTAL, API MAY CHANGE.
     Add CMAC pkey methods.
     [Steve Henson]

  *) Experimental renegotiation in s_server -www mode. If the client
     browses /reneg connection is renegotiated. If /renegcert it is
     renegotiated requesting a certificate.
     [Steve Henson]

  *) Add an "external" session cache for debugging purposes to s_server. This
     should help trace issues which normally are only apparent in deployed
     multi-process servers.
     [Steve Henson]

  *) Extensive audit of libcrypto with DEBUG_UNUSED. Fix many cases where
     return value is ignored. NB. The functions RAND_add(), RAND_seed(),
     BIO_set_cipher() and some obscure PEM functions were changed so they
     can now return an error. The RAND changes required a change to the
     RAND_METHOD structure.
     [Steve Henson]

  *) New macro __owur for "OpenSSL Warn Unused Result". This makes use of
     a gcc attribute to warn if the result of a function is ignored. This
     is enable if DEBUG_UNUSED is set. Add to several functions in evp.h
     whose return value is often ignored.
     [Steve Henson]

  *) New -noct, -requestct, -requirect and -ctlogfile options for s_client.
     These allow SCTs (signed certificate timestamps) to be requested and
     validated when establishing a connection.
     [Rob Percival <robpercival@google.com>]
2018-02-08 20:56:44 +00:00
jakllsch 1a36d4f74e Add ASN1_STRING_get0_data() glue for OPENSSL_API_COMPAT >= 0x10100000L 2018-02-08 20:18:03 +00:00
christos ef13887e8f add set0_key needed by racoon 2018-02-07 13:16:25 +00:00
christos 5ff0fb825b Welcome to the 21st century Buck Rogers: OpenSSL-1.1 2018-02-07 03:59:03 +00:00
christos e7129348cf use OPENSSL_API_COMPAT 2018-02-06 20:10:05 +00:00
christos c7748118b4 use OPENSSL_API_COMPAT instead of hacking the version 2018-02-06 19:58:29 +00:00
christos b9a7f31f0e added 1.1 api 2018-02-06 19:51:25 +00:00
maya acc548e0b3 style: remove spurious {} added in 1.12 2018-02-06 10:56:35 +00:00
christos 7effb09732 adjust for openssl 1.1 2018-02-06 04:21:24 +00:00
christos c9d078dc6b centralize the conversion functions and make this work with both
openssl-1.0 and 1.1
2018-02-05 23:56:01 +00:00
maya 2272657d65 Match new openssl HMAC_CTX_new better and zero out all the fields. 2018-02-05 21:12:14 +00:00
christos bb64310352 add DSA_bits() 2018-02-05 20:27:06 +00:00
christos 600234d2b4 fix inline 2018-02-05 20:23:47 +00:00
christos 651d2a0c85 more openssl-1.1 compat. 2018-02-05 16:12:52 +00:00
christos 934378087f add more functions that heimdal uses. 2018-02-05 16:09:09 +00:00
christos 6680b65dc2 port to openssl-1.1 2018-02-05 16:00:52 +00:00
christos 6fec6006f2 pretend we have openssl-1.1 2018-02-05 11:57:28 +00:00
christos 00a8c5d883 #if not #ifdef 2018-02-05 11:55:46 +00:00
christos a888e01c4e protect the inline functions with the OPENSSL_VERSION_NUMBER 2018-02-05 11:52:32 +00:00
christos 5097134740 provide compatibility for libradius 2018-02-05 00:42:46 +00:00
christos b400d00712 patch for OpenSSL-1.1 2018-02-05 00:13:50 +00:00
christos 9ed083bc65 add enough of the 1.1 API to compile openssh 2018-02-05 00:11:33 +00:00
christos dba98a8a16 Fix typo (thanks Martin) 2018-02-04 16:22:48 +00:00
christos 0c048d5af5 switch everyone to openssl.old 2018-02-04 03:19:51 +00:00
christos c9496f6b60 Import the HEAD of OpenSSL 1.0 to prepare for importing 1.1 2018-02-03 22:43:37 +00:00
shm bfb29ad1d2 Fixed memory leak (CID: 977744) 2018-01-30 15:28:39 +00:00
shm 442208c9a6 Fixed potential NULL pointer dereference (CID: 978477) 2018-01-30 13:11:28 +00:00
maya ad64aeb5f5 Move spammy debug message to debug2.
Similarly spammy messages exist in this debug level.

Requested by gson in PR bin/52898:
ssh -v prints debug message on every keystroke
2018-01-15 05:04:58 +00:00
knakahara cbf21dcddc fix typo. (does not affect actual operation, but confuses reader...)
The function is called when racoon receives SADB_X_MIGRATE pfkey message,
however the message is not used now. It was compatible code for KAME.
2017-11-09 08:34:50 +00:00
snj dd44830ed1 no more ssh1 code in openssh, so no use defining WITH_SSH1 2017-11-06 10:26:13 +00:00
christos d11ce9f101 PR/52604: Tatoku Ogaito: Fix x11 session forwarding. 2017-10-09 12:07:03 +00:00
joerg 030d2353db Mark do_ca_sign as dead. 2017-10-08 20:19:05 +00:00
christos 26b9f775ff define recallocarray locally. 2017-10-07 21:14:59 +00:00
christos 7a183406d0 merge conflicts. 2017-10-07 19:39:19 +00:00
christos 9340b371cb Potentially-incompatible changes
================================

This release includes a number of changes that may affect existing
configurations:

 * ssh(1): delete SSH protocol version 1 support, associated
   configuration options and documentation.

 * ssh(1)/sshd(8): remove support for the hmac-ripemd160 MAC.

 * ssh(1)/sshd(8): remove support for the arcfour, blowfish and CAST
   ciphers.

 * Refuse RSA keys <1024 bits in length and improve reporting for keys
   that do not meet this requirement.

 * ssh(1): do not offer CBC ciphers by default.

Changes since OpenSSH 7.5
=========================

This is primarily a bugfix release. It also contains substantial
internal refactoring.

Security
--------

 * sftp-server(8): in read-only mode, sftp-server was incorrectly
   permitting creation of zero-length files. Reported by Michal
   Zalewski.

New Features
------------

 * ssh(1): add RemoteCommand option to specify a command in the ssh
   config file instead of giving it on the client's command line. This
   allows the configuration file to specify the command that will be
   executed on the remote host.

 * sshd(8): add ExposeAuthInfo option that enables writing details of
   the authentication methods used (including public keys where
   applicable) to a file that is exposed via a $SSH_USER_AUTH
   environment variable in the subsequent session.

 * ssh(1): add support for reverse dynamic forwarding. In this mode,
   ssh will act as a SOCKS4/5 proxy and forward connections
   to destinations requested by the remote SOCKS client. This mode
   is requested using extended syntax for the -R and RemoteForward
   options and, because it is implemented solely at the client,
   does not require the server be updated to be supported.

 * sshd(8): allow LogLevel directive in sshd_config Match blocks;
   bz#2717

 * ssh-keygen(1): allow inclusion of arbitrary string or flag
   certificate extensions and critical options.

 * ssh-keygen(1): allow ssh-keygen to use a key held in ssh-agent as
   a CA when signing certificates. bz#2377

 * ssh(1)/sshd(8): allow IPQoS=none in ssh/sshd to not set an explicit
   ToS/DSCP value and just use the operating system default.

 * ssh-add(1): added -q option to make ssh-add quiet on success.

 * ssh(1): expand the StrictHostKeyChecking option with two new
   settings. The first "accept-new" will automatically accept
   hitherto-unseen keys but will refuse connections for changed or
   invalid hostkeys. This is a safer subset of the current behaviour
   of StrictHostKeyChecking=no. The second setting "off", is a synonym
   for the current behaviour of StrictHostKeyChecking=no: accept new
   host keys, and continue connection for hosts with incorrect
   hostkeys. A future release will change the meaning of
   StrictHostKeyChecking=no to the behaviour of "accept-new". bz#2400

 * ssh(1): add SyslogFacility option to ssh(1) matching the equivalent
   option in sshd(8). bz#2705

Bugfixes
--------

 * ssh(1): use HostKeyAlias if specified instead of hostname for
   matching host certificate principal names; bz#2728

 * sftp(1): implement sorting for globbed ls; bz#2649

 * ssh(1): add a user@host prefix to client's "Permission denied"
   messages, useful in particular when using "stacked" connections
   (e.g. ssh -J) where it's not clear which host is denying. bz#2720

 * ssh(1): accept unknown EXT_INFO extension values that contain \0
   characters. These are legal, but would previously cause fatal
   connection errors if received.

 * ssh(1)/sshd(8): repair compression statistics printed at
   connection exit

 * sftp(1): print '?' instead of incorrect link count (that the
   protocol doesn't provide) for remote listings. bz#2710

 * ssh(1): return failure rather than fatal() for more cases during
   session multiplexing negotiations. Causes the session to fall back
   to a non-mux connection if they occur. bz#2707

 * ssh(1): mention that the server may send debug messages to explain
   public key authentication problems under some circumstances; bz#2709

 * Translate OpenSSL error codes to better report incorrect passphrase
   errors when loading private keys; bz#2699

 * sshd(8): adjust compatibility patterns for WinSCP to correctly
   identify versions that implement only the legacy DH group exchange
   scheme. bz#2748

 * ssh(1): print the "Killed by signal 1" message only at LogLevel
   verbose so that it is not shown at the default level; prevents it
   from appearing during ssh -J and equivalent ProxyCommand configs.
   bz#1906, bz#2744

 * ssh-keygen(1): when generating all hostkeys (ssh-keygen -A), clobber
   existing keys if they exist but are zero length. zero-length keys
   could previously be made if ssh-keygen failed or was interrupted part
   way through generating them. bz#2561

 * ssh(1): fix pledge(2) violation in the escape sequence "~&" used to
   place the current session in the background.

 * ssh-keyscan(1): avoid double-close() on file descriptors; bz#2734

 * sshd(8): avoid reliance on shared use of pointers shared between
   monitor and child sshd processes. bz#2704

 * sshd_config(8): document available AuthenticationMethods; bz#2453

 * ssh(1): avoid truncation in some login prompts; bz#2768

 * sshd(8): Fix various compilations failures, inc bz#2767

 * ssh(1): make "--" before the hostname terminate argument processing
   after the hostname too.

 * ssh-keygen(1): switch from aes256-cbc to aes256-ctr for encrypting
   new-style private keys. Fixes problems related to private key
   handling for no-OpenSSL builds. bz#2754

 * ssh(1): warn and do not attempt to use keys when the public and
   private halves do not match. bz#2737

 * sftp(1): don't print verbose error message when ssh disconnects
   from under sftp. bz#2750

 * sshd(8): fix keepalive scheduling problem: activity on a forwarded
   port from preventing the keepalive from being sent; bz#2756

 * sshd(8): when started without root privileges, don't require the
   privilege separation user or path to exist. Makes running the
   regression tests easier without touching the filesystem.

 * Make integrity.sh regression tests more robust against timeouts.
   bz#2658

 * ssh(1)/sshd(8): correctness fix for channels implementation: accept
   channel IDs greater than 0x7FFFFFFF.

Portability
-----------

 * sshd(9): drop two more privileges in the Solaris sandbox:
   PRIV_DAX_ACCESS and PRIV_SYS_IB_INFO; bz#2723

 * sshd(8): expose list of completed authentication methods to PAM
   via the SSH_AUTH_INFO_0 PAM environment variable. bz#2408

 * ssh(1)/sshd(8): fix several problems in the tun/tap forwarding code,
   mostly to do with host/network byte order confusion. bz#2735

 * Add --with-cflags-after and --with-ldflags-after configure flags to
   allow setting CFLAGS/LDFLAGS after configure has completed. These
   are useful for setting sanitiser/fuzzing options that may interfere
   with configure's operation.

 * sshd(8): avoid Linux seccomp violations on ppc64le over the
   socketcall syscall.

 * Fix use of ldns when using ldns-config; bz#2697

 * configure: set cache variables when cross-compiling. The cross-
   compiling fallback message was saying it assumed the test passed,
   but it wasn't actually set the cache variables and this would
   cause later tests to fail.

 * Add clang libFuzzer harnesses for public key parsing and signature
   verification.
2017-10-07 19:36:11 +00:00
christos d93fc8b9c8 fix lint build. 2017-10-05 18:01:00 +00:00