[openssl/openssl] 82d28c: Rename ossl_sleep() to OSSL_sleep() and make it pu...

Richard Levitte noreply at github.com
Thu Oct 6 06:05:35 UTC 2022


  Branch: refs/heads/master
  Home:   https://github.com/openssl/openssl
  Commit: 82d28c6b3cbd8074faaa34cc2ce57dacc580792f
      https://github.com/openssl/openssl/commit/82d28c6b3cbd8074faaa34cc2ce57dacc580792f
  Author: Richard Levitte <levitte at openssl.org>
  Date:   2022-10-06 (Thu, 06 Oct 2022)

  Changed paths:
    M crypto/build.info
    A crypto/sleep.c
    M doc/build.info
    A doc/man3/OSSL_sleep.pod
    M include/internal/e_os.h
    M include/openssl/crypto.h.in
    M util/libcrypto.num

  Log Message:
  -----------
  Rename ossl_sleep() to OSSL_sleep() and make it public

ossl_sleep() was implemented as a static inline function in internal/e_os.h,
using usleep() on Unix and Sleep() on Windows.  So far well and good.
However, it also has a fallback implementation for systems that do not have
usleep() or Sleep(), and that implementation happens to use ossl_time_now(),
which is a normal function, private to libcrypto, and is judged to be too
complex to sanely make into a static inline function.

This fallback creates a problem, because we do use ossl_sleep() in apps/ and
a few test programs in test/, and when they are linked with libcrypto in
shared library form, ossl_time_now() can't be found, since it's not publicly
exposed.

Something needs to give, and the easiest, and hopefully sanest answer is to
make ossl_sleep() a publicly exposed function, which requires a slight name
change.

Documentation and 'make update' result included.

Reviewed-by: Paul Dale <pauli at openssl.org>
Reviewed-by: Matt Caswell <matt at openssl.org>
Reviewed-by: Tim Hudson <tjh at openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit at gmail.com>
(Merged from https://github.com/openssl/openssl/pull/19330)


  Commit: 5139dec255d0e2f991083cba9d9c62dbe6637046
      https://github.com/openssl/openssl/commit/5139dec255d0e2f991083cba9d9c62dbe6637046
  Author: Richard Levitte <levitte at openssl.org>
  Date:   2022-10-06 (Thu, 06 Oct 2022)

  Changed paths:
    M apps/cmp.c
    M apps/lib/http_server.c
    M apps/s_server.c
    M crypto/bio/bio_lib.c
    M crypto/cmp/cmp_client.c
    M test/helpers/ssltestlib.c

  Log Message:
  -----------
  Rename ossl_sleep calls to OSSL_sleep everywhere

Also, remove inclusions of internal/e_os.h where it seems no longer
necessary.

Reviewed-by: Paul Dale <pauli at openssl.org>
Reviewed-by: Matt Caswell <matt at openssl.org>
Reviewed-by: Tim Hudson <tjh at openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit at gmail.com>
(Merged from https://github.com/openssl/openssl/pull/19330)


Compare: https://github.com/openssl/openssl/compare/a8572674f12c...5139dec255d0


More information about the openssl-commits mailing list