mirror of
https://github.com/certbot/certbot.git
synced 2026-01-26 07:41:33 +03:00
Remove empty lines from certbot certificates when (#8723)
.. envoked with `--cert-name` or `-d`.
This commit is contained in:
@@ -17,7 +17,8 @@ Certbot adheres to [Semantic Versioning](https://semver.org/).
|
||||
|
||||
### Fixed
|
||||
|
||||
*
|
||||
* Don't output an empty line for a hidden certificate when `certbot certificates` is being used
|
||||
in combination with `--cert-name` or `-d`.
|
||||
|
||||
More details about these changes can be found on our GitHub repo.
|
||||
|
||||
|
||||
@@ -266,9 +266,9 @@ def human_readable_cert_info(config, cert, skip_filter_checks=False):
|
||||
checker = ocsp.RevocationChecker()
|
||||
|
||||
if config.certname and cert.lineagename != config.certname and not skip_filter_checks:
|
||||
return ""
|
||||
return None
|
||||
if config.domains and not set(config.domains).issubset(cert.names()):
|
||||
return ""
|
||||
return None
|
||||
now = pytz.UTC.fromutc(datetime.datetime.utcnow())
|
||||
|
||||
reasons = []
|
||||
@@ -358,7 +358,9 @@ def _report_human_readable(config, parsed_certs):
|
||||
"""Format a results report for a parsed cert"""
|
||||
certinfo = []
|
||||
for cert in parsed_certs:
|
||||
certinfo.append(human_readable_cert_info(config, cert))
|
||||
cert_info = human_readable_cert_info(config, cert)
|
||||
if cert_info is not None:
|
||||
certinfo.append(cert_info)
|
||||
return "\n".join(certinfo)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user