OpenSSL version number when compiling

Thomas Dwyer III tomiii at tomiii.com
Tue Aug 1 22:31:12 UTC 2023


On Tue, Aug 1, 2023 at 2:23 PM Kenneth Goldman <kgoldman at us.ibm.com> wrote:

> Do I misunderstand the openssl version number?
>
> + openssl version
>
> OpenSSL 3.1.1 30 May 2023 (Library: OpenSSL 3.1.1 30 May 2023)
>
> In my source, I have:
>
> #if OPENSSL_VERSION_NUMBER > 0x30100ff0L
>
> #   error Untested OpenSSL version
>
> and it hits the error.
>
> As I understand it, 3.1.1 becomes 30100010, which should be less than
> 30100ff0.
>

No, that's incorrect. Per  OPENSSL_VERSION_NUMBER(3) the format is:

MNNFFPPS: major minor fix patch status

So 3.1.1 would be 0x30101000L (or 0x3010100f for the release version).


Tom.III


> What am I doing wrong?
>
> --
>
> Work 1-914-945-2415
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mta.openssl.org/pipermail/openssl-users/attachments/20230801/fc8e2c7d/attachment.htm>


More information about the openssl-users mailing list