26 lines
629 B
Python
26 lines
629 B
Python
|
|
from caddy_worker import CaddyWorker
|
|
|
|
|
|
def main():
|
|
worker = CaddyWorker()
|
|
|
|
cert_path = worker.search_cert_caddy(
|
|
"D:/Work/Programming/Python/CaddyToDSM/TestData/certs",
|
|
"wud.stadidisk.ru"
|
|
)
|
|
|
|
print(f"Path to cert: {cert_path}")
|
|
|
|
if cert_path:
|
|
cert_info = worker.get_cert_info(cert_path)
|
|
|
|
print(f"Domain: {cert_info.domain_name}")
|
|
print(f"Fingerprint: {cert_info.fingerprint}")
|
|
print(f"Expires at: {cert_info.expires_at}")
|
|
print(f"Key path: {cert_info.path_to_key}")
|
|
else:
|
|
print("Certificate not found")
|
|
|
|
if __name__ == "__main__":
|
|
main() |