Re : Re: certbot does not work

From: <pkagan_at_videotron.ca>
Date: Wed, 31 Jan 2024 06:23:51 UTC
problem solved by Darius as follows : 


vi /usr/local/bin/certbot 

after import sys: 
import os 
os.environ['CRYPTOGRAPHY_OPENSSL_NO_LEGACY'] = '1' 


 

thank you for all correspondance 

Le 31/01/24 00:21, Paul Procacci  <pprocacci@gmail.com> a écrit : 
> 
> 
> 
> 
> 
> 
> 
> 
> On Wed, Jan 31, 2024 at 12:19 AM Paul Procacci <pprocacci@gmail.com> wrote:
> 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > On Tue, Jan 30, 2024 at 10:33 PM Paul Kagan <pkagan@videotron.ca> wrote:
> > 
> > > 
> > > 
> > > 
> > > 
> > > root@videotron:/usr/ports/security/openssl # @CRYPTOGRAPHY_OPENSSL_NO_LEGACY
> > > 
> > > @CRYPTOGRAPHY_OPENSSL_NO_LEGACY: Command not found.
> > > 
> > > root@videotron:/usr/ports/security/openssl # setenv CRYPTOGRAPHY_OPENSSL_NO_LEGACY=yes ; certbot
> > > 
> > > setenv: Variable name must contain alphanumeric characters.
> > > 
> > > Traceback (most recent call last):
> > > 
> > > File "/usr/local/bin/certbot", line 33, in <module>
> > > 
> > > sys.exit(load_entry_point('certbot==2.8.0', 'console_scripts', 'certbot')())
> > > 
> > > File "/usr/local/bin/certbot", line 25, in importlib_load_entry_point
> > > 
> > > return next(matches).load()
> > > 
> > > File "/usr/local/lib/python3.9/importlib/metadata.py", line 86, in load
> > > 
> > > module = import_module(match.group('module'))
> > > 
> > > File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
> > > 
> > > return _bootstrap._gcd_import(name[level:], package, level)
> > > 
> > > File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
> > > 
> > > File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
> > > 
> > > File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
> > > 
> > > File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
> > > 
> > > File "<frozen importlib._bootstrap_external>", line 850, in exec_module
> > > 
> > > File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
> > > 
> > > File "/usr/local/lib/python3.9/site-packages/certbot/main.py", line 6, in <module>
> > > 
> > > from certbot._internal import main as internal_main
> > > 
> > > File "/usr/local/lib/python3.9/site-packages/certbot/_internal/main.py", line 21, in <module>
> > > 
> > > import josepy as jose
> > > 
> > > File "/usr/local/lib/python3.9/site-packages/josepy/__init__.py", line 40, in <module>
> > > 
> > > from josepy.json_util import (
> > > 
> > > File "/usr/local/lib/python3.9/site-packages/josepy/json_util.py", line 24, in <module>
> > > 
> > > from OpenSSL import crypto
> > > 
> > > File "/usr/local/lib/python3.9/site-packages/OpenSSL/__init__.py", line 8, in <module>
> > > 
> > > from OpenSSL import SSL, crypto
> > > 
> > > File "/usr/local/lib/python39/site-packages/OpenSSL/SSL.py", line 9, in <module>
> > > 
> > > from OpenSSL._util import (
> > > 
> > > File "/usr/local/lib/python3.9/site-packages/OpenSSL/_util.py", line 6, in <module>
> > > 
> > > from cryptography.hazmat.bindings.openssl.binding import Binding
> > > 
> > > File "/usr/local/lib/python3.9/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 167, in <module>
> > > 
> > > Bindinginit_static_locks()
> > > 
> > > File "/usr/local/lib/python3.9/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 134, in init_static_locks
> > > 
> > > cls._ensure_ffi_initialized()
> > > 
> > > File "/usr/local/lib/python3.9/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 123, in _ensure_ffi_initialized
> > > 
> > > _legacy_provider_error(cls._legacy_provider_loaded)
> > > 
> > > File "/usr/local/lib/python3.9/site-packages/cryptography/hazmat/bindings/openssl/bindingpy", line 43, in _legacy_provider_error
> > > 
> > > raise RuntimeError(
> > > 
> > > RuntimeError: OpenSSL 3.0's legacy provider failed to load. This is a fatal error by default, but cryptography supports running without legacy algorithms by setting the environment variable CRYPTOGRAPHY_OPENSSL_NO_LEGACY. If you did not expect this error, you have likely made a mistake with your OpenSSL configuration.
> > > 
> > > root@videotron:/usr/ports/security/openssl # setenv CRYPTOGRAPHY_OPENSSL_NO_LEGACY=yes ; certbot
> > > 
> > > setenv: Variable name must contain alphanumeric characters.
> > > 
> > > Traceback (most recent call last):
> > > 
> > > File "/usr/local/bin/certbot", line 33, in <module>
> > > 
> > > sys.exit(load_entry_point('certbot==2.8.0', 'console_scripts', 'certbot')())
> > > 
> > > File "/usr/local/bin/certbot", line 25, in importlib_load_entry_point
> > > 
> > > return next(matches).load()
> > > 
> > > File "/usr/local/lib/python3.9/importlib/metadata.py", line 86, in load
> > > 
> > > module = import_module(match.group('module'))
> > > 
> > > File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
> > > 
> > > return _bootstrap._gcd_import(name[level:], package, level)
> > > 
> > > File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
> > > 
> > > File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
> > > 
> > > File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
> > > 
> > > File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
> > > 
> > > File "<frozen importlib._bootstrap_external>", line 850, in exec_module
> > > 
> > > File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
> > > 
> > > File "/usr/local/lib/python3.9/site-packages/certbot/main.py", line 6, in <module>
> > > 
> > > from certbot_internal import main as internal_main
> > > 
> > > File "/usr/local/lib/python3.9/site-packages/certbot/_internal/main.py", line 21, in <module>
> > > 
> > > import josepy as jose
> > > 
> > > File "/usr/local/lib/python3.9/site-packages/josepy/__init__.py", line 40, in <module>
> > > 
> > > from josepy.json_util import (
> > > 
> > > File "/usr/local/lib/python3.9/site-packages/josepy/json_util.py", line 24, in <module>
> > > 
> > > from OpenSSL import crypto
> > > 
> > > File "/usr/local/lib/python39/site-packages/OpenSSL/__init__.py", line 8, in <module>
> > > 
> > > from OpenSSL import SSL, crypto
> > > 
> > > File "/usr/local/lib/python3.9/site-packages/OpenSSL/SSL.py", line 9, in <module>
> > > 
> > > from OpenSSL._util import (
> > > 
> > > File "/usr/local/lib/python3.9/site-packages/OpenSSL/_util.py", line 6, in <module>
> > > 
> > > from cryptography.hazmat.bindings.openssl.binding import Binding
> > > 
> > > File "/usr/local/lib/python3.9/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 167, in <module>
> > > 
> > > Binding.init_static_locks()
> > > 
> > > File "/usr/local/lib/python3.9/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 134, in init_static_locks
> > > 
> > > cls._ensure_ffi_initialized()
> > > 
> > > File "/usr/local/lib/python3.9/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 123, in _ensure_ffi_initialized
> > > 
> > > _legacy_provider_error(cls._legacy_provider_loaded)
> > > 
> > > File "/usr/local/lib/python3.9/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 43, in _legacy_provider_error
> > > 
> > > raise RuntimeError(
> > > 
> > > RuntimeError: OpenSSL 3.0's legacy provider failed to load. This is a fatal error by default, but cryptography supports running without legacy algorithms by setting the environment variable CRYPTOGRAPHY_OPENSSL_NO_LEGACY. If you did not expect this error, you have likely made a mistake with your OpenSSL configuration.
> > > 
> > > root@videotron:/usr/ports/security/openssl #
> > > 
> > > 
> > > 
> > 
> > 
> > What is your shell?
> > setenv is a csh builtin.
> > The default shell was changed to /bin/ss. Did you account for this change?
> > 
> > 
> > ~Paul
> > 
> > --  
> > 
> > __________________
> > 
> > :(){ :|:& };:
> > 
> > 
> 
> 
> 
> Sorry, I quite literally just woke up. The default shell was changed to /bin/sh.
> 
> ~Paul
> 
> --  
> 
> __________________
> 
> :(){ :|:& };:
> 
>