Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/OPENSSL]: src/crypto/external/bsd/openssl/dist Import 1.1.1c:



details:   https://anonhg.NetBSD.org/src/rev/29645b1e84d1
branches:  OPENSSL
changeset: 451874:29645b1e84d1
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Jun 09 17:47:39 2019 +0000

description:
Import 1.1.1c:

 Changes between 1.1.1b and 1.1.1c [28 May 2019]

  *) Add build tests for C++.  These are generated files that only do one
     thing, to include one public OpenSSL head file each.  This tests that
     the public header files can be usefully included in a C++ application.

     This test isn't enabled by default.  It can be enabled with the option
     'enable-buildtest-c++'.
     [Richard Levitte]

  *) Enable SHA3 pre-hashing for ECDSA and DSA.
     [Patrick Steuer]

  *) Change the default RSA, DSA and DH size to 2048 bit instead of 1024.
     This changes the size when using the genpkey app when no size is given. It
     fixes an omission in earlier changes that changed all RSA, DSA and DH
     generation apps to use 2048 bits by default.
     [Kurt Roeckx]

  *) Reorganize the manual pages to consistently have RETURN VALUES,
     EXAMPLES, SEE ALSO and HISTORY come in that order, and adjust
     util/fix-doc-nits accordingly.
     [Paul Yang, Joshua Lock]

  *) Add the missing accessor EVP_PKEY_get0_engine()
     [Matt Caswell]

  *) Have apps like 's_client' and 's_server' output the signature scheme
     along with other cipher suite parameters when debugging.
     [Lorinczy Zsigmond]

  *) Make OPENSSL_config() error agnostic again.
     [Richard Levitte]

  *) Do the error handling in RSA decryption constant time.
     [Bernd Edlinger]

  *) Prevent over long nonces in ChaCha20-Poly1305.

     ChaCha20-Poly1305 is an AEAD cipher, and requires a unique nonce input
     for every encryption operation. RFC 7539 specifies that the nonce value
     (IV) should be 96 bits (12 bytes). OpenSSL allows a variable nonce length
     and front pads the nonce with 0 bytes if it is less than 12
     bytes. However it also incorrectly allows a nonce to be set of up to 16
     bytes. In this case only the last 12 bytes are significant and any
     additional leading bytes are ignored.

     It is a requirement of using this cipher that nonce values are
     unique. Messages encrypted using a reused nonce value are susceptible to
     serious confidentiality and integrity attacks. If an application changes
     the default nonce length to be longer than 12 bytes and then makes a
     change to the leading bytes of the nonce expecting the new value to be a
     new unique nonce then such an application could inadvertently encrypt
     messages with a reused nonce.

     Additionally the ignored bytes in a long nonce are not covered by the
     integrity guarantee of this cipher. Any application that relies on the
     integrity of these ignored leading bytes of a long nonce may be further
     affected. Any OpenSSL internal use of this cipher, including in SSL/TLS,
     is safe because no such use sets such a long nonce value. However user
     applications that use this cipher directly and set a non-default nonce
     length to be longer than 12 bytes may be vulnerable.

     This issue was reported to OpenSSL on 16th of March 2019 by Joran Dirk
     Greef of Ronomon.
     (CVE-2019-1543)
     [Matt Caswell]

  *) Ensure that SM2 only uses SM3 as digest algorithm
     [Paul Yang]

