From 46a95f77e3df91c8e703c4ac81951d40c4f4d9fb Mon Sep 17 00:00:00 2001 From: Cyril Roelandt Date: Tue, 19 Mar 2024 23:14:36 +0100 Subject: [PATCH] Remove the digest_algorithm option This option has had no effect since the removal of native SSL support in 06b2465f598c014451c244d47c2ded4f1e2c6947 . Change-Id: I7ad94bd2be45a25c9c1dccc552fa9110fc4862aa --- doc/source/configuration/configuring.rst | 16 ---------------- glance/common/config.py | 5 +++++ glance/tests/unit/common/test_wsgi.py | 3 --- ...recate-digest_algorithm-7cab4ef4240c522f.yaml | 10 ++++++++++ 4 files changed, 15 insertions(+), 19 deletions(-) create mode 100644 releasenotes/notes/deprecate-digest_algorithm-7cab4ef4240c522f.yaml diff --git a/doc/source/configuration/configuring.rst b/doc/source/configuration/configuring.rst index c61612f5f8..ce9deecfdc 100644 --- a/doc/source/configuration/configuring.rst +++ b/doc/source/configuration/configuring.rst @@ -1703,22 +1703,6 @@ load balancer URL would be used for this value. ``public_endpoint=`` Optional. Default: ``None`` -Configuring Glance digest algorithm ------------------------------------ - -Digest algorithm that will be used for digital signature. The default -is sha256. Use the command:: - - openssl list-message-digest-algorithms - -to get the available algorithms supported by the version of OpenSSL on the -platform. Examples are "sha1", "sha256", "sha512", etc. If an invalid -digest algorithm is configured, all digital signature operations will fail and -return a ValueError exception with "No such digest method" error. - -``digest_algorithm=`` - Optional. Default: ``sha256`` - Configuring http_keepalive option --------------------------------- diff --git a/glance/common/config.py b/glance/common/config.py index c2faf0227f..f9acc9e896 100644 --- a/glance/common/config.py +++ b/glance/common/config.py @@ -530,6 +530,11 @@ Related options: """)), cfg.StrOpt('digest_algorithm', default='sha256', + deprecated_for_removal=True, + deprecated_since="Dalmatian", + deprecated_reason=_(""" +This option has had no effect since the removal of native SSL support. +"""), help=_(""" Digest algorithm to use for digital signature. diff --git a/glance/tests/unit/common/test_wsgi.py b/glance/tests/unit/common/test_wsgi.py index 86699233c4..54d4a89237 100644 --- a/glance/tests/unit/common/test_wsgi.py +++ b/glance/tests/unit/common/test_wsgi.py @@ -732,9 +732,6 @@ class GetSocketTestCase(test_utils.BaseTestCase): self.useFixture(fixtures.MonkeyPatch( "glance.common.wsgi.time.time", mock.Mock(side_effect=[0, 1, 5, 10, 20, 35]))) - self.useFixture(fixtures.MonkeyPatch( - "glance.common.wsgi.utils.validate_key_cert", - lambda *x: None)) wsgi.CONF.tcp_keepidle = 600 @mock.patch.object(prefetcher, 'Prefetcher') diff --git a/releasenotes/notes/deprecate-digest_algorithm-7cab4ef4240c522f.yaml b/releasenotes/notes/deprecate-digest_algorithm-7cab4ef4240c522f.yaml new file mode 100644 index 0000000000..b5f50169e6 --- /dev/null +++ b/releasenotes/notes/deprecate-digest_algorithm-7cab4ef4240c522f.yaml @@ -0,0 +1,10 @@ +--- +deprecations: + - | + The ``digest_algorithm`` configuration option has been deprecated in this + release and is subject to removal at the beginning of the F development + cycle, following the + `OpenStack standard deprecation policy + `_. + + This option has had no effect since the removal of native SSL support.