Skip to content

Commit fd0a10f

Browse files
committed
Fix typo in docstring for key argument
Fixes #80
1 parent cfc566d commit fd0a10f

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

signxml/__init__.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -287,15 +287,15 @@ def sign(self, data, key=None, passphrase=None, cert=None, reference_uri=None, k
287287
:param data: Data to sign
288288
:type data: String, file-like object, or XML ElementTree Element API compatible object
289289
:param key:
290-
Key to be used for signing. When signing with a certificate or RSA/DSA/ECDSA key, this can be a string
291-
containing a PEM-formatted key, or a :py:class:`cryptography.hazmat.primitives.interfaces.RSAPublicKey`,
292-
:py:class:`cryptography.hazmat.primitives.interfaces.DSAPublicKey`, or
293-
:py:class:`cryptography.hazmat.primitives.interfaces.EllipticCurvePublicKey` object. When signing with a
290+
Key to be used for signing. When signing with a certificate or RSA/DSA/ECDSA key, this can be a string/bytes
291+
containing a PEM-formatted key, or a :py:class:`cryptography.hazmat.primitives.interfaces.RSAPrivateKey`,
292+
:py:class:`cryptography.hazmat.primitives.interfaces.DSAPrivateKey`, or
293+
:py:class:`cryptography.hazmat.primitives.interfaces.EllipticCurvePrivateKey` object. When signing with a
294294
HMAC, this should be a string containing the shared secret.
295295
:type key:
296-
string, :py:class:`cryptography.hazmat.primitives.interfaces.RSAPublicKey`,
297-
:py:class:`cryptography.hazmat.primitives.interfaces.DSAPublicKey`, or
298-
:py:class:`cryptography.hazmat.primitives.interfaces.EllipticCurvePublicKey` object
296+
string, bytes, :py:class:`cryptography.hazmat.primitives.interfaces.RSAPrivateKey`,
297+
:py:class:`cryptography.hazmat.primitives.interfaces.DSAPrivateKey`, or
298+
:py:class:`cryptography.hazmat.primitives.interfaces.EllipticCurvePrivateKey` object
299299
:param passphrase: Passphrase to use to decrypt the key, if any.
300300
:type passphrase: string
301301
:param cert:

signxml/util/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ def verify_x509_cert_chain(cert_chain, ca_pem_file=None, ca_path=None):
223223
or being part of a certification chain that terminates in a certificate containing the validation key.
224224
No ordering is implied by the above constraints"
225225
"""
226+
# TODO: migrate to Cryptography (pending cert validation support) or https://github.com/wbond/certvalidator
226227
from OpenSSL import SSL
227228
context = SSL.Context(SSL.TLSv1_METHOD)
228229
if ca_pem_file is None and ca_path is None:

0 commit comments

Comments
 (0)