From 53289e0bdfca5ed8bce8911b5710be3fb2055143 Mon Sep 17 00:00:00 2001 From: Alexandros Afentoulis Date: Mon, 16 Jul 2018 11:24:00 +0300 Subject: [PATCH] Remove fix_cms_verify_when_input_files_not_exists.patch Said patch is already included in original tarball, so cannot be applied. --- ...s_verify_when_input_files_not_exists.patch | 56 ------------------- debian/patches/series | 1 - 2 files changed, 57 deletions(-) delete mode 100644 debian/patches/fix_cms_verify_when_input_files_not_exists.patch diff --git a/debian/patches/fix_cms_verify_when_input_files_not_exists.patch b/debian/patches/fix_cms_verify_when_input_files_not_exists.patch deleted file mode 100644 index 180fc665..00000000 --- a/debian/patches/fix_cms_verify_when_input_files_not_exists.patch +++ /dev/null @@ -1,56 +0,0 @@ -Description: Workaround for FTBFS with OpenSSL >= 1.1.0 - OpenSSL1.1 returns exit code 1 if certfile or CAfile not exists. - This is possibly OpenSSL bug - https://www.openssl.org/docs/man1.1.0/apps/cms.html#EXIT-CODES -Author: Ondřej Kobližek -Forwarded: https://bugs.launchpad.net/python-keystoneclient/+bug/1646858 - ---- a/keystoneclient/common/cms.py -+++ b/keystoneclient/common/cms.py -@@ -42,9 +42,10 @@ - - - # The openssl cms command exits with these status codes. --# See https://www.openssl.org/docs/apps/cms.html#EXIT_CODES -+# See https://www.openssl.org/docs/man1.1.0/apps/cms.html#EXIT-CODES - class OpensslCmsExitStatus(object): - SUCCESS = 0 -+ COMMAND_OPTIONS_PARSING_ERROR = 1 - INPUT_FILE_READ_ERROR = 2 - CREATE_CMS_READ_MIME_ERROR = 3 - -@@ -180,21 +181,31 @@ - # Do not log errors, as some happen in the positive thread - # instead, catch them in the calling code and log them there. - -- # When invoke the openssl with not exist file, return code 2 -- # and error msg will be returned. -+ # When invoke the openssl >= 1.1.0 with not exist file, return code should -+ # be 2 instead of 1 and error msg will be returned. - # You can get more from -- # http://www.openssl.org/docs/apps/cms.html#EXIT_CODES -+ # https://www.openssl.org/docs/man1.1.0/apps/cms.html#EXIT-CODES - # - # $ openssl cms -verify -certfile not_exist_file -CAfile - # not_exist_file -inform PEM -nosmimecap -nodetach - # -nocerts -noattr -+ # openssl < 1.1.0 returns - # Error opening certificate file not_exist_file -+ # openssl >= 1.1.0 returns -+ # cms: Cannot open input file not_exist_file, No such file or directory - # - if retcode == OpensslCmsExitStatus.INPUT_FILE_READ_ERROR: - if err.startswith('Error reading S/MIME message'): - raise exceptions.CMSError(err) - else: - raise exceptions.CertificateConfigError(err) -+ # workaround for OpenSSL >= 1.1.0, -+ # should return OpensslCmsExitStatus.INPUT_FILE_READ_ERROR -+ elif retcode == OpensslCmsExitStatus.COMMAND_OPTIONS_PARSING_ERROR: -+ if err.startswith('cms: Cannot open input file'): -+ raise exceptions.CertificateConfigError(err) -+ else: -+ raise subprocess.CalledProcessError(retcode, 'openssl', output=err) - elif retcode != OpensslCmsExitStatus.SUCCESS: - raise subprocess.CalledProcessError(retcode, 'openssl', output=err) - return output diff --git a/debian/patches/series b/debian/patches/series index 5f2320de..e69de29b 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +0,0 @@ -fix_cms_verify_when_input_files_not_exists.patch -- GitLab