Skip to content

Instantly share code, notes, and snippets.

@rdh27785
Created May 4, 2022 02:42
Show Gist options
  • Save rdh27785/97210d439a280063bd768006450c435d to your computer and use it in GitHub Desktop.
Save rdh27785/97210d439a280063bd768006450c435d to your computer and use it in GitHub Desktop.
diff -uN /etc/ssl/openssl.cnf\~original /etc/ssl/openssl.cnf for Nextcloud with OpenSSL 3
--- /etc/ssl/openssl.cnf~original 2022-03-16 08:35:51.000000000 +0000
+++ /etc/ssl/openssl.cnf 2022-05-04 02:37:30.336530711 +0000
@@ -56,6 +56,7 @@
# List of providers to load
[provider_sect]
default = default_sect
+legacy = legacy_sect
# The fips section name should match the section name inside the
# included fipsmodule.cnf.
# fips = fips_sect
@@ -69,7 +70,9 @@
# OpenSSL may not work correctly which could lead to significant system
# problems including inability to remotely access the system.
[default_sect]
-# activate = 1
+activate = 1
+[legacy_sect]
+activate = 1
####################################################################
@gbryant200
Copy link

Still not working on Ubuntu 22.04. There's an option SSL_OP_IGNORE_UNEXPECTED_EOF but I can't seem to get it setup correctly.

openssl.cnf
[system_default_sect]
Options = SSL_OP_IGNORE_UNEXPECTED_EOF
CipherString = DEFAULT@SECLEVEL=2

Doesn't seem to change anything.

@GwynethLlewelyn
Copy link

Huh.

I continue without any problems running it under Ubuntu 22.04 LTS and Ondrej's PPA. This time, I even tested it with php8.3, and the results are as expected — it shows exactly the same as my home Mac PowerBook.

I wonder... those of you with issues under Ubuntu 22.04... what does the following command show to you?

$ php8.3 -i | grep -i ssl
Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, tls, tlsv1.0, tlsv1.1, tlsv1.2, tlsv1.3
SSL => Yes
MULTI_SSL => No
SSL Version => OpenSSL/3.0.2
libSSH Version => libssh/0.10.5/openssl/zlib
SSL Support => enabled
core SSL => supported
extended SSL => supported
openssl
OpenSSL support => enabled
OpenSSL Library Version => OpenSSL 3.0.2 15 Mar 2022
OpenSSL Header Version => OpenSSL 3.0.2 15 Mar 2022
Openssl default config => /usr/lib/ssl/openssl.cnf
openssl.cafile => no value => no value
openssl.capath => no value => no value
Native OpenSSL support => enabled

(Note: on my system, /usr/lib/ssl/openssl.cnf is symlinked to /etc/ssl/openssl.cnf; YMMV.)

Also: are you sure that the access file_get_contents() has not been blocked at the OS level, for some silly reason? Some system admins consider file_get_contents() to be a potential source of conflicts/security exploits and therefore it might be blocked at the php.ini config file...

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