class RevDetails(univ.Sequence): """ RevDetails ::= SEQUENCE { certDetails CertTemplate, crlEntryDetails Extensions OPTIONAL } """ componentType = namedtype.NamedTypes( namedtype.NamedType('certDetails', rfc4211.CertTemplate()), namedtype.OptionalNamedType('crlEntryDetails', rfc5280.Extensions()))
class CertificateTrustList(univ.Sequence): componentType = namedtype.NamedTypes( namedtype.DefaultedNamedType('version', CTLVersion('v1')), namedtype.NamedType('subjectUsage', SubjectUsage()), namedtype.OptionalNamedType('listIdentifier', ListIdentifier()), namedtype.OptionalNamedType('sequenceNumber', univ.Integer()), namedtype.NamedType('ctlThisUpdate', rfc5280.Time()), namedtype.OptionalNamedType('ctlNextUpdate', rfc5280.Time()), namedtype.NamedType('subjectAlgorithm', rfc5280.AlgorithmIdentifier()), namedtype.OptionalNamedType('trustedSubjects', TrustedSubjects()), namedtype.OptionalNamedType('ctlExtensions', rfc5280.Extensions().subtype( explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))) )
class RevAnnContent(univ.Sequence): """ RevAnnContent ::= SEQUENCE { status PKIStatus, certId CertId, willBeRevokedAt GeneralizedTime, badSinceDate GeneralizedTime, crlDetails Extensions OPTIONAL } """ componentType = namedtype.NamedTypes( namedtype.NamedType('status', PKIStatus()), namedtype.NamedType('certId', rfc4211.CertId()), namedtype.NamedType('willBeRevokedAt', useful.GeneralizedTime()), namedtype.NamedType('badSinceDate', useful.GeneralizedTime()), namedtype.OptionalNamedType('crlDetails', rfc5280.Extensions()))
namedtype.DefaultedNamedType('version', AttCertVersionV1().subtype(value="v1")), namedtype.NamedType( 'subject', univ.Choice( componentType=namedtype.NamedTypes( namedtype.NamedType('baseCertificateID', rfc3281.IssuerSerial().subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))), namedtype.NamedType('subjectName', rfc5280.GeneralNames().subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1))) ) ) ), namedtype.NamedType('issuer', rfc5280.GeneralNames()), namedtype.NamedType('signature', rfc5280.AlgorithmIdentifier()), namedtype.NamedType('serialNumber', rfc5280.CertificateSerialNumber()), namedtype.NamedType('attCertValidityPeriod', rfc3281.AttCertValidityPeriod()), namedtype.NamedType('attributes', univ.SequenceOf(componentType=rfc5280.Attribute())), namedtype.OptionalNamedType('issuerUniqueID', rfc5280.UniqueIdentifier()), namedtype.OptionalNamedType('extensions', rfc5280.Extensions()) ) class AttributeCertificateV1(univ.Sequence): pass AttributeCertificateV1.componentType = namedtype.NamedTypes( namedtype.NamedType('acInfo', AttributeCertificateInfoV1()), namedtype.NamedType('signatureAlgorithm', rfc5280.AlgorithmIdentifier()), namedtype.NamedType('signature', univ.BitString()) ) class AttributeValue(univ.Any):
def setUp(self): self.asn1Spec = rfc5280.Extensions()
tag.tagClassContext, tag.tagFormatConstructed, 5))), namedtype.OptionalNamedType( 'publicKey', rfc5280.SubjectPublicKeyInfo().subtype( implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 6))), namedtype.OptionalNamedType( 'issuerUID', rfc5280.UniqueIdentifier().subtype( implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 7))), namedtype.OptionalNamedType( 'subjectUID', rfc5280.UniqueIdentifier().subtype( implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 8))), namedtype.OptionalNamedType( 'extensions', rfc5280.Extensions().subtype( implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 9)))) class Controls(univ.SequenceOf): pass Controls.componentType = AttributeTypeAndValue() Controls.sizeSpec = constraint.ValueSizeConstraint(1, MAX) class CertRequest(univ.Sequence): pass CertRequest.componentType = namedtype.NamedTypes(