<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;
If you have got dictionaries with ObjectIdentifiers, like example one
from ``tests/test_crts.py``::
- some_oids = {
+ stroid2name = {
"1.2.840.113549.1.1.1": "id-rsaEncryption",
"1.2.840.113549.1.1.5": "id-sha1WithRSAEncryption",
[...]
then you can pass it to pretty printer to see human readable OIDs::
- $ python -m pyderasn --oids tests.test_crts:some_oids path/to/file
+ $ python -m pyderasn --oids tests.test_crts:stroid2name path/to/file
[...]
37 [1,1, 11] . . . . . . >: SET OF
39 [1,1, 9] . . . . . . . . >: SEQUENCE OF
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((