diffstat:

 crypto/external/bsd/openssl/dist/CHANGES                                       |     71 +
 crypto/external/bsd/openssl/dist/Configurations/unix-Makefile.tmpl             |      8 +-
 crypto/external/bsd/openssl/dist/Configurations/windows-makefile.tmpl          |      3 +-
 crypto/external/bsd/openssl/dist/Configure                                     |   1461 +-
 crypto/external/bsd/openssl/dist/INSTALL                                       |     21 +-
 crypto/external/bsd/openssl/dist/NEWS                                          |      4 +
 crypto/external/bsd/openssl/dist/NOTES.PERL                                    |      2 +-
 crypto/external/bsd/openssl/dist/README                                        |      4 +-
 crypto/external/bsd/openssl/dist/apps/asn1pars.c                               |     14 +-
 crypto/external/bsd/openssl/dist/apps/cms.c                                    |      3 +-
 crypto/external/bsd/openssl/dist/apps/enc.c                                    |      4 +-
 crypto/external/bsd/openssl/dist/apps/ocsp.c                                   |     11 +-
 crypto/external/bsd/openssl/dist/apps/s_cb.c                                   |    108 +-
 crypto/external/bsd/openssl/dist/apps/s_client.c                               |      2 +-
 crypto/external/bsd/openssl/dist/apps/speed.c                                  |     83 +-
 crypto/external/bsd/openssl/dist/crypto/aes/asm/aesp8-ppc.pl                   |      6 +-
 crypto/external/bsd/openssl/dist/crypto/bio/b_addr.c                           |      6 +
 crypto/external/bsd/openssl/dist/crypto/bio/bss_mem.c                          |     41 +-
 crypto/external/bsd/openssl/dist/crypto/blake2/blake2b.c                       |     10 +-
 crypto/external/bsd/openssl/dist/crypto/bn/asm/mips.pl                         |      4 +-
 crypto/external/bsd/openssl/dist/crypto/bn/asm/ppc.pl                          |      3 +-
 crypto/external/bsd/openssl/dist/crypto/bn/bn_ctx.c                            |      2 +
 crypto/external/bsd/openssl/dist/crypto/bn/bn_lib.c                            |      2 +
 crypto/external/bsd/openssl/dist/crypto/bn/bn_prime.c                          |      5 +-
 crypto/external/bsd/openssl/dist/crypto/chacha/build.info                      |      2 +
 crypto/external/bsd/openssl/dist/crypto/conf/conf_sap.c                        |      1 +
 crypto/external/bsd/openssl/dist/crypto/dh/dh_check.c                          |     28 +-
 crypto/external/bsd/openssl/dist/crypto/dh/dh_gen.c                            |      8 +-
 crypto/external/bsd/openssl/dist/crypto/dh/dh_key.c                            |      8 +-
 crypto/external/bsd/openssl/dist/crypto/dh/dh_pmeth.c                          |      4 +-
 crypto/external/bsd/openssl/dist/crypto/dsa/dsa_gen.c                          |      8 +-
 crypto/external/bsd/openssl/dist/crypto/dsa/dsa_ossl.c                         |      8 +-
 crypto/external/bsd/openssl/dist/crypto/dsa/dsa_pmeth.c                        |     16 +-
 crypto/external/bsd/openssl/dist/crypto/dso/dso_openssl.c                      |      4 +-
 crypto/external/bsd/openssl/dist/crypto/dso/dso_win32.c                        |    110 +-
 crypto/external/bsd/openssl/dist/crypto/ec/curve25519.c                        |      3 +-
 crypto/external/bsd/openssl/dist/crypto/ec/curve448/curve448.c                 |      6 +-
 crypto/external/bsd/openssl/dist/crypto/ec/curve448/curve448_tables.c          |   1682 +-
 crypto/external/bsd/openssl/dist/crypto/ec/curve448/curve448utils.h            |      6 +-
 crypto/external/bsd/openssl/dist/crypto/ec/curve448/f_generic.c                |      8 +-
 crypto/external/bsd/openssl/dist/crypto/ec/curve448/scalar.c                   |     20 +-
 crypto/external/bsd/openssl/dist/crypto/ec/ec2_oct.c                           |     11 +-
 crypto/external/bsd/openssl/dist/crypto/ec/ec2_smpl.c                          |      3 +-
 crypto/external/bsd/openssl/dist/crypto/ec/ec_ameth.c                          |      9 +-
 crypto/external/bsd/openssl/dist/crypto/ec/ec_lib.c                            |      5 +-
 crypto/external/bsd/openssl/dist/crypto/ec/ec_mult.c                           |     11 +-
 crypto/external/bsd/openssl/dist/crypto/ec/ec_pmeth.c                          |      8 +-
 crypto/external/bsd/openssl/dist/crypto/ec/ecdh_ossl.c                         |      7 +-
 crypto/external/bsd/openssl/dist/crypto/ec/ecp_nistp521.c                      |     11 +-
 crypto/external/bsd/openssl/dist/crypto/ec/ecp_nistz256.c                      |      3 +-
 crypto/external/bsd/openssl/dist/crypto/ec/ecp_smpl.c                          |      6 +-
 crypto/external/bsd/openssl/dist/crypto/err/err.c                              |     49 +-
 crypto/external/bsd/openssl/dist/crypto/evp/digest.c                           |      5 +-
 crypto/external/bsd/openssl/dist/crypto/evp/e_aes.c                            |     16 +-
 crypto/external/bsd/openssl/dist/crypto/evp/e_aria.c                           |     16 +-
 crypto/external/bsd/openssl/dist/crypto/evp/e_chacha20_poly1305.c              |      6 +-
 crypto/external/bsd/openssl/dist/crypto/evp/p_lib.c                            |      7 +-
 crypto/external/bsd/openssl/dist/crypto/evp/p_open.c                           |      4 +-
 crypto/external/bsd/openssl/dist/crypto/hmac/hmac.c                            |      9 +-
 crypto/external/bsd/openssl/dist/crypto/include/internal/dso_conf.h.in         |      7 +-
 crypto/external/bsd/openssl/dist/crypto/init.c                                 |     16 +-
 crypto/external/bsd/openssl/dist/crypto/mips_arch.h                            |      4 +-
 crypto/external/bsd/openssl/dist/crypto/modes/asm/ghash-x86_64.pl              |      2 +
 crypto/external/bsd/openssl/dist/crypto/modes/ccm128.c                         |      4 +-
 crypto/external/bsd/openssl/dist/crypto/o_str.c                                |     27 +-
 crypto/external/bsd/openssl/dist/crypto/objects/obj_dat.h                      |      4 +-
 crypto/external/bsd/openssl/dist/crypto/objects/objects.txt                    |      2 +-
 crypto/external/bsd/openssl/dist/crypto/ocsp/ocsp_ext.c                        |      6 +-
 crypto/external/bsd/openssl/dist/crypto/ocsp/ocsp_lib.c                        |      6 +-
 crypto/external/bsd/openssl/dist/crypto/pem/pem_sign.c                         |      4 +-
 crypto/external/bsd/openssl/dist/crypto/poly1305/build.info                    |      1 +
 crypto/external/bsd/openssl/dist/crypto/ppccap.c                               |      5 +-
 crypto/external/bsd/openssl/dist/crypto/rand/drbg_lib.c                        |      6 +-
 crypto/external/bsd/openssl/dist/crypto/rand/rand_lib.c                        |     12 +-
 crypto/external/bsd/openssl/dist/crypto/rand/rand_unix.c                       |     29 +-
 crypto/external/bsd/openssl/dist/crypto/rand/rand_vms.c                        |      6 +-
 crypto/external/bsd/openssl/dist/crypto/rand/rand_win.c                        |      6 +-
 crypto/external/bsd/openssl/dist/crypto/rand/randfile.c                        |      4 +-
 crypto/external/bsd/openssl/dist/crypto/rc4/build.info                         |      2 +
 crypto/external/bsd/openssl/dist/crypto/rsa/rsa_ameth.c                        |      6 +-
 crypto/external/bsd/openssl/dist/crypto/rsa/rsa_gen.c                          |      5 +-
 crypto/external/bsd/openssl/dist/crypto/rsa/rsa_oaep.c                         |     48 +-
 crypto/external/bsd/openssl/dist/crypto/rsa/rsa_ossl.c                         |     16 +-
 crypto/external/bsd/openssl/dist/crypto/rsa/rsa_pk1.c                          |     46 +-
 crypto/external/bsd/openssl/dist/crypto/rsa/rsa_pmeth.c                        |     13 +-
 crypto/external/bsd/openssl/dist/crypto/rsa/rsa_ssl.c                          |     57 +-
 crypto/external/bsd/openssl/dist/crypto/rsa/rsa_x931g.c                        |      8 +-
 crypto/external/bsd/openssl/dist/crypto/sha/keccak1600.c                       |     50 +-
 crypto/external/bsd/openssl/dist/crypto/threads_win.c                          |      6 +-
 crypto/external/bsd/openssl/dist/crypto/x509/x509_lu.c                         |      5 +-
 crypto/external/bsd/openssl/dist/crypto/x509v3/v3_genn.c                       |      6 +-
 crypto/external/bsd/openssl/dist/demos/pkcs12/pkread.c                         |     48 +-
 crypto/external/bsd/openssl/dist/doc/man1/genpkey.pod                          |     10 +-
 crypto/external/bsd/openssl/dist/doc/man1/pkeyutl.pod                          |     13 +-
 crypto/external/bsd/openssl/dist/doc/man1/s_client.pod                         |      4 +-
 crypto/external/bsd/openssl/dist/doc/man1/s_server.pod                         |      2 +-
 crypto/external/bsd/openssl/dist/doc/man1/s_time.pod                           |      4 +-
 crypto/external/bsd/openssl/dist/doc/man1/ts.pod                               |      7 +-
 crypto/external/bsd/openssl/dist/doc/man3/ASN1_TIME_set.pod                    |     66 +-
 crypto/external/bsd/openssl/dist/doc/man3/ASN1_generate_nconf.pod              |     16 +-
 crypto/external/bsd/openssl/dist/doc/man3/BIO_connect.pod                      |     14 +-
 crypto/external/bsd/openssl/dist/doc/man3/BIO_push.pod                         |     16 +-
 crypto/external/bsd/openssl/dist/doc/man3/BIO_s_file.pod                       |     38 +-
 crypto/external/bsd/openssl/dist/doc/man3/BIO_s_mem.pod                        |     18 +-
 crypto/external/bsd/openssl/dist/doc/man3/BN_CTX_start.pod                     |      3 +-
 crypto/external/bsd/openssl/dist/doc/man3/BN_new.pod                           |      3 +-
 crypto/external/bsd/openssl/dist/doc/man3/BN_rand.pod                          |     20 +-
 crypto/external/bsd/openssl/dist/doc/man3/BN_security_bits.pod                 |     10 +-
 crypto/external/bsd/openssl/dist/doc/man3/CMS_verify.pod                       |      4 +-
 crypto/external/bsd/openssl/dist/doc/man3/CONF_modules_load_file.pod           |     12 +-
 crypto/external/bsd/openssl/dist/doc/man3/DES_random_key.pod                   |     12 +-
 crypto/external/bsd/openssl/dist/doc/man3/ECDSA_SIG_new.pod                    |      4 +-
 crypto/external/bsd/openssl/dist/doc/man3/EVP_DigestVerifyInit.pod             |      6 +-
 crypto/external/bsd/openssl/dist/doc/man3/EVP_EncryptInit.pod                  |     10 +-
 crypto/external/bsd/openssl/dist/doc/man3/EVP_PKEY_meth_new.pod                |     10 +-
 crypto/external/bsd/openssl/dist/doc/man3/EVP_PKEY_set1_RSA.pod                |     21 +-
 crypto/external/bsd/openssl/dist/doc/man3/EVP_chacha20.pod                     |     12 +-
 crypto/external/bsd/openssl/dist/doc/man3/HMAC.pod                             |      4 +-
 crypto/external/bsd/openssl/dist/doc/man3/OBJ_nid2obj.pod                      |     24 +-
 crypto/external/bsd/openssl/dist/doc/man3/OCSP_cert_to_id.pod                  |      6 +-
 crypto/external/bsd/openssl/dist/doc/man3/PEM_read_bio_PrivateKey.pod          |    142 +-
 crypto/external/bsd/openssl/dist/doc/man3/RAND_DRBG_generate.pod               |     10 +-
 crypto/external/bsd/openssl/dist/doc/man3/RAND_DRBG_get0_master.pod            |     11 +-
 crypto/external/bsd/openssl/dist/doc/man3/RAND_DRBG_new.pod                    |     10 +-
 crypto/external/bsd/openssl/dist/doc/man3/RAND_DRBG_reseed.pod                 |     17 +-
 crypto/external/bsd/openssl/dist/doc/man3/RAND_DRBG_set_callbacks.pod          |     11 +-
 crypto/external/bsd/openssl/dist/doc/man3/RAND_add.pod                         |     12 +-
 crypto/external/bsd/openssl/dist/doc/man3/RAND_bytes.pod                       |     20 +-
 crypto/external/bsd/openssl/dist/doc/man3/RAND_cleanup.pod                     |     10 +-
 crypto/external/bsd/openssl/dist/doc/man3/RSA_padding_add_PKCS1_type_1.pod     |     60 +-
 crypto/external/bsd/openssl/dist/doc/man3/RSA_public_encrypt.pod               |     38 +-
 crypto/external/bsd/openssl/dist/doc/man3/SSL_CIPHER_get_name.pod              |     17 +-
 crypto/external/bsd/openssl/dist/doc/man3/SSL_CONF_cmd.pod                     |     34 +-
 crypto/external/bsd/openssl/dist/doc/man3/SSL_CTX_load_verify_locations.pod    |     36 +-
 crypto/external/bsd/openssl/dist/doc/man3/SSL_CTX_new.pod                      |     14 +-
 crypto/external/bsd/openssl/dist/doc/man3/SSL_CTX_set1_sigalgs.pod             |     10 +-
 crypto/external/bsd/openssl/dist/doc/man3/SSL_CTX_set_client_hello_cb.pod      |      4 +-
 crypto/external/bsd/openssl/dist/doc/man3/SSL_CTX_set_default_passwd_cb.pod    |     12 +-
 crypto/external/bsd/openssl/dist/doc/man3/SSL_CTX_set_generate_session_id.pod  |     18 +-
 crypto/external/bsd/openssl/dist/doc/man3/SSL_CTX_set_min_proto_version.pod    |     10 +-
 crypto/external/bsd/openssl/dist/doc/man3/SSL_CTX_set_read_ahead.pod           |      4 +-
 crypto/external/bsd/openssl/dist/doc/man3/SSL_CTX_set_split_send_fragment.pod  |     10 +-
 crypto/external/bsd/openssl/dist/doc/man3/SSL_CTX_set_tlsext_ticket_key_cb.pod |     10 +-
 crypto/external/bsd/openssl/dist/doc/man3/SSL_CTX_set_tmp_dh_callback.pod      |     18 +-
 crypto/external/bsd/openssl/dist/doc/man3/SSL_get_error.pod                    |      2 +-
 crypto/external/bsd/openssl/dist/doc/man3/SSL_load_client_CA_file.pod          |     32 +-
 crypto/external/bsd/openssl/dist/doc/man3/SSL_read.pod                         |     10 +-
 crypto/external/bsd/openssl/dist/doc/man3/SSL_session_reused.pod               |      4 +-
 crypto/external/bsd/openssl/dist/doc/man3/SSL_shutdown.pod                     |      2 +-
 crypto/external/bsd/openssl/dist/doc/man3/SSL_write.pod                        |     10 +-
 crypto/external/bsd/openssl/dist/doc/man3/X509_LOOKUP_meth_new.pod             |     20 +-
 crypto/external/bsd/openssl/dist/doc/man3/X509_NAME_add_entry_by_txt.pod       |     20 +-
 crypto/external/bsd/openssl/dist/doc/man3/X509_NAME_get_index_by_NID.pod       |     26 +-
 crypto/external/bsd/openssl/dist/doc/man3/X509_get_subject_name.pod            |     18 +-
 crypto/external/bsd/openssl/dist/doc/man3/d2i_X509.pod                         |     28 +-
 crypto/external/bsd/openssl/dist/e_os.h                                        |     11 +-
 crypto/external/bsd/openssl/dist/engines/e_padlock.c                           |      8 +-
 crypto/external/bsd/openssl/dist/fuzz/oids.txt                                 |      2 +-
 crypto/external/bsd/openssl/dist/include/internal/dsoerr.h                     |      9 +-
 crypto/external/bsd/openssl/dist/include/internal/refcount.h                   |     16 +-
 crypto/external/bsd/openssl/dist/include/internal/tsan_assist.h                |      2 +-
 crypto/external/bsd/openssl/dist/include/openssl/err.h                         |      3 +-
 crypto/external/bsd/openssl/dist/include/openssl/evp.h                         |      1 +
 crypto/external/bsd/openssl/dist/include/openssl/obj_mac.h                     |      2 +-
 crypto/external/bsd/openssl/dist/include/openssl/ocsp.h                        |      6 +-
 crypto/external/bsd/openssl/dist/include/openssl/opensslv.h                    |      6 +-
 crypto/external/bsd/openssl/dist/include/openssl/ssl.h                         |      2 +-
 crypto/external/bsd/openssl/dist/include/openssl/x509v3.h                      |      6 +-
 crypto/external/bsd/openssl/dist/ssl/ssl_lib.c                                 |      7 +-
 crypto/external/bsd/openssl/dist/ssl/ssl_locl.h                                |     13 +-
 crypto/external/bsd/openssl/dist/ssl/statem/extensions.c                       |      2 -
 crypto/external/bsd/openssl/dist/ssl/statem/extensions_clnt.c                  |     38 +-
 crypto/external/bsd/openssl/dist/ssl/statem/extensions_srvr.c                  |      6 +-
 crypto/external/bsd/openssl/dist/ssl/statem/statem_clnt.c                      |      5 +-
 crypto/external/bsd/openssl/dist/ssl/statem/statem_srvr.c                      |      4 +
 crypto/external/bsd/openssl/dist/test/asn1_encode_test.c                       |      6 +-
 crypto/external/bsd/openssl/dist/test/bio_memleak_test.c                       |    162 +-
 crypto/external/bsd/openssl/dist/test/bioprinttest.c                           |     10 +-
 crypto/external/bsd/openssl/dist/test/bntest.c                                 |    386 +-
 crypto/external/bsd/openssl/dist/test/build.info                               |     16 +-
 crypto/external/bsd/openssl/dist/test/ct_test.c                                |      6 +-
 crypto/external/bsd/openssl/dist/test/ecdsatest.c                              |    532 +-
 crypto/external/bsd/openssl/dist/test/ecdsatest.h                              |  10214 ++++
 crypto/external/bsd/openssl/dist/test/ectest.c                                 |     72 +-
 crypto/external/bsd/openssl/dist/test/evp_extra_test.c                         |     62 +
 crypto/external/bsd/openssl/dist/test/evp_test.c                               |     29 +-
 crypto/external/bsd/openssl/dist/test/ocspapitest.c                            |     84 +-
 crypto/external/bsd/openssl/dist/test/recipes/15-test_rsapss.t                 |     10 +-
 crypto/external/bsd/openssl/dist/test/recipes/30-test_evp.t                    |      4 +-
 crypto/external/bsd/openssl/dist/test/recipes/30-test_evp_data/evpccmcavs.txt  |  23927 ++++++++++
 crypto/external/bsd/openssl/dist/test/recipes/30-test_evp_data/evpciph.txt     |     85 +-
 crypto/external/bsd/openssl/dist/test/recipes/30-test_evp_data/evpmac.txt      |     10 +-
 crypto/external/bsd/openssl/dist/test/recipes/80-test_cms.t                    |     10 +-
 crypto/external/bsd/openssl/dist/test/rsa_test.c                               |     33 +-
 crypto/external/bsd/openssl/dist/util/cavs-to-evptest.pl                       |    121 +
 crypto/external/bsd/openssl/dist/util/find-doc-nits                            |     23 +-
 crypto/external/bsd/openssl/dist/util/libcrypto.num                            |      1 +
 197 files changed, 38893 insertions(+), 2591 deletions(-)

