The NetBSD Project

CVS log for pkgsrc/security/libretls/Makefile

[BACK] Up to [cvs.NetBSD.org] / pkgsrc / security / libretls

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.11: download - view: text, markup, annotated - select for diffs
Sun Mar 17 00:35:34 2024 UTC (2 years, 8 months ago) by nia
Branches: MAIN
CVS tags: pkgsrc-2026Q3-base, pkgsrc-2026Q3, pkgsrc-2026Q2-base, pkgsrc-2026Q2, pkgsrc-2026Q1-base, pkgsrc-2026Q1, pkgsrc-2025Q4-base, pkgsrc-2025Q4, pkgsrc-2025Q3-base, pkgsrc-2025Q3, pkgsrc-2025Q2-base, pkgsrc-2025Q2, pkgsrc-2025Q1-base, pkgsrc-2025Q1, pkgsrc-2024Q4-base, pkgsrc-2024Q4, pkgsrc-2024Q3-base, pkgsrc-2024Q3, pkgsrc-2024Q2-base, pkgsrc-2024Q2, pkgsrc-2024Q1-base, pkgsrc-2024Q1, HEAD
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +3 -1 lines
libretls: Needs strnlen

Revision 1.10: download - view: text, markup, annotated - select for diffs
Wed Nov 8 14:10:20 2023 UTC (3 years ago) by schmonz
Branches: MAIN
CVS tags: pkgsrc-2023Q4-base, pkgsrc-2023Q4
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +2 -3 lines
libretls: update to 3.8.1. LibreSSL changes:

3.8.1:

* Portable changes
  - Applications bundled as part of the LibreSSL package internally,
    nc(1) and openssl(1), now are linked statically if static libraries
    are built.
  - Internal compatibility function symbols are no longer exported from
    libcrypto. Instead, the libcompat library is linked to libcrypto,
    libssl, and libtls separately. This increases size a little, but
    ensures that the libraries are not exporting symbols to programs
    unintentionally.
  - Selective removal of CET implementation on platforms where it is
    not supported (macOS).
  - Integrated four more tests.
  - Added Windows ARM64 architecture to tested platforms.
  - Removed Solaris 10 support, fixed Solaris 11.
  - libtls no longer links statically to libcrypto / libssl unless
    '--enable-libtls-only' is specified at configure time.
  - Improved Windows compatibility library, namely handling of files vs
    sockets, correcting an exception when operating on a closed socket.
  - CMake builds no longer hardcode '-O2' into the compiler flags, instead
    using flags from the CMake build type instead.
  - Set the CMake default build type to 'Release'. This can be overridden
    during configuration.
  - Fixed broken ASM support with MinGW builds.
* Internal improvements
  - Fixed alignment handling in SHA-512.
  - Moved the verified_chain to the correct internal struct.
  - Improved checks for commonName in libtls.
  - Fixed error check for X509_get_ext_d2i() failure in libtls.
  - Improved BIGNUM internals and performance.
  - Significantly improved Montgomery multiplication performance.
  - Initial cleanup passes for SHA-256 internals.
  - Converted more libcrypto internals API using CBB and CBS.
  - Removed code guarded by #ifdef ZLIB.
  - Changed ASN1_item_sign_ctx() and ASN1_item_verify() to work with
    Ed25519 and fixed a few bugs in there.
  - Fixed various issues with EVP_PKEY_CTX_{new,dup}().
  - Improved X.509 certificate version checks.
  - Cleaned up handling of elliptic curve cofactors.
  - Made BN_num_bits() independent of bn->top.
  - Rewrote and simplified bn_sqr().
  - Removed EC_GROUP precomp machinery.
  - Ensure no X.509v3 extensions appear more than once in certificates.
  - Cleaned up various ECDH, ECDSA and EC internals.
  - Replaced ASN1_bn_print with a cleaner internal implementation.
  - Simplified ASN1_item_sign_ctx().
  - Rewrote OBJ_find_sigid_algs() and OBJ_find_sigid_by_algs().
  - Various improvements in the 'simple' EC code.
  - Fix OPENSSL_cpuid_setup() invocations on arm/aarch64.
  - Reduced the dependency of hash implementations on many layers of
    macros. This results in significant speedups since modern compilers
    are now less confused.
  - Significantly simplified the BN_BLINDING internals used in RSA.
* New features
* Compatibility changes
  - X509_NAME_get_text_by_{NID,OBJ}() now only succeed if they contain
    valid UTF-8 without embedded NUL.
  - Moved libtls from ECDSA_METHOD to EC_KEY_METHOD.
  - Removed support for ECDH_METHOD and ECDSA_METHOD.
  - BN_is_prime{,_fasttest}_ex() refuse to check numbers larger than
    32 kbits for primality. This mitigates various DoS vectors.
  - Comp was removed.
  - Dynamic loading of conf modules is no longer supported.
  - DSO was removed and OPENSSL_NO_DSO is defined.
  - ENGINE support was removed and OPENSSL_NO_ENGINE is set. In spite
    of this, some stub functions are provided to avoid patching some
    applications that do not honor OPENSSL_NO_ENGINE.
  - It is no longer possible to make the library use your own error
    stack or ex_data implementation.
* Bug fixes
  - Fixed aliasing issue in BN_mod_inverse().
  - Made CRYPTO_get_ex_new_index() not return 0 to allow applications
    to use *_{get,set}_app_data() and *_{get,set}_ex_data() alongside
    each other.
  - Made EVP_PKEY_set1_hkdf_key() fail on a NULL key.
  - Plugged leaks in BIO_chain_dup().
  - Fixed numerous leaks and other minor bugs in RSA, DH, DSA and EC
    ASN.1 methods. Unified the coding style.
  - On socket errors in the poll loop, netcat could issue system calls
    on invalidated file descriptors.
* Documentation improvements
  - Made it very explicit that the verify callback should not be used.
  - Called out that the CRL lastUpdate is standardized as thisUpdate.
* Testing and Proactive Security
  - As always, new test coverage is added as bugs are fixed and subsystems
    are cleaned up.
* Security fixes
  - Disabled TLSv1.0 and TLSv1.1 in libssl so that they may no longer
    be selected for use.


3.8.0:

* Portable changes
  - Extended the endian.h compat header with hto* and *toh macros.
  - Adapted more tests to the portable framework.
* Internal improvements
  - Improved sieve of Eratosthenes script used for generating a table
    of small primes.
  - Started cleaning up and rewriting SHA internals.
  - Replace internal use of BN_copy() with bn_copy() for consistency.
  - Rewrote and improved BN_exp() and BN_copy().
  - Add branch target information (BTI) support to arm64 assembly.
  - Replaced BN_mod_sqrt() with a new implementation.
  - Removed incomplete and dangerous BN_RECURSION code.
  - Added endbr64 instructions to amd64 assembly.
  - Imported RFC 5280 policy checking code from BoringSSL and used it
    to replace the old exponential time code.
  - Converted more of libcrypto to use CBB/CBS.
  - Cleaned up and simplified the code dealing with builtin curves.
* New features
  - Added support for truncated SHA-2 and for SHA-3.
  - The BPSW primality test performs additional Miller-Rabin rounds
    with random bases to reduce the likelihood of composites passing.
  - Allow testing of ciphers and digests using badly aligned buffers
    in openssl speed.
  - Added a workaround for a poorly thought-out change in OpenSSL 3 that
    broke privilege separation support in libtls.
