+class Digest(OctetString):
+ pass
+
+
+class AttributeValue(Any):
+ pass
+
+
+class AttributeValues(SetOf):
+ schema = AttributeValue()
+
+
+class EncryptedMac(OctetString):
+ pass
+
+
+class Attribute(Sequence):
+ schema = (
+ ("attrType", ObjectIdentifier(defines=(
+ (("attrValues",), {
+ id_contentType: ObjectIdentifier(),
+ id_messageDigest: Digest(),
+ id_cms_mac_attr: EncryptedMac(),
+ },),
+ ))),
+ ("attrValues", AttributeValues()),
+ )
+
+
+class UnprotectedAttributes(SetOf):
+ schema = Attribute()
+ bounds = (1, float("+inf"))
+
+
+class CertificateChoices(Choice):
+ schema = (
+ ("certificate", Certificate()),
+ # ("extendedCertificate", OctetString(impl=tag_ctxp(0))),
+ # ("v1AttrCert", AttributeCertificateV1(impl=tag_ctxc(1))), # V1 is osbolete
+ # ("v2AttrCert", AttributeCertificateV2(impl=tag_ctxc(2))),
+ # ("other", OtherCertificateFormat(impl=tag_ctxc(3))),
+ )
+
+
+class CertificateSet(SetOf):
+ schema = CertificateChoices()
+
+
+class OriginatorInfo(Sequence):
+ schema = (
+ ("certs", CertificateSet(impl=tag_ctxc(0), optional=True)),
+ # ("crls", RevocationInfoChoices(impl=tag_ctxc(1), optional=True)),
+ )
+
+