summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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))),
)