* Compatibility changes
  - Support for GF2m was removed: BIGNUM no longer supports binary extension
    field arithmetic and all binary elliptic builtin curves were removed.
  - Removed dangerous, "fast" NIST prime and elliptic curve implementations.
    In particular, EC_GFp_nist_method() is no longer available.
  - Removed most public symbols that were deprecated in OpenSSL 0.9.8.
  - Removed the public X9.31 API (RSA_X931_PADDING is still available).
  - Removed Cipher Text Stealing mode.
  - Removed SXNET and NETSCAPE_CERT_SEQUENCE support including the
    openssl(1) nseq command.
  - Dropped proxy certificate (RFC 3820) support.
  - The POLICY_TREE and its related structures and API were removed.
  - The explicitText user notice uses UTF8String instead of VisibleString
    to reduce the risk of emitting certificates with invalid DER-encoding.
  - Initial fixes for RSA-PSS support to make the TLSv1.3 stack more
    compliant with RFC 8446.
* Bug fixes
  - Correctly handle negative input to various BIGNUM functions.
  - Ensure ERR_load_ERR_strings() does not set errno unexpectedly.
  - Fix error checking of i2d_ECDSA_SIG() in ossl_ecdsa_sign().
  - Fixed detection of extended operations (XOP) on AMD hardware.
  - Ensure Montgomery exponentiation is used for the initial RSA blinding.
  - Policy is always checked in X509 validation. Critical policy extensions
    are no longer silently ignored.
  - Fixed error handling in tls_check_common_name().
  - Add missing pointer invalidation in SSL_free().
  - Fixed X509err() and X509V3err() and their internal versions.
  - Ensure that OBJ_obj2txt() always returns a C string again.
  - In X509_VERIFY_PARAM_inherit() copy hostflags independently of the
    host list.
* Documentation improvements
  - Improved documentation of BIO_ctrl(3), BIO_set_info_callback(3),
    BIO_get_info_callback(3), BIO_method_type(3), and BIO_method_name(3).
  - Marked BIO_CB_return(), BIO_cb_pre(), and BIO_cb_post() as intentionally
    undocumented.
* Testing and Proactive Security
  - Significantly improved test coverage of BN_mod_sqrt() and GCD.
  - As always, new test coverage is added as bugs are fixed and subsystems
    are cleaned up.


3.7.3:

* Bug fix
  - Hostflags in the verify parameters would not propagate from an
    SSL_CTX to newly created SSL.
* Reliability fix
  - A double free or use after free could occur after SSL_clear(3).


3.7.2:

* Portable changes
  - Moved official Github project to https://github.com/libressl/.
  - Build support for Apple Silicon.
  - Installed opensslconf.h is now architecture-specific.
  - Removed internal defines from opensslconf.h.
  - Support reproducible builds on tagged commits in main branch.
* Internal improvements
  - Initial overhaul of the BIGNUM code:
    - Added a new framework that allows architecture-dependent
      replacement implementations for bignum primitives.
    - Imported various s2n-bignum's constant time assembly primitives
      and switched amd64 to them.
    - Lots of cleanup, simplification and bug fixes.
  - Changed Perl assembly generators to move constants into .rodata,
    allowing code to run with execute-only permissions.
  - Capped the number of iterations in DSA and ECDSA signing (avoiding
    infinite loops), added additional sanity checks to DSA.
  - ASN.1 parsing improvements.
  - Made UI_destroy_method() NULL safe.
  - Various improvements to nc(1).
  - Always clear EC groups and points on free.
  - Cleanup and improvements in EC code.
  - Various openssl(1) improvements.
  - Remove dependency on system timegm() and gmtime() by replacing
    traditional Julian date conversion with POSIX epoch-seconds date
    conversion from BoringSSL.
  - Clean old and unused BN code dealing with primes.
  - Start rewriting name constraints code using CBS.
  - Remove support for the HMAC PRIVATE KEY.
  - Rework DSA signing and verifying internals.
  - Internal headers coming from OpenSSL are all called *_local.h now.
  - Rewrite TLSv1.2 key exporter.
  - Cleaned up and refactored various aspects of the legacy TLS stack.
* Bug fixes
  - Fixed a memory leak, a double free and various other issues in
    BIO_new_NDEF().
  - Fixed various crashes in the openssl(1) testing utility.
  - Do not check policies by default in the new X.509 verifier.
  - Added missing error checking in PKCS7.
  - Call CRYPTO_cleanup_all_ex_data() from OPENSSL_cleanup().
  - Add EVP_chacha20_poly1305() to the list of all ciphers.
  - Fix potential leaks of EVP_PKEY in various printing functions
  - Fix potential leak in OBJ_NAME_add().
  - Avoid signed overflow in i2c_ASN1_BIT_STRING().
  - Clean up EVP_PKEY_ASN1_METHOD related tables and code.
  - Fix long standing bugs BN_GF2m_poly2arr() and BN_GF2m_mod().
  - Fix segfaults in BN_{dec,hex}2bn().
  - Fix NULL dereference in x509_constraints_uri_host() reachable only
    in the process of generating certificates.
  - Fixed a variety of memory corruption issues in BIO chains coming
    from poor old and new API: BIO_push(), BIO_pop(), BIO_set_next().
  - Avoid potential divide by zero in BIO_dump_indent_cb()
* New features
  - Added UI_null()
  - Added X509_STORE_*check_issued()
  - Added X509_CRL_get0_tbs_sigalg() and X509_get0_uids() accessors.
  - Added EVP_CIPHER_meth_*() setter API.
  - BIO_read() and BIO_write() now behave more closely to OpenSSL 3 in
    various corner cases. More work is needed here.
  - Added Ed25519 support both as a primitive and via OpenSSL's EVP
    interfaces.
  - X25519 is now also supported via EVP.
  - The OpenSSL 1.1 raw public and private key API is available with
    support for EVP_PKEY_ED25519, EVP_PKEY_HMAC and EVP_PKEY_X25519.
    Poly1305 is not currently supported via this interface.
* Documentation improvements
  - Marked BIO_s_log(3) BIO_nread0(3), BIO_nread(3), BIO_nwrite0(3), BIO_nwrite(3),
    BIO_dump_cb(3) and BIO_dump_indent_cb(3) as intentionally undocumented.
  - Document BIO_number_read(3), BIO_number_written(3),
    BIO_set_retry_read(3), BIO_set_retry_write(3),
    BIO_set_retry_special(3), BIO_clear_retry_flags(3),
    BIO_get_retry_flags(3), BIO_dup_chain(3), BIO_set_flags(3),
    BIO_clear_flags(3), BIO_test_flags(3), BIO_get_flags(3).
    BIO_callback_fn_ex(3), BIO_set_callback_ex(3), BIO_get_callback_ex(3),
    BIO_callback_fn(3), and the BIO_FLAGS_* constants
  - Correct the prototypes of BIO_get_conn_ip(3) and BIO_get_conn_int_port(3).
  - Document ED25519_keypair(3), ED25519_sign(3), and ED25519_verify(3).
  - Document EVP_PKEY_new_raw_private_key(3),
    EVP_PKEY_new_raw_public_key(3), EVP_PKEY_get_raw_private_key(3), and
    EVP_PKEY_get_raw_public_key(3).
  - Document ASN1_buf_print(3).
  - Document DH_get0_*, DSA_get0_*, ECDSA_SIG_get0_{r,s}() and RSA_get0_*.
  - Merged documentation of UI_null() from OpenSSL 1.1
  - Various spelling and other documentation improvements.
  - Numerous improvements and additions for ASN.1, BIO, BN, and X.509.
  - The BN documentation is now considered to be complete.
