Blame SOURCES/0003-Issue-4169-backport-lib389-cert-list-fix.patch

7e63d6
From 91b90f583bf4046325438954523c78ea4f33d607 Mon Sep 17 00:00:00 2001
7e63d6
From: Mark Reynolds <mreynolds@redhat.com>
7e63d6
Date: Fri, 10 Sep 2021 09:39:57 -0400
7e63d6
Subject: [PATCH] Issue 4169 - backport lib389 cert list fix
7e63d6
7e63d6
Description:  We didn't call ensure_str() on the output from certutil
7e63d6
commands
7e63d6
7e63d6
relates:  https://github.com/389ds/389-ds-base/issues/4169
7e63d6
7e63d6
Reviewed by: mreynolds(one line commit rule)
7e63d6
---
7e63d6
 src/lib389/lib389/nss_ssl.py | 4 ++--
7e63d6
 1 file changed, 2 insertions(+), 2 deletions(-)
7e63d6
7e63d6
diff --git a/src/lib389/lib389/nss_ssl.py b/src/lib389/lib389/nss_ssl.py
7e63d6
index 1cd2768f1..6dc0c26d3 100644
7e63d6
--- a/src/lib389/lib389/nss_ssl.py
7e63d6
+++ b/src/lib389/lib389/nss_ssl.py
7e63d6
@@ -325,7 +325,7 @@ only.
7e63d6
         ]
7e63d6
         self.log.debug("nss cmd: %s", format_cmd_list(cmd))
7e63d6
         try:
7e63d6
-            certdetails = check_output(cmd, stderr=subprocess.STDOUT, encoding='utf-8')
7e63d6
+            certdetails = ensure_str(check_output(cmd, stderr=subprocess.STDOUT, encoding='utf-8'))
7e63d6
         except subprocess.CalledProcessError as e:
7e63d6
             raise ValueError(e.output.decode('utf-8').rstrip())
7e63d6
         end_date_str = certdetails.split("Not After : ")[1].split("\n")[0]
7e63d6
@@ -905,7 +905,7 @@ only.
7e63d6
         except subprocess.CalledProcessError as e:
7e63d6
             raise ValueError(e.output.decode('utf-8').rstrip())
7e63d6
 
7e63d6
-        return result
7e63d6
+        return ensure_str(result)
7e63d6
 
7e63d6
 
7e63d6
     def get_cert_details(self, nickname):
7e63d6
-- 
7e63d6
2.31.1
7e63d6