]> Cypherpunks.ru repositories - pyderasn.git/blobdiff - doc/examples.rst
copy/pickle friendly Obj
[pyderasn.git] / doc / examples.rst
index 7e4c473bc70bd5d46ffeafee57d3644027bdd333..6f16af663996897a56056fa5422b6b6b2cec4468 100644 (file)
@@ -177,7 +177,7 @@ We are ready to decode PayPal's certificate from Go `encoding/asn1
 <https://golang.org/pkg/encoding/asn1/>`__ test suite (assuming that
 it's DER encoded representation is already in ``raw`` variable)::
 
-    >>> crt, tail = Certificate().decode(raw)
+    >>> crt = Certificate().decod(raw)
     >>> crt
     Certificate SEQUENCE[tbsCertificate: TBSCertificate SEQUENCE[
         version: [0] EXPLICIT Version INTEGER v3 OPTIONAL;
@@ -362,7 +362,7 @@ Let's create some simple self-signed X.509 certificate from the ground::
     tbs["validity"] = validity
 
     spki = SubjectPublicKeyInfo()
-    spki_algo_id = sign_algo_id.copy()
+    spki_algo_id = copy(sign_algo_id)
     spki_algo_id["algorithm"] = ObjectIdentifier("1.2.840.113549.1.1.1")
     spki["algorithm"] = spki_algo_id
     spki["subjectPublicKey"] = BitString(hexdec("".join((