* Testing and Proactive Security
  - As always, new test coverage is added as bugs are fixed and subsystems
    are cleaned up.
  - New Wycheproof tests added.
  - OpenSSL 3.0 Interop tests added.
  - Many old tests rewritten, cleaned up and extended.
* Security fixes
  - A malicious certificate revocation list or timestamp response token
    would allow an attacker to read arbitrary memory.


3.7.1:

* Internal improvements
  - Initial overhaul of the BIGNUM code:
    - Added a new framework that allows architecture-dependent
      replacement implementations for bignum primitives.
    - Imported various s2n-bignum's constant time assembly primitives
      and switched amd64 to them.
    - Lots of cleanup, simplification and bug fixes.
  - Changed Perl assembly generators to move constants into .rodata,
    allowing code to run with execute-only permissions.
  - Capped the number of iterations in DSA and ECDSA signing (avoiding
    infinite loops), added additional sanity checks to DSA.
  - ASN.1 parsing improvements.
  - Made UI_destroy_method() NULL safe.
  - Various improvements to nc(1).
  - Always clear EC groups and points on free.
  - Cleanup and improvements in EC code.
  - Various openssl(1) improvements.
* Bug fixes
  - Fixed a memory leak, a double free and various other issues in
    BIO_new_NDEF().
  - Fixed various crashes in the openssl(1) testing utility.
  - Do not check policies by default in the new X.509 verifier.
  - Avoid crash with ASN.1 BOOLEANS in openssl(1) asn1parse.
  - Added missing error checking in PKCS7.
  - Call CRYPTO_cleanup_all_ex_data() from OPENSSL_cleanup().
* Compatibility changes
  - Correct the prototypes of BIO_get_conn_ip(3) and
    BIO_get_conn_int_port(3).
* New features
  - Added UI_null()
  - Added X509_STORE_*check_issued()
  - Added X509_CRL_get0_sigalg() and X509_get0_uids() accessors.
  - Added EVP_CIPHER_meth_*() setter API.
* Documentation improvements
  - Marked BIO_s_log(3) BIO_nread0(3), BIO_nread(3), BIO_nwrite0(3), BIO_nwrite(3),
    BIO_dump_cb(3) and BIO_dump_indent_cb(3) as intentionally undocumented.
  - Merged documentation of UI_null() from OpenSSL 1.1
  - Document BIO_number_read(3), BIO_number_written(3),
    BIO_set_retry_read(3), BIO_set_retry_write(3),
    BIO_set_retry_special(3), BIO_clear_retry_flags(3),
    BIO_get_retry_flags(3), BIO_dup_chain(3), BIO_set_flags(3),
    BIO_clear_flags(3), BIO_test_flags(3), BIO_get_flags(3).
    BIO_callback_fn_ex(3), BIO_set_callback_ex(3), BIO_get_callback_ex(3),
    BIO_callback_fn(3), and the BIO_FLAGS_* constants
  - Document ED25519_keypair(3), ED25519_sign(3), and ED25519_verify(3).
  - Document EVP_PKEY_new_raw_private_key(3),
    EVP_PKEY_new_raw_public_key(3), EVP_PKEY_get_raw_private_key(3), and
    EVP_PKEY_get_raw_public_key(3).
  - Document ASN1_buf_print(3).
  - Document ECDSA_SIG_get0_{r,s}().
  - Document DH_get0_* for individual DH members.
  - Document DSA_get0_* for individual DSA members
  - Document RSA_get0_* for individual RSA members.
  - Various spelling and other documentation improvements.
* Testing and Proactive Security
  - As always, new test coverage is added as bugs are fixed and subsystems
    are cleaned up.
  - New Wycheproof tests added.
  - OpenSSL 3.0 Interop tests added.
  - Many old tests rewritten, cleaned up and extended.
* Security fixes
  - A malicious certificate revocation list or timestamp response token
    would allow an attacker to read arbitrary memory.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Tue Oct 24 22:10:51 2023 UTC (3 years ago) by wiz
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +2 -1 lines
*: bump for openssl 3

Revision 1.8: download - view: text, markup, annotated - select for diffs
Mon Jan 16 22:00:53 2023 UTC (3 years, 10 months ago) by schmonz
Branches: MAIN
CVS tags: pkgsrc-2023Q3-base, pkgsrc-2023Q3, pkgsrc-2023Q2-base, pkgsrc-2023Q2, pkgsrc-2023Q1-base, pkgsrc-2023Q1
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +2 -2 lines
Update to 3.7.0. From the upstream LibreSSL changelog:

3.5.3:
  * Fix d2i_ASN1_OBJECT(). A confusion of two CBS resulted in advancing
    the passed *der_in pointer incorrectly. Thanks to Aram Sargsyan for
    reporting the issue and testing the fix.

