]> Cypherpunks.ru repositories - pyderasn.git/commitdiff
Limitations section
authorSergey Matveev <stargrave@stargrave.org>
Sat, 5 Jan 2019 11:10:11 +0000 (14:10 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Sat, 5 Jan 2019 11:10:11 +0000 (14:10 +0300)
doc/features.rst
doc/index.rst
doc/limitations.rst [new file with mode: 0644]
pyderasn.py

index fd05f8484001bdc08c66ba98518f9abe968f05a9..19cf7f97fa6ebd300c55b1f30ddc22ef28be3e7e 100644 (file)
@@ -3,8 +3,8 @@ 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 (no
-  BER), GeneralizedTime (no BER), CHOICE, ANY, SEQUENCE (OF), SET (OF)
+  STRING, NULL, OBJECT IDENTIFIER, ENUMERATED, all strings, UTCTime,
+  GeneralizedTime, CHOICE, ANY, SEQUENCE (OF), SET (OF)
 * Size :ref:`constraints <bounds>` checking
 * Working with sequences as high level data objects with ability to
   (un)marshall them
@@ -43,6 +43,4 @@ practice it should be relatively easy to convert ``pyasn1``'s code to
 There are drawbacks:
 
 * No old Python versions support
-* 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
+* See :ref:`limitations <limitations>`
index d1fca187f664e72ec1aa1d6da4bad8f2ddd0b357..fa9f8629c15c1147ad6dd78caeb997e38871b51e 100644 (file)
@@ -28,6 +28,7 @@ licenced under `GNU LGPLv3+ <https://www.gnu.org/licenses/lgpl-3.0.html>`__.
    :maxdepth: 1
 
    features
+   limitations
    examples
    reference
    news
diff --git a/doc/limitations.rst b/doc/limitations.rst
new file mode 100644 (file)
index 0000000..d52b87b
--- /dev/null
@@ -0,0 +1,12 @@
+.. _limitations:
+
+Limitations
+===========
+
+* Strings (except :py:class:`pyderasn.NumericString` and
+  :py:class:`pyderasn.PrintableString`) are not validated
+  in any way, except just trying to be decoded in ``ascii``,
+  ``iso-8859-1``, ``utf-8/16/32`` correspondingly
+* :py:class:`pyderasn.UTCTime` and :py:class:`pyderasn.GeneralizedTime`
+  support only DER-encoding
+* No REAL, RELATIVE OID, EXTERNAL, INSTANCE OF, EMBEDDED PDV, CHARACTER STRING
index c83b4393037e180c943c6e72decb9509b188a097..172c1f6474705de88d59918be509c1658a79e0aa 100755 (executable)
@@ -463,6 +463,10 @@ NumericString
 _____________
 .. autoclass:: pyderasn.NumericString
 
+PrintableString
+_______________
+.. autoclass:: pyderasn.PrintableString
+
 UTCTime
 _______
 .. autoclass:: pyderasn.UTCTime
@@ -3579,7 +3583,7 @@ class NumericString(AllowableCharsMixin, CommonString):
     be stored.
 
     >>> NumericString().allowable_chars
-    set(['3', '4', '7', '5', '1', '0', '8', '9', ' ', '6', '2'])
+    frozenset(['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ' '])
     """
     __slots__ = ()
     tag_default = tag_encode(18)
@@ -3600,7 +3604,7 @@ class PrintableString(AllowableCharsMixin, CommonString):
     Its value is properly sanitized: see X.680 41.4 table 10.
 
     >>> PrintableString().allowable_chars
-    >>> set([' ', "'", ..., 'z'])
+    frozenset([' ', "'", ..., 'z'])
     """
     __slots__ = ()
     tag_default = tag_encode(19)
@@ -3664,7 +3668,7 @@ class UTCTime(CommonString):
 
     .. warning::
 
-       No BER encodings are supported. Only DER.
+       BER encoding is unsupported.
     """
     __slots__ = ()
     tag_default = tag_encode(23)
@@ -3818,7 +3822,7 @@ class GeneralizedTime(UTCTime):
 
     .. warning::
 
-       No BER encodings are supported. Only DER.
+       BER encoding is unsupported.
 
     .. warning::