diffs (truncated from 46612 to 300 lines):

diff -r fe95d91d3fdf -r 29645b1e84d1 crypto/external/bsd/openssl/dist/CHANGES
--- a/crypto/external/bsd/openssl/dist/CHANGES  Tue Mar 12 16:44:04 2019 +0000
+++ b/crypto/external/bsd/openssl/dist/CHANGES  Sun Jun 09 17:47:39 2019 +0000
@@ -7,6 +7,77 @@
  https://github.com/openssl/openssl/commits/ and pick the appropriate
  release branch.
 
+ Changes between 1.1.1b and 1.1.1c [28 May 2019]
+
+  *) Add build tests for C++.  These are generated files that only do one
+     thing, to include one public OpenSSL head file each.  This tests that
+     the public header files can be usefully included in a C++ application.
+
+     This test isn't enabled by default.  It can be enabled with the option
+     'enable-buildtest-c++'.
+     [Richard Levitte]
+
+  *) Enable SHA3 pre-hashing for ECDSA and DSA.
+     [Patrick Steuer]
+
+  *) Change the default RSA, DSA and DH size to 2048 bit instead of 1024.
+     This changes the size when using the genpkey app when no size is given. It
+     fixes an omission in earlier changes that changed all RSA, DSA and DH
+     generation apps to use 2048 bits by default.
+     [Kurt Roeckx]
+
+  *) Reorganize the manual pages to consistently have RETURN VALUES,
+     EXAMPLES, SEE ALSO and HISTORY come in that order, and adjust
+     util/fix-doc-nits accordingly.
+     [Paul Yang, Joshua Lock]
+
+  *) Add the missing accessor EVP_PKEY_get0_engine()
+     [Matt Caswell]
+
+  *) Have apps like 's_client' and 's_server' output the signature scheme
+     along with other cipher suite parameters when debugging.
+     [Lorinczy Zsigmond]
+
+  *) Make OPENSSL_config() error agnostic again.
+     [Richard Levitte]
+
+  *) Do the error handling in RSA decryption constant time.
+     [Bernd Edlinger]
+
+  *) Prevent over long nonces in ChaCha20-Poly1305.
+
+     ChaCha20-Poly1305 is an AEAD cipher, and requires a unique nonce input
+     for every encryption operation. RFC 7539 specifies that the nonce value
+     (IV) should be 96 bits (12 bytes). OpenSSL allows a variable nonce length
+     and front pads the nonce with 0 bytes if it is less than 12
+     bytes. However it also incorrectly allows a nonce to be set of up to 16
+     bytes. In this case only the last 12 bytes are significant and any
+     additional leading bytes are ignored.
+
+     It is a requirement of using this cipher that nonce values are
+     unique. Messages encrypted using a reused nonce value are susceptible to
+     serious confidentiality and integrity attacks. If an application changes
+     the default nonce length to be longer than 12 bytes and then makes a
+     change to the leading bytes of the nonce expecting the new value to be a
+     new unique nonce then such an application could inadvertently encrypt
+     messages with a reused nonce.
+
+     Additionally the ignored bytes in a long nonce are not covered by the
+     integrity guarantee of this cipher. Any application that relies on the
+     integrity of these ignored leading bytes of a long nonce may be further
+     affected. Any OpenSSL internal use of this cipher, including in SSL/TLS,
+     is safe because no such use sets such a long nonce value. However user
+     applications that use this cipher directly and set a non-default nonce
+     length to be longer than 12 bytes may be vulnerable.
+
+     This issue was reported to OpenSSL on 16th of March 2019 by Joran Dirk
+     Greef of Ronomon.
+     (CVE-2019-1543)
+     [Matt Caswell]
+
+  *) Ensure that SM2 only uses SM3 as digest algorithm
+     [Paul Yang]
+
  Changes between 1.1.1a and 1.1.1b [26 Feb 2019]
 
   *) Added SCA hardening for modular field inversion in EC_GROUP through