3.6.0:
 * Internal improvements
   - Avoid expensive RFC 3779 checks during cert verification.
   - The templated ASN.1 decoder has been cleaned up, refactored,
     modernized with parts rewritten using CBB and CBS.
   - The ASN.1 time parser has been rewritten.
   - Rewrite and fix ASN1_STRING_to_UTF8().
   - Use asn1_abs_set_unused_bits() rather than inlining it.
   - Simplify ec_asn1_group2curve().
   - First pass at a clean up of ASN1_item_sign_ctx()
   - ssl_txt.c was cleaned up.
   - Internal function arguments and struct member have been changed
     to size_t.
   - Lots of missing error checks of EVP API were added.
   - Clean up and clarify BN_kronecker().
   - Simplify ASN1_INTEGER_cmp()
   - Rewrite ASN1_INTEGER_{get,set}() using CBS and CBB and reuse
     the ASN1_INTEGER functions for ASN1_ENUMERATED.
   - Use ASN1_INTEGER to parse and build {Z,}LONG_it
   - Refactored and cleaned up group (elliptic curve) handling in
     t1_lib.c.
   - Simplify certificate list handling code in the legacy server.
   - Make CBB_finish() fail if *out_data is not NULL.
   - Remove tls_buffer_set_data() and remove/revise callers.
   - Rewrite SSL{_CTX,}_set_alpn_protos() using CBS.
   - Simplify tlsext_supported_groups_server_parse().
   - Remove redundant length checks in tlsext parse functions.
   - Simplify tls13_server_encrypted_extensions_recv().
   - Add read and write support to tls_buffer.
   - Convert TLS transcript from BUF_MEM to tls_buffer.
   - Clear key on exit in PKCS12_gen_mac().
   - Minor fixes in PKCS12_parse().
   - Provide and use a primitive clear function for BIGNUM_it.
   - Use ASN1_INTEGER to encode/decode BIGNUM_it.
   - Add stack frames to AES-NI x86_64 assembly.
   - Use named initialisers for BIGNUMs.
   - Tidy up some of BN_nist_mod_*.
   - Expand BLOCK_CIPHER_* and related macros.
   - Avoid shadowing the cbs function parameter in
     tlsext_alpn_server_parse()
   - Deduplicate peer certificate chain processing code.
   - Make it possible to signal an error from an i2c_* function.
   - Rewrite i2c_ASN1_INTEGER() using CBB/CBS.
   - Remove UINT32_MAX limitation on ChaCha() and CRYPTO_chacha_20().
   - Remove bogus length checks from EVP_aead_chacha20_poly1305().
   - Reworked DSA_size() and ECDSA_size().
   - Stop using CBIGNUM_it internal to libcrypto.
   - Provide c2i_ASN1_ENUMERATED_cbs() and call it from
     asn1_c2i_primitive().
   - Ensure ASN.1 types are appropriately encoded.
   - Avoid recycling ASN1_STRINGs when decoding ASN.1.
   - Tidy up asn1_c2i_primitive() slightly.
   - Mechanically expand IMPLEMENT_BLOCK_CIPHER, IMPLEMENT_CFBR,
     BLOCK_CIPHER and the looney M_do_cipher macros.
   - Use correct length for EVP CFB mode ciphers.
   - Provide a version of ssl_msg_callback() that takes a CBS.
   - Use CBS to parse TLS alerts in the legacy stack.
   - Increment the input and output position for EVP AES CFB1.
   - Ensure there is no trailing data for a CCS received by the
     TLSv1.3 stack.
   - Use CBS when procesing a CCS message in the legacy stack.
   - Be stricter with middlebox compatibility mode in the TLSv1.3
     server.
 * Compatibility changes
   - The ASN.1 time parser has been refactored and rewritten using CBS.
     It has been made stricter in that it now enforces the rules from
     RFC 5280.
   - ASN1_AFLG_BROKEN was removed.
   - Error check tls_session_secret_cb() like OpenSSL.
   - Added ASN1_INTEGER_{get,set}_{u,}int64()
   - Move leaf certificate checks to the last thing after chain
     validation.
   - Added -s option to openssl(1) ciphers that only shows the ciphers
     supported by the specified protocol.
   - Use TLS_client_method() instead of TLSv1_client_method() in
     the openssl(1) ciphers command.
   - Validate the protocols in SSL{_CTX,}_set_alpn_protos().
   - Made TS and PKCS12 opaque.
   - Per RFC 7292, safeContentsBag is a SEQUENCE OF, not a SET OF.
   - Align PKCS12_key_gen_uni() with OpenSSL
   - Various PKCS12 and TS accessors were added. In particular, the
     TS_RESP_CTX_set_time_cb() function was added back.
   - Allow a NULL header in PEM_write{,_bio}()
   - Allow empty attribute sets in CSRs.
   - Adjust signatures of BIO_ctrl functions.
   - Provide additional defines for EVP AEAD.
   - Provide OPENSSL_cleanup().
   - Make BIO_info_cb() identical to bio_info_cb().
 * Bug fixes
   - Avoid use of uninitialized in BN_mod_exp_recp().
   - Fix X509_get_extension_flags() by ensuring that EXFLAG_INVALID is
     set on X509_get_purpose() failure.
   - Fix HMAC() with NULL key.
   - Add ERR_load_{COMP,CT,KDF}_strings() to ERR_load_crypto_strings().
   - Avoid strict aliasing violations in BN_nist_mod_*().
   - Do not return X509_V_ERR_UNSPECIFIED from X509_check_ca().
     No return value of X509_check_ca() indicates failure. Application
     code should therefore issue a checked call to X509_check_purpose()
     before calling X509_check_ca().
   - Rewrite and fix X509v3_asid_subset() to avoid segfaults on some
     valid input.
   - Call the ASN1_OP_D2I_PRE callback after ASN1_item_ex_new().
   - Fix d2i_ASN1_OBJECT to advance the *der_in pointer correctly.
   - Avoid use of uninitialized in ASN1_STRING_to_UTF8().
   - Do not pass uninitialized pointer to ASN1_STRING_to_UTF8().
   - Do not refuse valid IPv6 addresses in nc(1)'s HTTP CONNECT proxy.
   - Do not reject primes in trial divisions.
   - Error out on negative shifts in BN_{r,l}shift() instead of
     accessing arrays out of bounds.
   - Fix URI name constraints, allow for URI's with no host part.
   - Fix the legacy verifier callback behaviour for untrusted certs.
   - Correct serfver-side handling of TLSv1.3 key updates.
   - Plug leak in PKCS12_setup_mac().
   - Plug leak in X509V3_add1_i2d().
   - Only print X.509 versions we know about.
   - Avoid signed integer overflow due to unary negation
   - Initialize readbytes in BIO_gets().
   - Plug memory leak in CMS_add_simple_smimecap().
   - Plug memory leak in X509_REQ_print_ex().
   - Check HMAC() return value to avoid a later use of uninitialized.
   - Avoid potential NULL dereference in ssl_set_pkey().
   - Check return values in ssl_print_tmp_key().
   - Switch loop bounds from size_t to int in check_hosts().
   - Avoid division by zero if no connection was made in s_time.c.
   - Check sk_SSL_CIPHER_push() return value
   - Avoid out-of-bounds read in ssl_cipher_process_rulestr().
   - Use LONG_MAX as the limit for ciphers with long based APIs.
 * New features
   - EVP API for HKDF ported from OpenSSL and subsequently cleaned up.
   - The security level API (SSL_{,CTX}_{get,set}_security_level()) is
     now available. Callbacks and ex_data are not supported. Sane
     software will not be using this.
   - Experimental support for the BoringSSL QUIC API.
   - Add initial support for TS ESSCertIDv2 verification.
   - LibreSSL now uses the Baillie-PSW primality test instead of
     Miller-Rabin .

3.6.1:
 - Custom verification callbacks could cause the X.509 verifier to
   fail to store errors resulting from leaf certificate verification.
     Reported by Ilya Shipitsin.
 - Unbreak ASN.1 indefinite length encoding.
     Reported by Niklas Hallqvist.
 - Fix endian detection on macOS
     Reported by jiegec on Github

3.7.0:
    * Internal improvements
      - Remove dependency on system timegm() and gmtime() by replacing
        traditional Julian date conversion with POSIX epoch-seconds date
        conversion from BoringSSL.
      - Clean old and unused BN code dealing with primes.
      - Start rewriting name constraints code using CBS.
      - Remove support for the HMAC PRIVATE KEY.
      - Rework DSA signing and verifying internals.
      - First few passes on cleaning up the BN code.
      - Internal headers coming from OpenSSL are all called *_local.h now.
      - Rewrite TLSv1.2 key exporter.
      - Cleaned up and refactored various aspects of the legacy TLS stack.
    * Compatibility changes
      - BIO_read() and BIO_write() now behave more closely to OpenSSL 3 in
        various corner cases. More work is needed here.
    * Bug fixes
      - Add EVP_chacha20_poly1305() to the list of all ciphers.
      - Fix potential leaks of EVP_PKEY in various printing functions
      - Fix potential leak in OBJ_NAME_add().
      - Avoid signed overflow in i2c_ASN1_BIT_STRING().
      - Clean up EVP_PKEY_ASN1_METHOD related tables and code.
      - Fix long standing bugs BN_GF2m_poly2arr() and BN_GF2m_mod().
      - Fix segfaults in BN_{dec,hex}2bn().
      - Fix NULL dereference in x509_constraints_uri_host() reachable only
        in the process of generating certificates.
      - Fixed a variety of memory corruption issues in BIO chains coming
        from poor old and new API: BIO_push(), BIO_pop(), BIO_set_next().
      - Avoid potential divide by zero in BIO_dump_indent_cb()
    * Documentation improvements
      - Numerous improvements and additions for ASN.1, BIO, BN, and X.509.
      - The BN documentation is now considered to be complete.
    * Testing and Proactive Security
      - As always, new test coverage is added as bugs are fixed and
        subsystems are cleaned up.
      - Many old tests rewritten, cleaned up and extended.
    * New features
      - Added Ed25519 support both as a primitive and via OpenSSL's EVP
        interfaces.
      - X25519 is now also supported via EVP.
      - The OpenSSL 1.1 raw public and private key API is available with
        support for EVP_PKEY_ED25519, EVP_PKEY_HMAC and EVP_PKEY_X25519.
        Poly1305 is not currently supported via this interface.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Wed Nov 2 18:57:37 2022 UTC (4 years ago) by schmonz
