From 3322aad7daffdff33eb520f051ddf2217f731920 Mon Sep 17 00:00:00 2001 From: Alexander Scheel Date: Thu, 16 Aug 2018 22:43:02 -0400 Subject: [PATCH] Add docstring to verify_kdc_cert_validity Signed-off-by: Alexander Scheel Reviewed-By: Florence Blanc-Renaud --- ipapython/certdb.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ipapython/certdb.py b/ipapython/certdb.py index 7ff1e534e..c6fe46792 100644 --- a/ipapython/certdb.py +++ b/ipapython/certdb.py @@ -173,6 +173,11 @@ def unparse_trust_flags(trust_flags): def verify_kdc_cert_validity(kdc_cert, ca_certs, realm): + """ + Verifies the validity of a kdc_cert, ensuring it is trusted by + the ca_certs chain, has a PKINIT_KDC extended key usage support, + and verify it applies to the given realm. + """ with NamedTemporaryFile() as kdc_file, NamedTemporaryFile() as ca_file: kdc_file.write(kdc_cert.public_bytes(x509.Encoding.PEM)) kdc_file.flush()