summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Matveev <stargrave@stargrave.org>2020-03-23 10:41:18 +0300
committerSergey Matveev <stargrave@stargrave.org>2020-03-24 18:50:07 +0300
commitdf4edf45ae38fdde82784de40a95f6f0279f5e89 (patch)
tree9982beb3824cd48d15f7c0305740a65f423473bd
parentc2a5b57cb40ea08fa13ec7d1591881d4b19bab1e (diff)
downloadpyderasn-df4edf45ae38fdde82784de40a95f6f0279f5e89.tar.xz
Also print full TLVlen7.5
-rw-r--r--VERSION2
-rw-r--r--doc/install.rst12
-rw-r--r--doc/news.rst6
-rwxr-xr-xpyderasn.py8
4 files changed, 20 insertions, 8 deletions
diff --git a/VERSION b/VERSION
index 37722eb..c382960 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-7.4
+7.5
diff --git a/doc/install.rst b/doc/install.rst
index 8aa3bd0..7e56b39 100644
--- a/doc/install.rst
+++ b/doc/install.rst
@@ -4,11 +4,11 @@ Install
Preferable way is to :ref:`download <download>` tarball with the
signature from `official website <http://pyderasn.cypherpunks.ru/>`__::
- $ [fetch|wget] http://pyderasn.cypherpunks.ru/pyderasn-7.4.tar.xz
- $ [fetch|wget] http://pyderasn.cypherpunks.ru/pyderasn-7.4.tar.xz.sig
- $ gpg --verify pyderasn-7.4.tar.xz.sig pyderasn-7.4.tar.xz
- $ xz --decompress --stdout pyderasn-7.4.tar.xz | tar xf -
- $ cd pyderasn-7.4
+ $ [fetch|wget] http://pyderasn.cypherpunks.ru/pyderasn-7.5.tar.xz
+ $ [fetch|wget] http://pyderasn.cypherpunks.ru/pyderasn-7.5.tar.xz.sig
+ $ gpg --verify pyderasn-7.5.tar.xz.sig pyderasn-7.5.tar.xz
+ $ xz --decompress --stdout pyderasn-7.5.tar.xz | tar xf -
+ $ cd pyderasn-7.5
$ python setup.py install
# or copy pyderasn.py (+six.py, possibly termcolor.py) to your PYTHONPATH
@@ -21,7 +21,7 @@ You can also find it mirrored on :ref:`download <download>` page.
You could use pip (**no** OpenPGP authentication is performed!) with PyPI::
$ cat > requirements.txt <<EOF
- pyderasn==7.4 --hash=sha256:TO-BE-FILLED
+ pyderasn==7.5 --hash=sha256:TO-BE-FILLED
six==1.14.0 --hash=sha256:236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a
EOF
$ pip install --requirement requirements.txt
diff --git a/doc/news.rst b/doc/news.rst
index 10befb1..0160781 100644
--- a/doc/news.rst
+++ b/doc/news.rst
@@ -1,6 +1,12 @@
News
====
+.. _release7.5:
+
+7.5
+---
+* Also print full TLVlen in ASN.1 browser
+
.. _release7.4:
7.4
diff --git a/pyderasn.py b/pyderasn.py
index a4b7deb..f611efa 100755
--- a/pyderasn.py
+++ b/pyderasn.py
@@ -1193,7 +1193,7 @@ except ImportError: # pragma: no cover
def colored(what, *args, **kwargs):
return what
-__version__ = "7.4"
+__version__ = "7.5"
__all__ = (
"agg_octet_string",
@@ -7539,6 +7539,9 @@ def browse(raw, obj, oid_maps=()):
[("header", "[TLV]len: "), "%d/%d/%d" % (
pp.tlen, pp.llen, pp.vlen,
)],
+ [("header", "TLVlen: "), "%d" % sum((
+ pp.tlen, pp.llen, pp.vlen,
+ ))],
[("header", "Slice: "), "[%d:%d]" % (
pp.offset, pp.offset + pp.tlen + pp.llen + pp.vlen,
)],
@@ -7558,6 +7561,9 @@ def browse(raw, obj, oid_maps=()):
lines.append([" [TLV]len: %d/%d/%d" % (
pp.expl_tlen, pp.expl_llen, pp.expl_vlen,
)])
+ lines.append([" TLVlen: %d" % sum((
+ pp.expl_tlen, pp.expl_llen, pp.expl_vlen,
+ ))])
lines.append([" Slice: [%d:%d]" % (
pp.expl_offset,
pp.expl_offset + pp.expl_tlen + pp.expl_llen + pp.expl_vlen,