Update chain building function.

Don't clear verification errors from the error queue unless
SSL_BUILD_CHAIN_FLAG_CLEAR_ERROR is set.

If errors occur during verification and SSL_BUILD_CHAIN_FLAG_IGNORE_ERROR
is set return 2 so applications can issue warnings.
(cherry picked from commit 2dd6976f6d02f98b30c376951ac38f780a86b3b5)
Add -no_resumption_on_reneg to SSL_CONF.
(cherry picked from commit 1f44dac24d1cb752b1a06be9091bb03a88a8598e)
Fix memory leak with client auth.
(cherry picked from commit bc5ec653ba65fedb1619c8182088497de8a97a70)
Add functions returning security bits.

Add functions to return the "bits of security" for various public key
algorithms. Based on SP800-57.
Auto DH support.

Add auto DH parameter support. This is roughly equivalent to the
ECDH auto curve selection but for DH. An application can just call

SSL_CTX_set_auto_dh(ctx, 1);

and appropriate DH parameters will be used based on the size of the
server key.

Unlike ECDH there is no way a peer can indicate the range of DH parameters
it supports. Some peers cannot handle DH keys larger that 1024 bits for
example. In this case if you call:

SSL_CTX_set_auto_dh(ctx, 2);

Only 1024 bit DH parameters will be used.

If the server key is 7680 bits or more in size then 8192 bit DH parameters
will be used: these will be *very* slow.

The old export ciphersuites aren't supported but those are very
insecure anyway.
Allow return of supported ciphers.

New function ssl_cipher_disabled.

Check for disabled client ciphers using ssl_cipher_disabled.

New function to return only supported ciphers.

New option to ciphers utility to print only supported ciphers.
Check return value of ssl3_output_cert_chain
Security framework.

Security callback: selects which parameters are permitted including
sensible defaults based on bits of security.

The "parameters" which can be selected include: ciphersuites,
curves, key sizes, certificate signature algorithms, supported
signature algorithms, DH parameters, SSL/TLS version, session tickets
and compression.

In some cases prohibiting the use of a parameters will mean they are
not advertised to the peer: for example cipher suites and ECC curves.
In other cases it will abort the handshake: e.g DH parameters or the
peer key size.

Documentation to follow...
Security callback debug print out.

Add a debugging security callback option to s_client/s_server. This will
print out each security parameter as it is accepted or rejected.
Set security level to zero is ssltest

Since ssltest needs to test low security ciphersuites and keys
set security level to zero so they aren't rejected.
Set security level in cipher string.

Allow setting of security level in cipher string using the
@SECLEVEL=N syntax.
Add initial security framework docs.
Fix warning.
Don't try and verify signatures if key is NULL (CVE-2013-0166)
Add additional check to catch this in ASN1_item_verify too.
(cherry picked from commit 66e8211c0b1347970096e04b18aa52567c325200)
Fix base64 decoding bug.

A short PEM encoded sequence if passed to the BIO, and the file
had 2 \n following would fail.

PR#3289
Add option to generate old hash format.

New -hash_old to generate CRL hashes using old
(before OpenSSL 1.0.0) algorithm.
Document new crl option.
Use correct length when prompting for password.

Use bufsiz - 1 not BUFSIZ - 1 when prompting for a password in
the openssl utility.

Thanks to Rob Mackinnon, Leviathan Security for reporting this issue.
Update FAQ.
Update security framework docs.