1 files changed, 3 insertions, 23 deletions
diff --git a/crypto/src/cms/CMSAuthenticatedDataParser.cs b/crypto/src/cms/CMSAuthenticatedDataParser.cs
index bfd613229..a8f9c480c 100644
--- a/crypto/src/cms/CMSAuthenticatedDataParser.cs
+++ b/crypto/src/cms/CMSAuthenticatedDataParser.cs
@@ -161,17 +161,7 @@ namespace Org.BouncyCastle.Cms
if (s != null)
{
- Asn1EncodableVector v = new Asn1EncodableVector();
-
- IAsn1Convertible o;
- while ((o = s.ReadObject()) != null)
- {
- Asn1SequenceParser seq = (Asn1SequenceParser)o;
-
- v.Add(seq.ToAsn1Object());
- }
-
- authAttrs = new Asn1.Cms.AttributeTable(new DerSet(v));
+ authAttrs = CmsUtilities.ParseAttributeTable(s);
}
}
@@ -193,21 +183,11 @@ namespace Org.BouncyCastle.Cms
if (s != null)
{
- Asn1EncodableVector v = new Asn1EncodableVector();
-
- IAsn1Convertible o;
- while ((o = s.ReadObject()) != null)
- {
- Asn1SequenceParser seq = (Asn1SequenceParser)o;
-
- v.Add(seq.ToAsn1Object());
- }
-
- unauthAttrs = new Asn1.Cms.AttributeTable(new DerSet(v));
+ unauthAttrs = CmsUtilities.ParseAttributeTable(s);
}
}
return unauthAttrs;
}
- }
+ }
}
|