Recent

Author Topic: OpenSSL/LibreSSL version deprecation and function names  (Read 302 times)

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1012
  • Former Delphi 1-7, 10.2 User
OpenSSL/LibreSSL version deprecation and function names
« on: August 15, 2020, 08:09:45 am »
When using
Code: Pascal  [Select][+][-]
  1. SSLeayversion(0);
there is a deprecation warning:

Quote
unit1.pas(59,15) Warning: Symbol "SSLeayversion" is deprecated: "For 1.1+ use OpenSSL_version"

When using
Code: Pascal  [Select][+][-]
  1. SSLeay_version(0);
there is no deprecation warning.

The deprecation warning for the first variant suggests using OpenSSL_version, but there is no OpenSSL_version() function. There is, however, an OpenSSLGetVersion function.

It would appear to me that:
1) The second SSLeay variant needs a deprecation warning; and
2) The deprecation warning in both instances should suggest OpenSSLGetVersion.

Am I confused? ;)
o Lazarus v2.1.0 r63871, FPC v3.3.1 r47164, macOS 10.14.6 (with sup update), Xcode 11.3.1
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.1 amd64 (VMware Fusion VM)
o FPC 3.0.4, FreeBSD 12.2-STABLE r365646 amd64
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 20.04 (Parallels VM)

Bi0T1N

  • Jr. Member
  • **
  • Posts: 50
Re: OpenSSL/LibreSSL version deprecation and function names
« Reply #1 on: August 15, 2020, 11:08:38 am »
I've already provided a patch to fix the deprecation warning and also the loading of the OpenSSL_version.

However, the function function SSLeay_version(t: cint): PChar; has the same name than the  SSLeay_version function from OpenSSL method prior 1.1.x so maybe it was just added for convenience without seeing that _SSLeayversion already exists (or the way around)?
I think it should be deprecated as well (better for backward compatibility than removing it) and changed to use _SSLeayversion as it automatically links to OpenSSL_version if SSLeay_version isn't available anymore.
« Last Edit: August 15, 2020, 11:13:47 am by Bi0T1N »

 

TinyPortal © 2005-2018