diff -r fe95d91d3fdf -r 29645b1e84d1 crypto/external/bsd/openssl/dist/Configurations/unix-Makefile.tmpl
--- a/crypto/external/bsd/openssl/dist/Configurations/unix-Makefile.tmpl        Tue Mar 12 16:44:04 2019 +0000
+++ b/crypto/external/bsd/openssl/dist/Configurations/unix-Makefile.tmpl        Sun Jun 09 17:47:39 2019 +0000
@@ -260,8 +260,8 @@
                 join(' ', $target{lib_cppflags} || (),
                           $target{shared_cppflag} || (),
                           (map { '-D'.$_ }
-                               @{$config{lib_defines}},
-                               @{$config{shared_defines}}),
+                               @{$config{lib_defines} || ()},
+                               @{$config{shared_defines} || ()}),
                           @{$config{lib_cppflags}},
                           @{$config{shared_cppflag}});
                 join(' ', $lib_cppflags,
@@ -285,6 +285,9 @@
 LIB_EX_LIBS=$(CNF_EX_LIBS) $(EX_LIBS)
 DSO_CPPFLAGS={- join(' ', $target{dso_cppflags} || (),
                           $target{module_cppflags} || (),
+                          (map { '-D'.$_ }
+                               @{$config{dso_defines} || ()},
+                               @{$config{module_defines} || ()}),
                           @{$config{dso_cppflags}},
                           @{$config{module_cppflags}},
                           '$(CNF_CPPFLAGS)', '$(CPPFLAGS)') -}
@@ -305,6 +308,7 @@
                          '$(CNF_LDFLAGS)', '$(LDFLAGS)') -}
 DSO_EX_LIBS=$(CNF_EX_LIBS) $(EX_LIBS)
 BIN_CPPFLAGS={- join(' ', $target{bin_cppflags} || (),
+                          (map { '-D'.$_ } @{$config{bin_defines} || ()}),
                           @{$config{bin_cppflags}},
                           '$(CNF_CPPFLAGS)', '$(CPPFLAGS)') -}
 BIN_CFLAGS={- join(' ', $target{bin_cflags} || (),
diff -r fe95d91d3fdf -r 29645b1e84d1 crypto/external/bsd/openssl/dist/Configurations/windows-makefile.tmpl
--- a/crypto/external/bsd/openssl/dist/Configurations/windows-makefile.tmpl     Tue Mar 12 16:44:04 2019 +0000
+++ b/crypto/external/bsd/openssl/dist/Configurations/windows-makefile.tmpl     Sun Jun 09 17:47:39 2019 +0000
@@ -187,6 +187,7 @@
 ASFLAGS={- join(' ', @{$config{ASFLAGS}}) -}
 
 RC={- $config{RC} -}
+RCFLAGS={- join(' ', @{$config{RCFLAGS}}) -}
 
 ECHO="$(PERL)" "$(SRCDIR)\util\echo.pl"
 
@@ -586,7 +587,7 @@
      if ($srcs[0] =~ /\.rc$/) {
          return <<"EOF";
 $args{obj}: $deps
-       \$(RC) \$(RCOUTFLAG)\$\@ $srcs
+       \$(RC) \$(RCFLAGS) \$(RCOUTFLAG)\$\@ $srcs
 EOF
      }
      (my $obj = $args{obj}) =~ s|\.o$||;
diff -r fe95d91d3fdf -r 29645b1e84d1 crypto/external/bsd/openssl/dist/Configure
--- a/crypto/external/bsd/openssl/dist/Configure        Tue Mar 12 16:44:04 2019 +0000
+++ b/crypto/external/bsd/openssl/dist/Configure        Sun Jun 09 17:47:39 2019 +0000
@@ -24,7 +24,7 @@
 my $orig_death_handler = $SIG{__DIE__};
 $SIG{__DIE__} = \&death_handler;
 
-my $usage="Usage: Configure [no-<cipher> ...] [enable-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-dso] 
[no-egd] [sctp] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--config=FILE] os/compiler[:flags]\n";
+my $usage="Usage: Configure [no-<cipher> ...] [enable-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-egd] 
[sctp] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--config=FILE] os/compiler[:flags]\n";
 
 # Options:
 #
