def cert_store_cert_check(self) -> List[str]:
report = []
_, certs_with_issues = self.cert_mgr.check_services_certificates(fix_issues=False)
- for cert_info in certs_with_issues:
- if not cert_info.is_operationally_valid():
- report.append(cert_info.get_status_description())
+ if certs_with_issues:
+ for cert_info in certs_with_issues:
+ if not cert_info.is_operationally_valid():
+ report.append(cert_info.get_status_description())
+ else:
+ report.append('All certificates are valid. No issues detected.')
return report
@handle_orch_error
force: Optional[bool] = False,
inbuf: Optional[str] = None
) -> HandleCommandResult:
+ """
+ Sets the cert-key pair from -i <pem-file>, which must be a valid PEM file containing both the certificate and the private key.
+ """
if inbuf:
cert_content, key_content = parse_combined_pem_file(inbuf)
if not cert_content or not key_content:
hostname: Optional[str] = None,
inbuf: Optional[str] = None
) -> HandleCommandResult:
+ """
+ Sets the cert from the --cert argument or from -i <cert-file>.
+ """
cert_content = cert or inbuf
if not cert_content:
raise OrchestratorError('This command requires passing a certificate using --cert parameter or "-i <filepath>" option')
hostname: Optional[str] = None,
inbuf: Optional[str] = None
) -> HandleCommandResult:
+ """
+ Sets the key from the --key argument or from -i <key-file>.
+ """
key_content = key or inbuf
if not key_content:
raise OrchestratorError('This command requires passing a key using --key parameter or "-i <filepath>" option')