summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Matveev <stargrave@stargrave.org>2020-08-04 12:20:01 +0300
committerSergey Matveev <stargrave@stargrave.org>2020-08-04 12:20:01 +0300
commit313eaab6514eff3ce3d1e4bee615eb38299c2f89 (patch)
tree70bb1e7710e9168df22ee429170fe96c2b9ca05a
parent51d8bc7d4d177738189dc696a21326456f05bb74 (diff)
downloadpygost-master.tar.xz
Use already existing IssuerAndSerialNumberHEADmaster
-rw-r--r--pygost/asn1schemas/cms.py40
1 files changed, 20 insertions, 20 deletions
diff --git a/pygost/asn1schemas/cms.py b/pygost/asn1schemas/cms.py
index a39b10b..d2d5327 100644
--- a/pygost/asn1schemas/cms.py
+++ b/pygost/asn1schemas/cms.py
@@ -59,10 +59,25 @@ class ContentType(ObjectIdentifier):
pass
+class IssuerAndSerialNumber(Sequence):
+ schema = (
+ ("issuer", Name()),
+ ("serialNumber", CertificateSerialNumber()),
+ )
+
+
+class KeyIdentifier(OctetString):
+ pass
+
+
+class SubjectKeyIdentifier(KeyIdentifier):
+ pass
+
+
class RecipientIdentifier(Choice):
schema = (
- ("issuerAndSerialNumber", Any()),
- # ("subjectKeyIdentifier", SubjectKeyIdentifier(impl=tag_ctxp(0))),
+ ("issuerAndSerialNumber", IssuerAndSerialNumber()),
+ ("subjectKeyIdentifier", SubjectKeyIdentifier(impl=tag_ctxp(0))),
)
@@ -159,21 +174,6 @@ class OriginatorPublicKey(Sequence):
)
-class IssuerAndSerialNumber(Sequence):
- schema = (
- ("issuer", Name()),
- ("serialNumber", CertificateSerialNumber()),
- )
-
-
-class KeyIdentifier(OctetString):
- pass
-
-
-class SubjectKeyIdentifier(KeyIdentifier):
- pass
-
-
class OriginatorIdentifierOrKey(Choice):
schema = (
("issuerAndSerialNumber", IssuerAndSerialNumber()),
@@ -188,7 +188,7 @@ class UserKeyingMaterial(OctetString):
class KeyAgreeRecipientIdentifier(Choice):
schema = (
- ("issuerAndSerialNumber", Any()),
+ ("issuerAndSerialNumber", IssuerAndSerialNumber()),
# ("rKeyId", RecipientKeyIdentifier(impl=tag_ctxc(0))),
)
@@ -326,8 +326,8 @@ class EncapsulatedContentInfo(Sequence):
class SignerIdentifier(Choice):
schema = (
- ("issuerAndSerialNumber", Any()),
- # ("subjectKeyIdentifier", SubjectKeyIdentifier(impl=tag_ctxp(0))),
+ ("issuerAndSerialNumber", IssuerAndSerialNumber()),
+ ("subjectKeyIdentifier", SubjectKeyIdentifier(impl=tag_ctxp(0))),
)