From d3021a8e30de34f4e985dbb62e898afe8526e180 Mon Sep 17 00:00:00 2001 From: Sebastien Awwad Date: Tue, 3 Apr 2018 16:27:39 -0400 Subject: [PATCH] DOC: Arg interactions for import_rsa_privatekey_from_file Clarify behavior if prompt is True and password is provided anyway (raises error), and in other combinations. Also corrects a typo. Signed-off-by: Sebastien Awwad --- securesystemslib/interface.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/securesystemslib/interface.py b/securesystemslib/interface.py index a56366e3..cdff855a 100755 --- a/securesystemslib/interface.py +++ b/securesystemslib/interface.py @@ -14,7 +14,7 @@ See LICENSE for licensing information. - Provide an interface to the cryptography funtions available in + Provide an interface to the cryptography functions available in securesystemslib. The interface can be used with the Python interpreter in interactive mode, or imported directly into a Python module. See 'securesystemslib/README' for the complete guide to using 'interface.py'. @@ -244,10 +244,10 @@ def import_rsa_privatekey_from_file(filepath, password=None, If password is passed use passed password for decryption. If prompt is True use entered password for decryption. - If no password is passed or entered, or if the entered password is an empty - string, omit decryption. - - Passing and prompting for a password is not possible. + If no password is passed and either prompt is False or if the password + entered at the prompt is an empty string, omit decryption, treating the + key as if it is not encrypted. + If password is passed and prompt is True, an error is raised. (See below.) The returned key is an object in the 'securesystemslib.formats.RSAKEY_SCHEMA' format.