[openssl/openssl] c0fd83: Add a build target for MSVC 2013

"'Bob Beck' via openssl-commits" <[email protected]>
Newsgroups gmane.comp.encryption.openssl.cvs
Message-ID <openssl/openssl/push/refs/heads/master/[email protected]>
  Branch: refs/heads/master
  Home:   https://github.com/openssl/openssl
  Commit: c0fd83dc7c25f046c266a44ccb178a8b7e8a4572
      https://github.com/openssl/openssl/commit/c0fd83dc7c25f046c266a44ccb178a8b7e8a4572
  Author: Bob Beck <[email protected]>
  Date:   2026-08-26 (Wed, 26 Aug 2026)

  Changed paths:
    M CHANGES.md
    A Configurations/50-win-msvc2013.conf
    M apps/include/platform.h
    M apps/lib/build.info
    M crypto/bio/bio_print.c
    M crypto/build.info
    A crypto/msvc2013_snprintf.c
    M include/internal/bio.h
    M include/internal/e_os.h
    M ssl/build.info

  Log Message:
  -----------
  Add a build target for MSVC 2013

Apparently it is desired to keep this on life support.

So we add a build target for this non-C99 platform, and
provide internal versions of snprintf and vsnprintf for use
only on this platform that match the C99 semantics.

