X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=doc%2Ffeatures.rst;h=c83b64c22da7539583eceb1f38db13db6a8ebc46;hb=ec180a333b81b220e5325bdba75dcbc44b4311c6;hp=34fe9419d3b6f4aa30dcc9f19a52c6843d68570c;hpb=13ea772db7870683065ac15197888cd037df78f0;p=pyderasn.git diff --git a/doc/features.rst b/doc/features.rst index 34fe941..c83b64c 100644 --- a/doc/features.rst +++ b/doc/features.rst @@ -1,3 +1,5 @@ +.. _features: + Features ======== @@ -37,7 +39,7 @@ Also there is `asn1crypto `__. * Extensive and comprehensive `hypothesis `__ driven tests coverage. It also has been fuzzed with - `python-afl `__. + `python-afl `__ * Some kind of strong typing: SEQUENCEs require the exact **type** of settable values, even when they are inherited (assigning ``Integer`` to the field with the type ``CMSVersion(Integer)`` is not allowed) @@ -47,38 +49,17 @@ Also there is `asn1crypto `__. automatically set required tags) * Descriptive errors, like ``pyderasn.DecodeError: UTCTime (tbsCertificate:validity:notAfter:utcTime) (at 328) invalid UTCTime format`` -* ``__slots__`` friendliness +* ``__slots__``, ``copy.copy()`` friendliness +* Workability with ``pickle`` +* `Cython `__ compatibility +* Could be significantly :ref:`faster ` and have lower memory usage * :ref:`Pretty printer ` and :ref:`command-line decoder `, that could conveniently replace utilities like either ``dumpasn1`` or ``openssl asn1parse`` -* Could be significantly faster and have lower memory usage. - For example parsing of CACert.org's CRL (8.48 MiB) on FreeBSD 12.0 - amd64, Intel Core i5-6200U 2.3 GHz machine, Python 3.5.5/2.7.15: - - .. list-table:: - :widths: 15 45 20 20 - :header-rows: 1 - - * - Library - - Command - - Time, sec (Py3/Py2) - - Memory used, MiB (Py3/Py2) - * - pyasn1 0.4.5 - - ``der_decode(data, asn1Spec=rfc5280.CertificateList())`` - - 1257 / 1302 - - 1327 / 2093 - * - asn1crypto 0.24.0 - - ``asn1crypto.crl.CertificateList.load(data).native`` - - 29.3 / 43.8 - - 983 / 1677 - * - pyderasn 4.9 - - ``CertificateList().decode(data)`` (CertificateList is - converted ``pyasn1`` scheme definition) - - 27.6 / 32.5 - - 498 / 488 -There are drawbacks: + .. figure:: pprinting.png + :alt: Pretty printing example output -* No old Python versions support -* See :ref:`limitations ` + An example of pretty printed X.509 certificate with automatically + parsed DEFINED BY fields.