Skip to content

Is OpenSSL_version_num() deprecated? #17517

Closed

Description

@mattcaswell

The function OpenSSL_version_num() is not marked as deprecated in the header file or in the source code or in libcrypto.num. But in the documentation, it is described in the "BACKWARD COMPATIBILITY" section which says this at the beginning of it:

For compatibility, some older macros and functions are retained or
synthesised.
They are all considered deprecated.

Its also listed as deprecated in the synopsis section of the man page.

The situation is similar with the OPENSSL_VERSION_NUMBER macro, i.e. its not marked as deprecated in the header file, but it is in the docs. This one is additionally marked as deprecated in other.syms.

It seems very unclear whether they really are deprecated or not.

Activity

  1. added
    triaged: question
    on Jan 14, 2022
  2. t8m commented on Jan 14, 2022

    @t8m
    Member

    IMO we should undeprecate these as they are really used by applications and they are useful functions. Yes, there is the problem - what to do when we reach OpenSSL-16.0.0 but I do not see us getting to that number any time soon. 😁

  3. mattcaswell commented on Jan 14, 2022

    @mattcaswell
    MemberAuthor

    Yes, I'm not really sure why we wanted to deprecate this function. It's actually quite useful to have a single value to represent the whole version number - and it exists in old versions too. In my response to #17516 I wanted to say that the easiest way to compare the header version against the library version is to compare OPENSSL_VERSION_NUMBER against the output of OpenSSL_version_num() but felt unable to because of the ambiguous deprecation status.

  4. t8m commented on Jan 14, 2022

    @t8m
    Member

    I would treat this issue as a documentation bug and simply undeprecate it in the documentation. But perhaps we need to discuss this within OTC?

  5. mattcaswell commented on Jan 14, 2022

    @mattcaswell
    MemberAuthor

    But perhaps we need to discuss this within OTC?

    Yes. I think so

  6. added
    hold: discussion
    on Jan 14, 2022
  7. mattcaswell commented on Jan 14, 2022

    @mattcaswell
    MemberAuthor

    Question for OTC: Should OPENSSL_VERSION_NUMBER and OpenSSL_version_num() be undeprecated in the documentation? Alternatively should they be marked as deprecated in the header files?

  8. levitte commented on Jan 14, 2022

    @levitte
    Member

    Because the bit arrangement in that number has changed over time, resulting in, uhm, pretty creative was to handle it, I thought that the new macros were much easier to interpret.

    Deprecating the old was meant to be in the interest of not trying to have two ways to check.

  9. t-j-h commented on Jan 18, 2022

    @t-j-h
    Member

    I agree that this should be undeprecated in the documentation - the documentation is wrong.
    Warning that this has challenges when we get to a much later major version would have been more appropriate IMHO.

  10. added
    branch: 3.0
    branch: master
    on Feb 8, 2022
  11. paulidale commented on Feb 8, 2022

    @paulidale
    Contributor

    These should be undeprecated.

  12. removed
    hold: discussion
    on Feb 8, 2022
  13. t8m commented on Feb 8, 2022

    @t8m
    Member

    OTC Decision: the OPENSSL_VERSION_NUMBER macro and OpenSSL_version_num() function should be undeprecated on the 3.0 branch in the documentation

  14. added a commit that references this issue on Feb 23, 2022
    6f4a98c
  15. added a commit that references this issue on Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    branch: 3.0branch: mastertriaged: question

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions