fall back to *with* validation, not without

This commit is contained in:
Jean-Paul Calderone 2023-01-06 21:00:10 -05:00
parent 85234b07a0
commit 8c56ccad72

View File

@ -93,7 +93,7 @@ def create_signing_keypair_from_string(private_key_der: bytes) -> tuple[PrivateK
except TypeError: except TypeError:
# cryptography<39 does not support this parameter, so just load the # cryptography<39 does not support this parameter, so just load the
# key with validation... # key with validation...
unsafe_priv_key = load_without_validation() unsafe_priv_key = load_with_validation()
# But avoid *reloading* it since that will run the expensive # But avoid *reloading* it since that will run the expensive
# validation *again*. # validation *again*.
load = lambda: unsafe_priv_key load = lambda: unsafe_priv_key