@@ -54,16 +54,14 @@
 # [no-]threads  [don't] try to create a library that is suitable for
 #               multithreaded applications (default is "threads" if we
 #               know how to do it)
-# [no-]shared  [don't] try to create shared libraries when supported.
+# [no-]shared   [don't] try to create shared libraries when supported.
 # [no-]pic      [don't] try to build position independent code when supported.
 #               If disabled, it also disables shared and dynamic-engine.
 # no-asm        do not use assembler
-# no-dso        do not compile in any native shared-library methods. This
-#               will ensure that all methods just return NULL.
 # no-egd        do not compile support for the entropy-gathering daemon APIs
 # [no-]zlib     [don't] compile support for zlib compression.
-# zlib-dynamic Like "zlib", but the zlib library is expected to be a shared
-#              library and will be loaded in run-time by the OpenSSL library.
+# zlib-dynamic  Like "zlib", but the zlib library is expected to be a shared
+#               library and will be loaded in run-time by the OpenSSL library.
 # sctp          include SCTP support
 # enable-weak-ssl-ciphers
 #               Enable weak ciphers that are disabled by default.
@@ -75,7 +73,7 @@
 # -static       while -static is also a pass-through compiler option (and
 #               as such is limited to environments where it's actually
 #               meaningful), it triggers a number configuration options,