Branches: MAIN
CVS tags: pkgsrc-2022Q4-base, pkgsrc-2022Q4
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +2 -2 lines
Update to 3.5.2. From the changelog:

- tls_signer: Replace ECDSA_METHOD with EC_KEY_METHOD
- doc: Note OpenSSL 3.0.0 compatibility in README

From the upstream LibreSSL changelog for 3.5.0:

* New Features
   - The RFC 3779 API was ported from OpenSSL. Many bugs were fixed,
     regression tests were added and the code was cleaned up.
   - Certificate Transparency was ported from OpenSSL. Many internal
     improvements were made, resulting in cleaner and safer code.
     Regress coverage was added. libssl does not yet make use of it.
* Portable Improvements
   - Fixed various POSIX compliance and other portability issues
     found by the port to the Sortix operating system.
   - Add libmd as platform specific libraries for Solaris.
     Issue reported from (ihsan <at> opencsw org) on libressl ML.
   - Set IA-64 compiler flag only if it is HP-UX with IA-64.
     Suggested from Larkin Nickle (me <at> larbob org) by libressl ML.
   - Enabled and scheduled Coverity scan.
     Contributed by Ilya Shipitsin (chipitsine <at> gmail com> on github.
* Compatibility Changes
   - Most structs that were previously defined in the following headers
     are now opaque as they are in OpenSSL 1.1:
     bio.h, bn.h, comp.h, dh.h, dsa.h, evp.h, hmac.h, ocsp.h, rsa.h,
     x509.h, x509v3.h, x509_vfy.h
   - Switch TLSv1.3 cipher names from AEAD- to OpenSSL's TLS_
     OpenSSL added the TLSv1.3 ciphersuites with "RFC names" instead
     of using something consistent with the previous naming. Various
     test suites expect these names (instead of checking for the much
     more sensible cipher numbers). The old names are still accepted
     as aliases.
   - Subject alternative names and name constraints are now validated
     when they are added to certificates. Various interoperability
     problems with stacks that validate certificates more strictly
     than OpenSSL can be avoided this way.
   - Attempt to opportunistically use the host name for SNI in s_client
* Bug fixes
   - In some situations, the verifier would discard the error on an
     unvalidated certificate chain. This would happen when the
     verification callback was in use, instructing the verifier to
     continue unconditionally. This could lead to incorrect decisions
     being made in software.
   - Avoid an infinite loop in SSL_shutdown()
   - Fix another return 0 bug in SSL_shutdown()
   - Handle zero byte reads/writes that trigger handshakes in the
     TLSv1.3 stack
   - A long standing memleak in libtls CRL handling was fixed
* Internal Improvements
   - Cache the SHA-512 hash instead of the SHA-1 hash and cache
     notBefore and notAfter times when X.509 certificates are parsed.
   - The X.509 lookup code has been simplified and cleaned up.
   - Fixed numerous issues flagged by coverity and the cryptofuzz
     project
   - Increased the number of Miller-Rabin checks in DH and DSA
     key/parameter generation
   - Started using the bytestring API in libcrypto for cleaner and
     safer code
   - Convert {i2d,d2i}_{,EC_,DSA_,RSA_}PUBKEY{,_bio,_fp}() to templated
     ASN1
   - Convert ASN1_OBJECT_new() to calloc()
   - Convert ASN1_STRING_type_new() to calloc()
   - Rewrite ASN1_STRING_cmp()
   - Use calloc() for X509_CRL_METHOD_new() instead of malloc()
   - Convert ASN1_PCTX_new() to calloc()
   - Replace asn1_tlc_clear and asn1_tlc_clear_nc macros with a
     function
   - Consolidate {d2i,i2d}_{pr,pu}.c
   - Remove handling of a NULL BUF_MEM from asn1_collect()
   - Pull the recursion depth check up to the top of asn1_collect()
   - Inline collect_data() in asn1_collect()
   - Convert asn1_d2i_ex_primitive()/asn1_collect() from BUF_MEM to CBB
   - Clean up d2i_ASN1_BOOLEAN() and i2d_ASN1_BOOLEAN()
   - Consolidate ASN.1 universal tag type data
   - Rewrite ASN.1 identifier/length parsing in CBS
   - Make OBJ_obj2nid() work correctly with NID_undef
   - tlsext_tick_lifetime_hint is now an uint32_t
   - Untangle ssl3_get_message() return values
   - Rename tls13_buffer to tls_buffer
   - Fold DTLS_STATE_INTERNAL into DTLS1_STATE
   - Provide a way to determine our maximum legacy version
   - Mop up enc_read_ctx and read_hash
   - Fold SSL_SESSION_INTERNAL into SSL_SESSION
   - Use ssl_force_want_read in the DTLS code
   - Add record processing limit to DTLS code
   - Add explicit CBS_contains_zero_byte() check in CBS_strdup()
   - Improve SNI hostname validation
   - Ensure SSL_set_tlsext_host_name() is given a valid hostname
   - Fix a strange check in the auto DH codepath
   - Factor out/rewrite DHE key exchange
   - Convert server serialisation of DHE parameters/public key to new
     functions
   - Check DH public key in ssl_kex_peer_public_dhe()
   - Move the minimum DHE key size check into ssl_kex_peer_params_dhe()
   - Clean up and refactor server side DHE key exchange
   - Provide CBS_get_last_u8()
   - Provide CBS_get_u64()
   - Provide CBS_add_u64()
   - Provide various CBS_peek_* functions
   - Use CBS_get_last_u8() to find the content type in TLSv1.3 records
   - unifdef TLS13_USE_LEGACY_CLIENT_AUTH
   - Correct SSL_get_peer_cert_chain() when used with the TLSv1.3 stack
   - Only allow zero length key shares when we know we're doing HRR
   - Pull key share group/length CBB code up from
     tls13_key_share_public()
   - Refactor ssl3_get_server_kex_ecdhe() to separate parsing and
     validation
   - Return 0 on failure from send/get kex functions in the legacy
     stack
   - Rename tls13_key_share to tls_key_share
   - Allocate and free the EVP_AEAD_CTX struct in
     tls13_record_protection
   - Convert legacy TLS client to tls_key_share
   - Convert legacy TLS server to tls_key_share
   - Stop attempting to duplicate the public and private key of dh_tmp
   - Rename dh_tmp to dhe_params
   - Rename CERT to SSL_CERT and CERT_PKEY to SSL_CERT_PKEY
   - Clean up pkey handling in ssl3_get_server_key_exchange()
   - Fix GOST skip certificate verify handling
   - Simplify tlsext_keyshare_server_parse()
   - Plumb decode errors through key share parsing code
   - Simplify SSL_get_peer_certificate()
   - Cleanup/simplify ssl_cert_type()
   - The S3I macro was removed
   - The openssl(1) cms and smime subcommands option handling was
     converted and the C source was cleaned up.
* Documentation improvements
   - 45 new manual pages, most of which were written from scratch.
     Documentation coverage of ASN.1 and X.509 code has been
     significantly improved.

Upstream 3.5.1 changelog:

* A malicious certificate can cause an infinite loop.
  Reported by and fix from Tavis Ormandy and David Benjamin, Google.

Upstream 3.5.2 changelog:

This is the first stable release for the 3.5.x branch, as shipped with
OpenBSD 7.1.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Sat Dec 18 13:55:18 2021 UTC (4 years, 10 months ago) by schmonz
Branches: MAIN
CVS tags: pkgsrc-2022Q3-base, pkgsrc-2022Q3, pkgsrc-2022Q2-base, pkgsrc-2022Q2, pkgsrc-2022Q1-base, pkgsrc-2022Q1, pkgsrc-2021Q4-base, pkgsrc-2021Q4
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +2 -2 lines
Update to 3.4.2. From the LibreSSL changelog:

* In some situations the X.509 verifier would discard an error on an
  unverified certificate chain, resulting in an authentication bypass.
  Thanks to Ilya Shipitsin and Timo Steinlein for reporting.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Mon Oct 18 14:33:04 2021 UTC (5 years ago) by schmonz
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +2 -2 lines
Update to 3.4.1. From the changelog:

The shared library major version of libtls has been bumped to 22.

tls_connect(3) and friends now strip a trailing dot from servername.

This patch imports the missing scripts/wrap-compiler-for-flag-check
file, which was incorrectly causing compiler flags to not be used.

From the upstream LibreSSL changelog:

* New Features
  - Added support for OpenSSL 1.1.1 TLSv1.3 APIs.
  - Enabled the new X.509 validator to allow verification of
    modern certificate chains.
* Portable Improvements
  - Added Universal Windows Platform (UWP) build support.
  - Fixed mingw-w64 builds on newer versions with missing SSP support.
* API and Documentation Enhancements
  - Added the following APIs from OpenSSL
    BN_bn2binpad BN_bn2lebinpad BN_lebin2bn EC_GROUP_get_curve
    EC_GROUP_order_bits EC_GROUP_set_curve
    EC_POINT_get_affine_coordinates
    EC_POINT_set_affine_coordinates
    EC_POINT_set_compressed_coordinates EVP_DigestSign
    EVP_DigestVerify SSL_CIPHER_find SSL_CTX_get0_privatekey
    SSL_CTX_get_max_early_data SSL_CTX_get_ssl_method
    SSL_CTX_set_ciphersuites SSL_CTX_set_max_early_data
    SSL_CTX_set_post_handshake_auth SSL_SESSION_get0_cipher
    SSL_SESSION_get_max_early_data SSL_SESSION_is_resumable
    SSL_SESSION_set_max_early_data SSL_get_early_data_status
    SSL_get_max_early_data SSL_read_early_data SSL_set0_rbio
    SSL_set_ciphersuites SSL_set_max_early_data
    SSL_set_post_handshake_auth
    SSL_set_psk_use_session_callback
    SSL_verify_client_post_handshake SSL_write_early_data
  - Added AES-GCM constants from RFC 7714 for SRTP.
* Compatibility Changes
  - Implement flushing for TLSv1.3 handshakes behavior, needed for Apache.
  - Call the info callback on connect/accept exit in TLSv1.3,
    needed for p5-Net-SSLeay.
  - Default to using named curve parameter encoding from
    pre-OpenSSL 1.1.0, adding OPENSSL_EC_EXPLICIT_CURVE.
  - Do not ignore SSL_TLSEXT_ERR_FATAL from the ALPN callback.
* Testing and Proactive Security
  - Added additional state machine test coverage.
  - Improved integration test support with ruby/openssl tests.
  - Error codes and callback support in new X.509 validator made
    compatible with p5-Net_SSLeay tests.
* Internal Improvements
  - Numerous fixes and improvements to the new X.509 validator to
    ensure compatible error codes and callback support compatible
    with the legacy OpenSSL validator.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Sat May 22 09:12:31 2021 UTC (5 years, 5 months ago) by schmonz
Branches: MAIN
CVS tags: pkgsrc-2021Q3-base, pkgsrc-2021Q3, pkgsrc-2021Q2-base, pkgsrc-2021Q2
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +2 -2 lines
Update to 3.3.3, syncing with LibreSSL. No known changes.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Sat May 1 08:07:24 2021 UTC (5 years, 6 months ago) by schmonz
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +2 -2 lines
Update to 3.3.2. From the (OpenBSD 6.9 LibreSSL) changelog:

# New Features

- Support for DTLSv1.2.
- Continued rewrite of the record layer for the legacy stack.
- Numerous bugs and interoperability issues were fixed in the new
  verifier. A few bugs and incompatibilities remain, so this release
  uses the old verifier by default.
- The OpenSSL 1.1 TLSv1.3 API is not yet available.


# Portable Improvements

- Added '--enable-libtls-only' build option, which builds and
  installs a statically-linked libtls, skipping libcrypto and libssl.
  This is useful for systems that ship with OpenSSL but wish to also
  package libtls.
- Update getentropy on Windows to use Cryptography Next Generation
  (CNG). wincrypt is deprecated and no longer works with newer Windows
  environments, such as in Windows Store apps.


# API and Documentation Enhancements

- Add a number of RPKI OIDs from RFC 6482, 6484, 6493, 8182, 8360,
  draft-ietf-sidrops-rpki-rta, and draft-ietf-opsawg-finding-geofeeds.
- Add support for
  [SSL_get_shared_ciphers(3)](https://man.openbsd.org/SSL_get_shared_ciphers.3)
  with TLSv1.3.
- Add DTLSv1.2 methods.
- Implement SSL_is_dtls(3) and use it internally in place of the
  SSL_IS_DTLS macro.
- Provide
  [EVP_PKEY_new_CMAC_KEY(3)](https://man.openbsd.org/EVP_PKEY_new_CMAC_KEY.3).
- Add missing prototype for
  [d2i_DSAPrivateKey_fp(3)](https://man.openbsd.org/d2i_DSAPrivateKey_fp.3) to x509.h.
- Add DTLSv1.2 to [openssl(1)](https://man.openbsd.org/openssl.1)
  s_server and s_client protocol message logging.
- Provide
  [SSL_use_certificate_chain_file(3)](https://man.openbsd.org/SSL_use_certificate_chain_file.3).
- Provide
  [SSL_set_hostflags(3)](https://man.openbsd.org/SSL_set_hostflags.3)
  and
  [SSL_get0_peername(3)](https://man.openbsd.org/SSL_get0_peername.3).
- Provide various DTLSv1.2 specific functions and defines.
- Document meaning of '*' in the genrsa output.
- Updated documentation for
  SSL_get_shared_ciphers(3)](https://man.openbsd.org/SSL_get_shared_ciphers.3).
- Add documentation for
  [SSL_get_finished(3)](https://man.openbsd.org/SSL_get_finished.3).
- Document
  [EVP_PKEY_new_CMAC_key(3)](https://man.openbsd.org/EVP_PKEY_new_CMAC_key.3).
- Document
  [SSL_use_certificate_chain_file(3)](https://man.openbsd.org/SSL_use_certificate_chain_file.3).
- Document
  [SSL_set_hostflags(3)](https://man.openbsd.org/SSL_set_hostflags.3)
  and
  [SSL_get0_peername(3)](https://man.openbsd.org/SSL_get0_peername.3).
- Update [SSL_get_version(3)](https://man.openbsd.org/SSL_get_version.3)
  manual for DTLSv.1.2 support.
- Make supported protocols and options for DHE params more prominent in
  [tls_config_set_protocols(3)](https://man.openbsd.org/tls_config_set_protocols.3).
- Various documentation improvements around TLS methods.


# Compatibility Changes

- Make [openssl(1)](https://man.openbsd.org/openssl.3) s_server ignore
  -4 and -6 for compatibility with OpenSSL.
- Set SO_REUSEADDR on the server socket in the
  [openssl(1)](https://man.openbsd.org/openssl.1) ocsp command.
- Send a host header with OCSP queries to make
  [openssl(1)](https://man.openbsd.org/openssl.1) ocsp work with some
  widely used OCSP responders.
- Add ability to [ocspcheck(8)](https://man.openbsd.org/ocspcheck.8) to
  parse a port in the specified OCSP URL.
- Implement auto chain for the TLSv1.3 server since some software
  relies on this.
- Implement key exporter for TLSv1.3.
- Align
  [SSL_get_shared_ciphers(3)](https://man.openbsd.org/SSL_get_shared_ciphers.3)
  with OpenSSL. This takes into account that it never returned server
  ciphers, so now it will fail when called from the client side.
- Sync cert.pem with Mozilla NSS root CAs except "GeoTrust Global CA".
- Make
  [SSL{_CTX,}_get_{min,max}_proto_version(3)](https://man.openbsd.org/SSL_CTX_get_min_proto_version.3)
  return a version of zero if the minimum or maximum has been set to
  zero to match OpenSSL's behavior.
- Add DTLSv1.2 support to
  [openssl(1)](https://man.openbsd.org/openssl.1) s_client/s_server.


# Testing and Proactive Security

- Malformed ASN.1 in a certificate revocation list or a timestamp
  response token can lead to a NULL pointer dereference.
- Pull in fix for
  [EVP_CipherUpdate(3)](https://man.openbsd.org/EVP_CipherUpdate.3)
  overflow from OpenSSL.
- Use EXFLAG_INVALID to handle out of memory and parse errors in
  x509v3_cache_extensions().
- Refactor and clean up
  [ocspcheck(8)](https://man.openbsd.org/ocspcheck.8) and add
  regression tests.


# Internal Improvements

- Further cleanup of the DTLS record handling.
- Continue the replacement of the TLSv1.2 record layer by reimplementing
  the read side of the TLSv1.2 record handling.
- Replace DTLSv1_enc_data() with TLSv1_1_enc_data().
- Merge d1_{clnt,srvr}.c into ssl_{clnt,srvr}.c.
- Add const to ssl_ciphers and tls1[23]_sigalgs* to push them into
  .data.rel.ro and .rodata, respectively.
- Add a const qualifier to srtp_known_profiles.
- Simplify TLS method by removing the client and server specific methods
  internally.
- Avoid casting away const in ssl_ctx_make_profiles().
- Avoid explicitly conditioning an assert on DTLS1_VERSION to make the
  assert work for newer DTLS versions.
- Merge SSL_ENC_METHOD into SSL_METHOD_INTERNAL.
- Add a flag to mark DTLS methods as DTLS to have an easy way to
  recognize DTLS methods that avoids inspecting the version number.
- Mark a few more internal static tables const.
- Switch finish{,_peer}_md_len from an int to a size_t.
- Use EVP_MD_MAX_MD_SIZE instead of 2 * EVP_MD_MAX_MD_SIZE as size for
  cert_verify_md[], finish_md[] and peer_finish_md[]. The factor 2 was a
  historical artefact.
- Free struct members in tls13_record_layer_free() in their natural
  order for reviewability.
- Use consistent names in tls13_{client,server}_finished_{recv,send}().
- Add tls13_secret_{init,cleanup}() and use them throughout the TLSv1.3
  code base.
- Move the read MAC key into the TLSv1.2 record layer.
- Make tls12_record_layer_free() NULL safe.
- Split the record protection from the TLSv1.2 record layer.
- Clean up sequence number handling in the new TLSv1.2 record layer.
- Clean up sequence number handling in DTLS.
- Clean up dtls1_reset_seq_numbers().
- Factor out code for explicit IV length, block size and MAC length from
  tls12_record_layer_open_record_protected_cipher().
- Provide record layer overhead for DTLS.
- Provide functions to determine if TLSv1.2 record protection is
  engaged.
- Add code to handle change of cipher state in the new TLSv1.2
  record layer.
- Mop up now unused dtls1_build_sequence_numbers() function.
- Allow setting a keypair on a tls context without specifying the
  private key, and fake it internally in libtls. This removes the need
  for privsep engines like relayd to use bogus keys.
- Skip the private key check for fake private keys.
- Move the private key setup from tls_configure_ssl_keypair() to a
  helper function with proper error checking.
- Change the internal tls_configure_ssl_keypair() function to return -1
  instead of 1 on failure.
- Move sequence numbers into the new TLSv1.2 record layer.
- Move AEAD handling into the new TLSv1.2 record layer.
- Factor out legacy stack version checks.
- Correct handshake MAC/PRF for various TLSv1.2 cipher suites which were
  originally added with the default handshake MAC and PRF rather than
  the SHA256 handshake MAC and PRF.
- Absorb ssl3_get_algorithm2() into ssl_get_handshake_evp_md().
- Use dtls1_record_retrieve_buffered_record() to load buffered
  application data.
- Enforce read ahead with DTLS.
- Remove bogus DTLS checks that disabled ECC and OCSP.
- Clean up and simplify dtls1_get_cipher().
- Group HelloVerifyRequest decoding and add missing check for
  trailing data.
- Revise HelloVerifyRequest handling for DTLSv1.2.
- Handle DTLS1_2_VERSION in various places.
- Rename the "truncated" label into "decode_err" and the "f_err" label
  into "fatal_err".
- Factor out and change some of the legacy client version code.
- Simplify version checks in the TLSv1.3 client. Ensure that the server
  announced TLSv1.3 and nothing higher and check that the legacy_version
  is set to TLSv1.2 as required by RFC 8446.
- Only use TLS versions internally rather than both TLS and DTLS
  versions since the latter are the one's complement of the human
  readable version numbers, which means that newer versions
  decrease in value.
- Identify DTLS based on the version major value.
- Move handling of cipher/hash based cipher suites into the new
  record layer.
- Add tls12_record_protection_unused() and call it from CCS functions.
- Move key/IV length checks closer to usage sites. Also add explicit
  checks against
  [EVP_CIPHER_{iv,key}_length()](https://man.openbsd.org/EVP_CIPHER_iv_length.3).
- Replace two handrolled tls12_record_protection_engaged().
- Improve internal version handling: add handshake fields for our
  minimum version, our maximum version and the TLS version negotiated
  during the handshake. Convert most of the internal code to use these
  version fields.
- Guard against future internal use of
  TLS1_get_{client,}_version() macros.
- Remove the internal ssl_downgrade_max_version() function which is no
  longer needed.
- Add support for DTLSv1.2 version handling.
- Remove no longer needed read ahead workarounds in the s_client
  and s_server.
- Split TLSv1.3 record protection from record layer.
- Move the TLSv1.3 handshake struct inside the shared handshake struct.
- Fully initialize rrec in tls12_record_layer_open_record_protected() to
  avoid confusing some static analyzers.
- Use tls_set_errorx() on OCSP_basic_verify() failure since the latter
  does not set errno.
- Convert openssl(1) x509 to new option handling and do the usual clean
  up that goes along with it.
- Add SSL_HANDSHAKE_TLS12 for TLSv1.2 specific handshake data.
- Rename new_cipher to cipher to align naming with keyblock or other
  parts of the handshake data.
- Move the TLSv1.2 record number increment into the new record layer.
- Move finished and peer finished into the handshake struct.
- Remove pointless assignment in SSL_get0_alpn_selected().
- Add some error checking to openssl(1) x509.


# Bug Fixes

- Move point-on-curve check to set_affine_coordinates to avoid verifying
  ECDSA signatures with unchecked public keys.
- Fix [SSL_is_server(3)](https://man.openbsd.org/SSL_is_server.3) to
  behave as documented by re-introducing the client-specific methods.
- Avoid undefined behavior due to memcpy(NULL, NULL, 0).
- Make SSL_get{,_peer}_finished() work when used with TLSv1.3.
- Correct the return value type from ERR_peek_error() to a long.
- Avoid use of uninitialized in ASN1_time_parse() which could happen on
  parsing UTCTime if the caller did not initialize the passed struct tm.
- Destroy the mutex in a tls_config object on tls_config_free().
- Free alert_data and phh_data in tls13_record_layer_free(). These could
  leak if [SSL_shutdown(3)](https://man.openbsd.org/SSL_shutdown.3) or
  [tls_close(3)](https://man.openbsd.org/tls_close.3) were called after
  closing the underlying socket().
- Gracefully handle root certificates being both trusted and untrusted.
- Handle X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE in the new verifier.
- Use the legacy verifier when building auto chains for TLS.
- Search the intermediates only after searching the root certs in the
  new verifier to avoid problems with the legacy callback.
- Bail out early after finding a single chain in the new verifier, if we
  have been called via the legacy verifier API.
- Set (invalid and likely incomplete) chain on the xsc on chain build
  failure prior to calling the callback. This is required by various
  callers, including auto chain.
- Remove direct assignment of aead_ctx to avoid a leak.
- Fail early in legacy exporter if the master secret is not available to
  avoid a segfault if it is called when the handshake is not completed.
- Only print the certificate file once on verification failure.
- Fix an off-by-one in x509_verify_set_xsc_chain() to make sure that the
  new validator checks for EXFLAG_CRITICAL in
  x509_vfy_check_chain_extension() for all untrusted certs in the chain.
  Take into account that the root is not necessarily trusted.
- Avoid passing last and depth to x509_verify_cert_error() on ENOMEM.
- Fix two bugs in the legacy verifier that resulted from refactoring
  of [X509_verify_cert(3)](https://man.openbsd.org/X509_verify_cert.3)
  for the new verifier: a return value was incorrectly treated as
  boolean, making it insufficient to decide whether validation should
  carry on or not.
- Fix checks for memory caps of constraints names. There are internal
  caps on the number of name constraints and other names, that the new
  name constraints code allocates per cert chain. These limits were
  checked too late, making them only partially effective.
- Fix a copy-paste error - skid was confused with an akid when checking
  for EXFLAG_INVALID. This broke OCSP validation with certain mirrors.
- Avoid a use-after-scope in tls13_cert_add().
- Avoid mangled output in BIO_debug_callback().
- Fix client initiated renegotiation by replacing use of
  s->internal-type with s->server.
- Avoid transcript initialization when sending a TLS HelloRequest,
  fixing server initiated renegotiation.
- Avoid leaking param->name in x509_verify_param_zero().
- Avoid a leak in an error path in openssl(1) x509.
- When sending an alert in TLSv1.3, only set its error code when no
  other error was set previously. Certain clients rely on specific
  SSL_R_ error codes to identify that they are dealing with a self
  signed cert.
- When switching from the TLSv1.3 stack to the legacy stack include a
  TLS record header. This is necessary if there is more than one
  handshake message in the TLS plaintext record.
- Fix resource handling on error in OCSP_request_add0_id().
- Make sure there is enough room for stashing the handshake message when
  switching to the legacy TLS stack.
- Fix a memory leak in the openssl(1) s_client.
- Unbreak DTLS retransmissions for flights that include a CCS.
- If x509_verify() fails, ensure that the error is set on both the
  x509_verify_ctx() and its store context to make some failures visible
  from SSL_get_verify_result().
- Use the X509_STORE_CTX get_issuer() callback from the new X.509
  verifier to fix hashed certificate directories.
- Only check
  [BIO_should_read(3)](https://man.openbsd.org/BIO_should_read.3) on
  read and
  [BIO_should_write(3)](https://man.openbsd.org/BIO_should_write.3) on
  write. Previously,
  [BIO_should_write(3)](https://man.openbsd.org/BIO_should_write.3) was
  also checked after read and
  [BIO_should_read(3)](https://man.openbsd.org/BIO_should_read.3) after
  write which could cause stalls in software that uses the same BIO for
  read and write.
- In [openssl(1)](https://man.openbsd.org/openssl.1) verify, also check
  for error on the store context since the return value of
  [X509_verify_cert(3)](https://man.openbsd.org/X509_verify_cert.3) is
  unreliable in presence of a callback that returns 1 too often.
- Handle additional certificate error cases in the new X.509 verifier.
  Keep track of the errors encountered if a verify callback tells the
  verifier to continue and report them back via the error on the store
  context. This mimics the behavior of the old verifier that would
  persist the first error encountered while building the chain.
- Report specific failures for "self signed certificates" in a way
  compatible with the old verifier since software relies on the
  error code.
- Plug a large memory leak in the new verifier caused by calling
  X509_policy_check(3) repeatedly.
- Avoid leaking memory in x509_verify_chain_dup().

Revision 1.2: download - view: text, markup, annotated - select for diffs
Tue Mar 9 09:55:30 2021 UTC (5 years, 8 months ago) by schmonz
Branches: MAIN
CVS tags: pkgsrc-2021Q1-base, pkgsrc-2021Q1
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +2 -2 lines
Update to 3.3.1p1. From the changelog:

- build: Add OpenSSL includes to libcompat HEAD master
  Some compat sources (getentropy_linux.c for example) require OpenSSL.

Revision 1.1: download - view: text, markup, annotated - select for diffs
Fri Nov 27 10:19:38 2020 UTC (5 years, 11 months ago) by schmonz
Branches: MAIN
CVS tags: pkgsrc-2020Q4-base, pkgsrc-2020Q4
Initial import of libretls, a port of libtls to OpenSSL.

libtls is a new TLS library, designed to make it easier to write
foolproof applications. LibreTLS is a port of libtls from LibreSSL
to OpenSSL.

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options

CVSweb <webmaster@jp.NetBSD.org>