summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Matveev <stargrave@stargrave.org>2020-05-12 23:59:40 +0300
committerSergey Matveev <stargrave@stargrave.org>2020-05-12 23:59:49 +0300
commitaa825fdacef98a5aac4046eedd6e7b9a9ee525e3 (patch)
treeb9b0bdf216984c8461b90064c34739574737bc94
parentdfa5e690f30f29a44f529f8a9951688b43c6ce3b (diff)
downloadpygost-aa825fdacef98a5aac4046eedd6e7b9a9ee525e3.tar.xz
X.509 certificate uses reversed digest
Fix asn1schemas/cert-selfsigned-example.py.
-rw-r--r--pygost/asn1schemas/cert-selfsigned-example.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pygost/asn1schemas/cert-selfsigned-example.py b/pygost/asn1schemas/cert-selfsigned-example.py
index 10ec5d2..e8a3327 100644
--- a/pygost/asn1schemas/cert-selfsigned-example.py
+++ b/pygost/asn1schemas/cert-selfsigned-example.py
@@ -123,7 +123,7 @@ cert = Certificate((
("signatureValue", BitString(sign(
curve,
prv,
- GOST34112012512(tbs.encode()).digest(),
+ GOST34112012512(tbs.encode()).digest()[::-1],
mode=2012,
))),
))