Skip to content

Update for openssl 4.0#174

Open
jamesjer wants to merge 1 commit intoSWI-Prolog:masterfrom
jamesjer:master
Open

Update for openssl 4.0#174
jamesjer wants to merge 1 commit intoSWI-Prolog:masterfrom
jamesjer:master

Conversation

@jamesjer
Copy link
Copy Markdown

Fedora Rawhide (which will become Fedora 45 in about 6 months) just moved from openssl 3.x to 4.x. A number of packages now fail to build, including swipl. This PR is my attempt at addressing the issue. Two changes in openssl 4.x are responsible:

  • Some types are now opaque, so accessor functions must be used instead of directly accessing structure fields
  • Some function return types are now const

This PR leaves the code able to build with both openssl 3.x and 4.x. I am happy to make changes to this PR if you don't like the style or the approach.

Also note the existence of an ASN1_TIME_to_tm function, but it isn't clear to me that it meets the needs of unify_asn1_time, so I didn't use it.

Comment thread ssl4pl.c

#define SSL_MAX_CERT_KEY_PAIRS 12

#if OPENSSL_API_LEVEL < 40000
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The patch looks good. I'm wondering about LibreSSL though. Do you happen to know whether this could break LibreSSL? Should we move the condition to do a CMake tests instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants