X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=doc%2Ffeatures.rst;h=fd05f8484001bdc08c66ba98518f9abe968f05a9;hb=e7395b3353a1e14fb62ded263c102a707172e6cd;hp=dcbd0ebcdc8b3ce6c9afdae23050a869411b0eef;hpb=93983afa262463982e07a617c2904df7fbfb47b3;p=pyderasn.git diff --git a/doc/features.rst b/doc/features.rst index dcbd0eb..fd05f84 100644 --- a/doc/features.rst +++ b/doc/features.rst @@ -1,15 +1,17 @@ Features ======== +* BER/CER/DER decoding, DER encoding * Basic ASN.1 data types (X.208): BOOLEAN, INTEGER, BIT STRING, OCTET - STRING, NULL, OBJECT IDENTIFIER, ENUMERATED, all strings, UTCTime, - GeneralizedTime, CHOICE, ANY, SEQUENCE (OF), SET (OF) + STRING, NULL, OBJECT IDENTIFIER, ENUMERATED, all strings, UTCTime (no + BER), GeneralizedTime (no BER), CHOICE, ANY, SEQUENCE (OF), SET (OF) * Size :ref:`constraints ` checking * Working with sequences as high level data objects with ability to (un)marshall them -* Python 2.7/3.5 compatibility +* Python 2.7/3.5/3.6 compatibility +* Aimed to be complaint with `X.690-201508 `__ -Why yet another library? `pyasn1 `__ +Why yet another library? `pyasn1 `__ had all of this a long time ago. PyDERASN resembles it in many ways. In practice it should be relatively easy to convert ``pyasn1``'s code to ``pyderasn``'s one. But additionally it offers: @@ -25,6 +27,8 @@ practice it should be relatively easy to convert ``pyasn1``'s code to settable values, even when they are inherited * However they do not require tags matching: IMPLICIT/EXPLICIT tags will be set automatically in the given sequence +* Descriptive errors, like ``pyderasn.DecodeError: UTCTime + (tbsCertificate:validity:notAfter:utcTime) (at 328) invalid UTCTime format`` * ``__slots__`` friendliness * Could be significantly faster. For example parsing of CACert.org's CRL under Python 3.5.2: @@ -39,15 +43,6 @@ practice it should be relatively easy to convert ``pyasn1``'s code to There are drawbacks: * No old Python versions support -* No BER/CER support -* PyDERASN does **not** have object recreation capable ``repr``-s:: - - pyderasn>>> repr(algo_id) - AlgorithmIdentifier SEQUENCE[OBJECT IDENTIFIER 1.3.14.3.2.26, [UNIV 5] ANY 0500 OPTIONAL] - - pyasn1>>> repr(algo_id) - AlgorithmIdentifier().setComponents(ObjectIdentifier('1.3.14.3.2.26'), Any(hexValue='0500')) - * Strings are not validated in any way, except just trying to be decoded in ``ascii``, ``iso-8859-1``, ``utf-8/16/32`` correspondingly * No REAL, RELATIVE OID, EXTERNAL, INSTANCE OF, EMBEDDED PDV, CHARACTER STRING