Skip to content

Commit

Permalink
Issue 50952 - SSCA lacks basicConstraint:CA
Browse files Browse the repository at this point in the history
Bug Description:
`capture_output` was introduced in python 3.7 and
on earlier versions this code produces TypeError.

Fix Description:
Make it compatible with python 3.6 by setting `stderr`
and `stdout` to PIPE.

Fixes: https://pagure.io/389-ds-base/issue/50952

Reviewed by: mhonek (Thanks!)
  • Loading branch information
vashirov committed Apr 3, 2020
1 parent f31abde commit 90f3642
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib389/lib389/nss_ssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# from nss import nss
import subprocess
from datetime import datetime, timedelta, date
from subprocess import check_output, run
from subprocess import check_output, run, PIPE
from lib389.passwd import password_generate
from lib389.lint import DSCERTLE0001, DSCERTLE0002
from lib389.utils import ensure_str, format_cmd_list
Expand Down Expand Up @@ -254,7 +254,7 @@ def create_rsa_ca(self, months=VALID):
]
cmd_input = b'y\n\n' # responses to certutil questions
self.log.debug("nss cmd: %s", format_cmd_list(cmd))
result = ensure_str(run(cmd, check=True, capture_output=True, input=cmd_input).stdout)
result = ensure_str(run(cmd, check=True, stderr=PIPE, stdout=PIPE, input=cmd_input).stdout)
self.log.debug("nss output: %s", result)
# Now extract the CAcert to a well know place.
# This allows us to point the cacert dir here and it "just works"
Expand Down

0 comments on commit 90f3642

Please sign in to comment.