Skip to content

Commit 3b689ce

Browse files
ohemorangealex
andauthored
Update reference.rst:load_der_x509_certificate to note ValueError raised (#12364)
* Update reference.rst:load_der_x509_certificate to note error raised It raises the error and therefore should be noted in the documentation. ``` >>> x509.load_der_x509_certificate(b64.b64decode("foobar".encode())) Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: error parsing asn1 value: ParseError { kind: InvalidLength } ``` * Update docs/x509/reference.rst Thanks! Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com> --------- Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
1 parent fac5a99 commit 3b689ce

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

docs/x509/reference.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,9 @@ Loading Certificates
223223

224224
:returns: An instance of :class:`~cryptography.x509.Certificate`.
225225

226+
:raises ValueError: If a certificate cannot be parsed from the provided
227+
data.
228+
226229
Loading Certificate Revocation Lists
227230
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
228231

0 commit comments

Comments
 (0)