X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=pygost%2Fasn1schemas%2Fx509.py;h=19a3b39e5742e4c46657e2a4d71d9c9df64fdeb4;hb=b8b853ca49a9dca40f446880fa809af51c611fe0;hp=cda11da42dcb4d1a8daff65bb054b9c6d02108f4;hpb=08cedcc91f44b8ffd2d8f3a3fbbb15263ccff440;p=pygost.git diff --git a/pygost/asn1schemas/x509.py b/pygost/asn1schemas/x509.py index cda11da..19a3b39 100644 --- a/pygost/asn1schemas/x509.py +++ b/pygost/asn1schemas/x509.py @@ -1,6 +1,6 @@ # coding: utf-8 # PyGOST -- Pure Python GOST cryptographic functions library -# Copyright (C) 2015-2021 Sergey Matveev +# Copyright (C) 2015-2022 Sergey Matveev # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -246,3 +246,17 @@ class AuthorityKeyIdentifier(Sequence): # CertificateSerialNumber(impl=tag_ctxp(2), optional=True), # ), ) + + +class KeyUsage(BitString): + schema = ( + ("digitalSignature", 0), + ("nonRepudiation", 1), + ("keyEncipherment", 2), + ("dataEncipherment", 3), + ("keyAgreement", 4), + ("keyCertSign", 5), + ("cRLSign", 6), + ("encipherOnly", 7), + ("decipherOnly", 8), + )