From 3d9812a1836a63795611516703b73411e51115f1 Mon Sep 17 00:00:00 2001 From: Jakob Schlyter Date: Mon, 16 Dec 2024 11:58:33 +0100 Subject: [PATCH] fix typos --- nodeman/internal_ca.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/nodeman/internal_ca.py b/nodeman/internal_ca.py index ec6ef6b..3460704 100644 --- a/nodeman/internal_ca.py +++ b/nodeman/internal_ca.py @@ -45,9 +45,13 @@ def __init__( @classmethod def load( - cls, ca_certificate_file: str, ca_private_key_file: str, validity: timedelta, w: timedelta | None = None + cls, + ca_certificate_file: str, + ca_private_key_file: str, + validity: timedelta | None = None, + time_skew: timedelta | None = None, ) -> Self: - with open(ca_private_key_file, "rb") as fp: + with open(ca_certificate_file, "rb") as fp: ca_certificate = x509.load_pem_x509_certificate(fp.read()) with open(ca_private_key_file, "rb") as fp: @@ -55,7 +59,7 @@ def load( if not isinstance(ca_private_key, PrivateKey): raise ValueError("Unsupported private key algorithm") - return cls(ca_certificate=ca_certificate, ca_private_key=ca_private_key, validity=validity) + return cls(ca_certificate=ca_certificate, ca_private_key=ca_private_key, validity=validity, time_skew=time_skew) def sign_csr(self, csr: x509.CertificateSigningRequest, name: str) -> CertificateInformation: """Sign CSR with CA private key"""