-#               namely no-dso, no-pic, no-shared and no-threads. It is
+#               namely no-pic, no-shared and no-threads. It is
 #               argued that the only reason to produce statically linked
 #               binaries (and in context it means executables linked with
 #               -static flag, and not just executables linked with static
@@ -90,21 +88,22 @@
 #               production quality.
 #
 # DEBUG_SAFESTACK use type-safe stacks to enforce type-safety on stack items
-#              provided to stack calls. Generates unique stack functions for
-#              each possible stack type.
-# BN_LLONG     use the type 'long long' in crypto/bn/bn.h
-# RC4_CHAR     use 'char' instead of 'int' for RC4_INT in crypto/rc4/rc4.h
+#               provided to stack calls. Generates unique stack functions for
+#               each possible stack type.
+# BN_LLONG      use the type 'long long' in crypto/bn/bn.h
+# RC4_CHAR      use 'char' instead of 'int' for RC4_INT in crypto/rc4/rc4.h
 # Following are set automatically by this script
 #
-# MD5_ASM      use some extra md5 assembler,
-# SHA1_ASM     use some extra sha1 assembler, must define L_ENDIAN for x86
-# RMD160_ASM   use some extra ripemd160 assembler,
-# SHA256_ASM   sha256_block is implemented in assembler
-# SHA512_ASM   sha512_block is implemented in assembler
-# AES_ASM      AES_[en|de]crypt is implemented in assembler
-
-# Minimum warning options... any contributions to OpenSSL should at least get
-# past these.
+# MD5_ASM       use some extra md5 assembler,
+# SHA1_ASM      use some extra sha1 assembler, must define L_ENDIAN for x86
+# RMD160_ASM    use some extra ripemd160 assembler,
+# SHA256_ASM    sha256_block is implemented in assembler
+# SHA512_ASM    sha512_block is implemented in assembler
+# AES_ASM       AES_[en|de]crypt is implemented in assembler
+
+# Minimum warning options... any contributions to OpenSSL should at least
+# get past these.  Note that we only use these with C compilers, not with
+# C++ compilers.
 
 # DEBUG_UNUSED enables __owur (warn unused result) checks.
 # -DPEDANTIC complements -pedantic and is meant to mask code that
