mirror of
https://github.com/certbot/certbot.git
synced 2026-07-30 16:14:44 +02: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
|
### 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.
|
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()
|
checker = ocsp.RevocationChecker()
|
||||||
|
|
||||||
if config.certname and cert.lineagename != config.certname and not skip_filter_checks:
|
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()):
|
if config.domains and not set(config.domains).issubset(cert.names()):
|
||||||
return ""
|
return None
|
||||||
now = pytz.UTC.fromutc(datetime.datetime.utcnow())
|
now = pytz.UTC.fromutc(datetime.datetime.utcnow())
|
||||||
|
|
||||||
reasons = []
|
reasons = []
|
||||||
@@ -358,7 +358,9 @@ def _report_human_readable(config, parsed_certs):
|
|||||||
"""Format a results report for a parsed cert"""
|
"""Format a results report for a parsed cert"""
|
||||||
certinfo = []
|
certinfo = []
|
||||||
for cert in parsed_certs:
|
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)
|
return "\n".join(certinfo)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user