]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/mgr: Correct code to ensure cephadm/tests/test_certmgr.py passes.
authorPaulo E. Castro <pecastro@wormholenet.com>
Wed, 23 Apr 2025 21:16:12 +0000 (22:16 +0100)
committerJohn Mulligan <jmulligan@redhat.com>
Mon, 7 Jul 2025 13:32:24 +0000 (09:32 -0400)
Signed-off-by: Paulo E. Castro <pecastro@wormholenet.com>
src/pybind/mgr/mgr_util.py
src/python-common/ceph/cryptotools/remote.py

index d3fb5ae70192c8d42b4a63bf4ae29cc1b2b513b0..f5c04f0189c542dd263a3ff2a15a8002cc2d93b7 100644 (file)
@@ -680,8 +680,8 @@ def get_cert_issuer_info(crt: str) -> Tuple[Optional[str], Optional[str]]:
 def verify_tls(crt, key):
     # type: (str, str) -> int
     cc = ceph.cryptotools.remote.CryptoCaller()
-    days_to_expiration = cc.verify_cacrt_content(crt)
     try:
+        days_to_expiration = cc.verify_cacrt_content(crt)
         cc.verify_tls(crt, key)
     except ValueError as err:
         raise ServerConfigException(str(err))
index a83399828e1ff2a4e142388cb6c858a357bf6015..9a668ca4bfa26e36a3b3ebe50d2beb6f728b0a65 100644 (file)
@@ -124,6 +124,7 @@ class CryptoCaller:
         self._run(
             ['verify_tls'],
             input_data=json.dumps({'crt': crt, 'key': key}),
+            capture_output=True,
             check=True,
         )