@@ -119,22 +118,23 @@
 # code, so we just tell compiler to be pedantic about everything
 # but 'long long' type.
 
-my $gcc_devteam_warn = "-DDEBUG_UNUSED"
-        . " -DPEDANTIC -pedantic -Wno-long-long"
-        . " -Wall"
-        . " -Wextra"
-        . " -Wno-unused-parameter"
-        . " -Wno-missing-field-initializers"
-        . " -Wswitch"
-        . " -Wsign-compare"
-        . " -Wmissing-prototypes"
-        . " -Wstrict-prototypes"
-        . " -Wshadow"
-        . " -Wformat"
-        . " -Wtype-limits"
-        . " -Wundef"
-        . " -Werror"
-        ;
+my @gcc_devteam_warn = qw(
+    -DDEBUG_UNUSED
+    -DPEDANTIC -pedantic -Wno-long-long
+    -Wall
+    -Wextra
+    -Wno-unused-parameter
+    -Wno-missing-field-initializers
+    -Wswitch
+    -Wsign-compare
+    -Wshadow
+    -Wformat
+    -Wtype-limits
+    -Wundef
+    -Werror
+    -Wmissing-prototypes
+    -Wstrict-prototypes
+);
 
 # These are used in addition to $gcc_devteam_warn when the compiler is clang.
 # TODO(openssl-team): fix problems and investigate if (at least) the