This allows us to use C99 semantics normally elsewhere.

Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Andrew Dinh <[email protected]>
MergeDate: Wed Aug 26 16:20:04 2026
(Merged from https://github.com/openssl/openssl/pull/31640)


  Commit: 9308b792b881c91192f0dda4a24f755900d36451
      https://github.com/openssl/openssl/commit/9308b792b881c91192f0dda4a24f755900d36451
  Author: Bob Beck <[email protected]>
  Date:   2026-08-26 (Wed, 26 Aug 2026)

  Changed paths:
    M CHANGES.md
    M crypto/bio/bio_print.c
    M doc/man3/BIO_printf.pod
    M include/openssl/bio.h.in
    M providers/fips/fipsprov.c
    M test/bio_core_test.c
    M util/libcrypto.num

  Log Message:
  -----------
  Deprecate BIO_snprintf() and BIO_vsnprintf().

They were added when C99 was not a thing, and when implementations
differed, to support platforms that did not have them. This
is no longer the case.

They return -1 on truncation rather than the would-have-been length
that snprintf() returns, leading callers who write to the standard
contract to produce bugs. Use snprintf() and vsnprintf() instead.

Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Andrew Dinh <[email protected]>
MergeDate: Wed Aug 26 16:20:06 2026
(Merged from https://github.com/openssl/openssl/pull/31640)


  Commit: c192d4b6f82fd34fa0191c0fde6c3b8ab5240123
      https://github.com/openssl/openssl/commit/c192d4b6f82fd34fa0191c0fde6c3b8ab5240123
  Author: Bob Beck <[email protected]>
  Date:   2026-08-26 (Wed, 26 Aug 2026)

  Changed paths:
    M apps/cmp.c
    M apps/enc.c
    M apps/kdf.c
    M apps/lib/apps.c
    M apps/lib/http_server.c
    M apps/lib/log.c
    M apps/lib/opt.c
    M apps/lib/s_cb.c
    M apps/lib/vms_term_sock.c
    M apps/mac.c
    M apps/openssl.c
    M apps/passwd.c
    M apps/pkeyutl.c
    M apps/rehash.c
    M apps/s_client.c
    M apps/speed.c
    M crypto/asn1/a_strex.c
    M crypto/asn1/asn1_parse.c
    M crypto/bio/bio_addr.c
    M crypto/bio/bio_cb.c
    M crypto/bio/bio_dump.c
    M crypto/bio/bss_log.c
    M crypto/bn/bn_print.c
    M crypto/cmp/cmp_http.c
    M crypto/cmp/cmp_util.c
    M crypto/conf/conf_def.c
    M crypto/conf/conf_mod.c
    M crypto/ct/ct_prn.c
    M crypto/cversion.c
    M crypto/dso/dso_dl.c
    M crypto/dso/dso_dlfcn.c
    M crypto/dso/dso_win32.c
    M crypto/err/err.c
    M crypto/err/err_prn.c
    M crypto/evp/ctrl_params_translate.c
    M crypto/http/http_client.c
    M crypto/http/http_lib.c
    M crypto/info.c
    M crypto/mem.c
    M crypto/objects/obj_dat.c
    M crypto/pem/pem_lib.c
    M crypto/pem/pem_pkey.c
    M crypto/property/property_parse.c
    M crypto/ts/ts_rsp_sign.c
    M crypto/x509/by_dir.c
    M crypto/x509/v3_info.c
    M crypto/x509/v3_san.c
    M crypto/x509/v3_utl.c
    M providers/implementations/storemgmt/file_store.c
    M ssl/quic/qlog.c
    M ssl/quic/qlog_event_helpers.c
    M ssl/ssl_ciph.c
    M test/cmactest.c
    M test/drbgtest.c
    M test/dtls_mtu_test.c
    M test/ech_test.c
    M test/errtest.c
    M test/evp_pkey_provided_test.c
    M test/evp_test.c
    M test/hmactest.c
    M test/hpke_test.c
    M test/http_test.c
    M test/pkcs12_format_test.c
    M test/property_test.c
    M test/provider_internal_test.c
    M test/provider_test.c
    M test/quic-openssl-docker/hq-interop/quic-hq-interop.c
    M test/quic_multistream_test.c
    M test/radix/quic_bindings.c
    M test/ssl_old_test.c
    M test/ssl_test.c
    M test/sslapitest.c
    M test/testutil/testutil_init.c
    M test/threadstest.c
    M test/tls-provider.c
    M test/v3nametest.c
    M test/x509_time_test.c

  Log Message:
  -----------
  Convert BIO_snprintf() callers that ignore the return value to snprintf().

Where the return value is discarded, BIO_snprintf() and snprintf() are
interchangeable: both write the same bytes and NUL-terminate the buffer.

The conversion is mechanical.

Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Andrew Dinh <[email protected]>
MergeDate: Wed Aug 26 16:20:07 2026
(Merged from https://github.com/openssl/openssl/pull/31640)


  Commit: cae917e2eedc59d10af19292b0c56db281162389
      https://github.com/openssl/openssl/commit/cae917e2eedc59d10af19292b0c56db281162389
  Author: Bob Beck <[email protected]>
  Date:   2026-08-26 (Wed, 26 Aug 2026)

  Changed paths:
    M apps/lib/http_server.c
    M apps/rehash.c
    M crypto/cmp/cmp_client.c
    M crypto/cmp/cmp_ctx.c
    M crypto/cmp/cmp_status.c
    M crypto/http/http_client.c
    M ssl/ssl_cert.c
    M test/cmp_extracerts_dos_test.c
    M test/conf_include_test.c

  Log Message:
  -----------
  Convert BIO_snprintf() callers whose existing checks already work
under snprintf semantics.

These call sites already guarded the result with the C99 truncation
idiom, so they can simply use snprintf as a replacement as is.

Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Andrew Dinh <[email protected]>
MergeDate: Wed Aug 26 16:20:09 2026
(Merged from https://github.com/openssl/openssl/pull/31640)


  Commit: b2cd01d29910926eaff8497de2918b8d10df6095
      https://github.com/openssl/openssl/commit/b2cd01d29910926eaff8497de2918b8d10df6095
  Author: Bob Beck <[email protected]>
  Date:   2026-08-26 (Wed, 26 Aug 2026)

  Changed paths:
    M crypto/asn1/a_time.c

  Log Message:
  -----------
  Convert BIO_snprintf() to snprintf() in ossl_asn1_time_from_tm()

Ensure that we verify the snprintf() result before storing it as the
length. The function assigned the BIO_snprintf() return value directly
to tmps->length, which would store -1 on truncation with BIO_snprintf().

Likely not a serious issue as most callers bound the values, but this
is still reachable via some public API.

Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Andrew Dinh <[email protected]>
MergeDate: Wed Aug 26 16:20:11 2026
(Merged from https://github.com/openssl/openssl/pull/31640)


  Commit: 486ec1f606c989dc4bd350eeb7f30715078073bd
      https://github.com/openssl/openssl/commit/486ec1f606c989dc4bd350eeb7f30715078073bd
  Author: Bob Beck <[email protected]>
  Date:   2026-08-26 (Wed, 26 Aug 2026)

  Changed paths:
    M apps/s_client.c
    M apps/s_server.c
    M apps/s_time.c
    M crypto/asn1/asn1_parse.c
    M providers/implementations/signature/rsa_sig.c
    M test/endecode_test.c
    M test/ossl_store_test.c
    M test/ssl_old_test.c

  Log Message:
  -----------
  Convert BIO_snprintf() callers that detect truncation to snprintf().

These sites used the return value to detect truncation, then used the
buffer as is. Convert them to detect truncation in the standard
snprintf() way.

Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Andrew Dinh <[email protected]>
MergeDate: Wed Aug 26 16:20:13 2026
(Merged from https://github.com/openssl/openssl/pull/31640)


  Commit: 5a4883d5a32571b884f8c4e706e3726f761de7cb
      https://github.com/openssl/openssl/commit/5a4883d5a32571b884f8c4e706e3726f761de7cb
  Author: Bob Beck <[email protected]>
  Date:   2026-08-26 (Wed, 26 Aug 2026)

  Changed paths:
    M apps/lib/app_params.c

  Log Message:
  -----------
  Convert BIO_snprintf() usage in describe_param_type()

This adds the correct truncation check for snprintf() to
each block that advances the index.

Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Andrew Dinh <[email protected]>
MergeDate: Wed Aug 26 16:20:14 2026
(Merged from https://github.com/openssl/openssl/pull/31640)


  Commit: 59508f6cee789caf703cb495de1fefcb38e58083
      https://github.com/openssl/openssl/commit/59508f6cee789caf703cb495de1fefcb38e58083
  Author: Bob Beck <[email protected]>
  Date:   2026-08-26 (Wed, 26 Aug 2026)

  Changed paths:
    M crypto/pem/pem_lib.c

  Log Message:
  -----------
  Convert PEM_dek_info() to snprintf()

Add the correct snprintf() guards to each advance.

Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Andrew Dinh <[email protected]>
MergeDate: Wed Aug 26 16:20:16 2026
(Merged from https://github.com/openssl/openssl/pull/31640)


  Commit: a6d8d74310eb4e3e3a18faf6391c07ede2f8e2e0
      https://github.com/openssl/openssl/commit/a6d8d74310eb4e3e3a18faf6391c07ede2f8e2e0
  Author: Bob Beck <[email protected]>
  Date:   2026-08-26 (Wed, 26 Aug 2026)

  Changed paths:
    M crypto/bn/bn_conv.c

  Log Message:
  -----------
  Convert BIO_snprintf() in BN_bn2dec() to snprintf() and guard each advance.

Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Andrew Dinh <[email protected]>
MergeDate: Wed Aug 26 16:20:17 2026
(Merged from https://github.com/openssl/openssl/pull/31640)


  Commit: f88b214ad6168dfecf32210f13e4b9e726407a28
      https://github.com/openssl/openssl/commit/f88b214ad6168dfecf32210f13e4b9e726407a28
  Author: Bob Beck <[email protected]>
  Date:   2026-08-26 (Wed, 26 Aug 2026)

  Changed paths:
    M crypto/bio/bio_cb.c

  Log Message:
  -----------
  Convert BIO_snprintf() in BIO_debug_callback_ex() to snprintf() and guard the offset.

Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Andrew Dinh <[email protected]>
MergeDate: Wed Aug 26 16:20:19 2026
(Merged from https://github.com/openssl/openssl/pull/31640)


  Commit: 56c269eab4e16b36b03e60ad8bdaad279a41de61
      https://github.com/openssl/openssl/commit/56c269eab4e16b36b03e60ad8bdaad279a41de61
  Author: Bob Beck <[email protected]>
  Date:   2026-08-26 (Wed, 26 Aug 2026)

  Changed paths:
    M crypto/bio/bio_dump.c

  Log Message:
  -----------
  Convert BIO_snprintf() in BIO_dump_indent_cb() to snprintf() and guard the offset.

Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Andrew Dinh <[email protected]>
MergeDate: Wed Aug 26 16:20:21 2026
(Merged from https://github.com/openssl/openssl/pull/31640)


  Commit: 37246734f6e824b558b1a267301adee3b0104974
      https://github.com/openssl/openssl/commit/37246734f6e824b558b1a267301adee3b0104974
  Author: Bob Beck <[email protected]>
  Date:   2026-08-26 (Wed, 26 Aug 2026)

  Changed paths:
    M crypto/bio/bio_addr.c
    M crypto/x509/v3_utl.c
    M test/x509_internal_test.c

  Log Message:
  -----------
  Convert BIO_snprintf() in ossl_ipaddr_to_asc() to snprintf() and guard the loop advance.

Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Andrew Dinh <[email protected]>
MergeDate: Wed Aug 26 16:20:22 2026
(Merged from https://github.com/openssl/openssl/pull/31640)


  Commit: 525913f5a9e208d180fc70659cfee61002871019
      https://github.com/openssl/openssl/commit/525913f5a9e208d180fc70659cfee61002871019
  Author: Bob Beck <[email protected]>
  Date:   2026-08-26 (Wed, 26 Aug 2026)

  Changed paths:
    M crypto/ts/ts_rsp_sign.c
    M ssl/quic/qlog.c

  Log Message:
  -----------
  Fix latent bugs from unchecked BIO_snprintf() returns.

ts_rsp_sign.c and qlog.c advanced their cursors by the BIO_snprintf()
return without checking it.  Stage the result in a local, reject on
failure or truncation, then advance.

Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Andrew Dinh <[email protected]>
MergeDate: Wed Aug 26 16:20:24 2026
(Merged from https://github.com/openssl/openssl/pull/31640)


  Commit: 6c8d2ed33b181242f0388a5f875c454a0001568d
      https://github.com/openssl/openssl/commit/6c8d2ed33b181242f0388a5f875c454a0001568d
  Author: Bob Beck <[email protected]>
  Date:   2026-08-26 (Wed, 26 Aug 2026)

  Changed paths:
    M crypto/cmp/cmp_client.c
    M crypto/cmp/cmp_status.c

  Log Message:
  -----------
  Convert remaining BIO_snprintf() callers in cmp_client.c to snprintf().

Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Andrew Dinh <[email protected]>
MergeDate: Wed Aug 26 16:20:26 2026
(Merged from https://github.com/openssl/openssl/pull/31640)


  Commit: b85de00861cb0ce19de324caa6c9e17cc249ca32
      https://github.com/openssl/openssl/commit/b85de00861cb0ce19de324caa6c9e17cc249ca32
  Author: Bob Beck <[email protected]>
  Date:   2026-08-26 (Wed, 26 Aug 2026)

  Changed paths:
    M crypto/cmp/cmp_ctx.c
    M crypto/err/err_blocks.c

  Log Message:
  -----------
  Convert internal BIO_vsnprintf() callers to vsnprintf().

Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Andrew Dinh <[email protected]>
MergeDate: Wed Aug 26 16:20:27 2026
(Merged from https://github.com/openssl/openssl/pull/31640)


  Commit: 2f97c34973866bff7d98603d24de370128d6c8f1
      https://github.com/openssl/openssl/commit/2f97c34973866bff7d98603d24de370128d6c8f1
  Author: Bob Beck <[email protected]>
  Date:   2026-08-26 (Wed, 26 Aug 2026)

  Changed paths:
    M crypto/provider_core.c

  Log Message:
  -----------
  Decouple provider OSSL_FUNC_BIO_VSNPRINTF dispatch from public BIO_vsnprintf().

Add a static core_bio_vsnprintf() helper with the BIO_vsnprintf
semantics, and point the dispatch entry at it instead of the deprecated
public symbol. Very similar to the existing ossl_core_bio_vprintf().

Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Andrew Dinh <[email protected]>
MergeDate: Wed Aug 26 16:20:29 2026
(Merged from https://github.com/openssl/openssl/pull/31640)


  Commit: 27f277fd16bd7b72d05a5f2a53036d7563f3cc9e
      https://github.com/openssl/openssl/commit/27f277fd16bd7b72d05a5f2a53036d7563f3cc9e
  Author: Bob Beck <[email protected]>
  Date:   2026-08-26 (Wed, 26 Aug 2026)

  Changed paths:
    M apps/lib/apps.c

  Log Message:
  -----------
  Replace strlen-then-snprintf pattern in save_serial() with a single truncation check.

This used to be necessary because BIO_snprintf() could not detect truncation
but now this is silly, and this ends up tripping GCC's -Wformat-truncation

Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Andrew Dinh <[email protected]>
MergeDate: Wed Aug 26 16:20:30 2026
(Merged from https://github.com/openssl/openssl/pull/31640)


  Commit: e99307b011fb5313b6edd58e8715b8196553b040
      https://github.com/openssl/openssl/commit/e99307b011fb5313b6edd58e8715b8196553b040
  Author: Bob Beck <[email protected]>
  Date:   2026-08-26 (Wed, 26 Aug 2026)

  Changed paths:
    M apps/lib/apps.c
    M ssl/ssl_cert.c

  Log Message:
  -----------
  Replace strlen-then-snprintf preconditions with snprintf-return

This restructureis the apps/lib/apps.c file-rotation helpers
to use snprintf for truncation detection, since they now can.

This also collapses the per-snprintf VMS ifdef into one
SUFFIX_SEP macro because the ifdef-per-call shape was making my eyes
bleed from all the copypasta'ed snprintf lines with only one character
changed in the format string.

Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Andrew Dinh <[email protected]>
MergeDate: Wed Aug 26 16:20:32 2026
(Merged from https://github.com/openssl/openssl/pull/31640)


  Commit: c97647ae534577f8f7b05fb98f3fa6afe1b1eee2
      https://github.com/openssl/openssl/commit/c97647ae534577f8f7b05fb98f3fa6afe1b1eee2
  Author: Bob Beck <[email protected]>
  Date:   2026-08-26 (Wed, 26 Aug 2026)

  Changed paths:
    M crypto/err/err.c

  Log Message:
  -----------
  Detect error-string truncation from snprintf's return value.

ossl_err_string_int() compared strlen(buf) == len - 1 after snprintf
to decide the full format was truncated and fell back to a minimal
one. This was an off by one and used the minimal message when the
full message would actually fit. Check snprintf's return value
correctly instead.

Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Andrew Dinh <[email protected]>
MergeDate: Wed Aug 26 16:20:33 2026
(Merged from https://github.com/openssl/openssl/pull/31640)


Compare: https://github.com/openssl/openssl/compare/e7f3a42c2375...c97647ae5345

To unsubscribe from these emails, change your notification settings at https://github.com/openssl/openssl/settings/notifications

-- 
You received this message because you are subscribed to the Google Groups "openssl-commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/a/openssl.org/d/msgid/openssl-commits/openssl/openssl/push/refs/heads/master/e7f3a4-c97647%40github.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.