X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=pygost%2Fasn1schemas%2Fx509.py;h=7977c31345ef4cc37e6fe0abe27c3d65114fc0cd;hb=c77746f7982c41953bfbc06b28dceceda88042e9;hp=ce30f62bd4948197aaf6dce5033b175c1474752b;hpb=d46cf8e38114e224e5b4cb9a23105dbf7d24a484;p=pygost.git diff --git a/pygost/asn1schemas/x509.py b/pygost/asn1schemas/x509.py index ce30f62..7977c31 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-2020 Sergey Matveev +# Copyright (C) 2015-2021 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 @@ -35,6 +35,12 @@ from pyderasn import tag_ctxp from pyderasn import TeletexString from pyderasn import UTCTime +from pygost.asn1schemas.oids import id_at_commonName +from pygost.asn1schemas.oids import id_at_countryName +from pygost.asn1schemas.oids import id_at_localityName +from pygost.asn1schemas.oids import id_at_organizationName +from pygost.asn1schemas.oids import id_at_stateOrProvinceName + class Version(Integer): schema = ( @@ -73,11 +79,11 @@ class OrganizationName(Choice): class AttributeTypeAndValue(Sequence): schema = ( ("type", AttributeType(defines=(((".", "value"), { - ObjectIdentifier("2.5.4.6"): PrintableString(), - ObjectIdentifier("2.5.4.8"): PrintableString(), - ObjectIdentifier("2.5.4.7"): PrintableString(), - ObjectIdentifier("2.5.4.10"): OrganizationName(), - ObjectIdentifier("2.5.4.3"): PrintableString(), + id_at_countryName: PrintableString(), + id_at_stateOrProvinceName: PrintableString(), + id_at_localityName: PrintableString(), + id_at_organizationName: OrganizationName(), + id_at_commonName: PrintableString(), }),))), ("value", AttributeValue()), ) @@ -140,8 +146,8 @@ class SubjectKeyIdentifier(KeyIdentifier): class BasicConstraints(Sequence): schema = ( - ('cA', Boolean(default=False)), - # ('pathLenConstraint', PathLenConstraint(optional=True)), + ("cA", Boolean(default=False)), + # ("pathLenConstraint", PathLenConstraint(optional=True)), )