@@ -144,19 +144,16 @@
 #       -Wlanguage-extension-token -- no, we use asm()
 #       -Wunused-macros -- no, too tricky for BN and _XOPEN_SOURCE etc
 #       -Wextended-offsetof -- no, needed in CMS ASN1 code
-#       -Wunused-function -- no, it forces header use of safestack et al
-#                            DEFINE macros
-my $clang_devteam_warn = ""
-        . " -Wswitch-default"
-        . " -Wno-parentheses-equality"
-        . " -Wno-language-extension-token"
-        . " -Wno-extended-offsetof"
-        . " -Wconditional-uninitialized"
-        . " -Wincompatible-pointer-types-discards-qualifiers"
-        . " -Wmissing-variable-declarations"
-        . " -Wno-unknown-warning-option"
-        . " -Wno-unused-function"
-        ;
+my @clang_devteam_warn = qw(
+    -Wswitch-default
+    -Wno-parentheses-equality
+    -Wno-language-extension-token
+    -Wno-extended-offsetof
+    -Wconditional-uninitialized
+    -Wincompatible-pointer-types-discards-qualifiers
+    -Wno-unknown-warning-option
+    -Wmissing-variable-declarations
+);
 
 # This adds backtrace information to the memory leak info.  Is only used
 # when crypto-mdebug-backtrace is enabled.
@@ -225,20 +222,20 @@
     die "reconfiguring with other arguments present isn't supported"
         if scalar @argvcopy > 1;
     if (-f "./configdata.pm") {
-       my $file = "./configdata.pm";
-       unless (my $return = do $file) {
-           die "couldn't parse $file: $@" if $@;
+        my $file = "./configdata.pm";
+        unless (my $return = do $file) {
+            die "couldn't parse $file: $@" if $@;
             die "couldn't do $file: $!"    unless defined $return;
             die "couldn't run $file"       unless $return;
-       }
-
-       @argvcopy = defined($configdata::config{perlargv}) ?
-           @{$configdata::config{perlargv}} : ();
-       die "Incorrect data to reconfigure, please do a normal configuration\n"
-           if (grep(/^reconf/,@argvcopy));
-       $config{perlenv} = $configdata::config{perlenv} // {};
+        }



Home | Main Index | Thread Index | Old Index