From 8a0eced6d7015cd3450c387059cd0528a4c70763 Mon Sep 17 00:00:00 2001 From: wbond Date: Sat, 2 Sep 2023 12:04:08 -0400 Subject: [PATCH] Fix duplicate definition of RecipientKeyIdentifier --- asn1crypto/cms.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/asn1crypto/cms.py b/asn1crypto/cms.py index c395b227..2800051f 100644 --- a/asn1crypto/cms.py +++ b/asn1crypto/cms.py @@ -729,6 +729,10 @@ class RecipientKeyIdentifier(Sequence): ('other', OtherKeyAttribute, {'optional': True}), ] + def _setup(self): + super(RecipientKeyIdentifier, self)._setup() + self._field_map['subjectKeyIdentifier'] = self._field_map['subject_key_identifier'] + class KeyAgreementRecipientIdentifier(Choice): _alternatives = [ @@ -929,14 +933,6 @@ def decompressed(self): return self._decompressed -class RecipientKeyIdentifier(Sequence): - _fields = [ - ('subjectKeyIdentifier', OctetString), - ('date', GeneralizedTime, {'optional': True}), - ('other', OtherKeyAttribute, {'optional': True}), - ] - - class SMIMEEncryptionKeyPreference(Choice): _alternatives = [ ('issuer_and_serial_number', IssuerAndSerialNumber, {'implicit': 0}),