diff options
Diffstat (limited to 'crypto/src/asn1/cms/MetaData.cs')
-rw-r--r-- | crypto/src/asn1/cms/MetaData.cs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/crypto/src/asn1/cms/MetaData.cs b/crypto/src/asn1/cms/MetaData.cs index ad2b5c426..6435d4d2e 100644 --- a/crypto/src/asn1/cms/MetaData.cs +++ b/crypto/src/asn1/cms/MetaData.cs @@ -28,15 +28,17 @@ namespace Org.BouncyCastle.Asn1.Cms int index = 1; - if (index < seq.Count && seq[index] is DerUtf8String) + if (index < seq.Count && seq[index] is DerUtf8String utf8) { - this.fileName = DerUtf8String.GetInstance(seq[index++]); + this.fileName = utf8; + ++index; } - if (index < seq.Count && seq[index] is DerIA5String) + if (index < seq.Count && seq[index] is DerIA5String ia5) { - this.mediaType = DerIA5String.GetInstance(seq[index++]); - } - if (index < seq.Count) + this.mediaType = ia5; + ++index; + } + if (index < seq.Count) { this.otherMetaData = Attributes.GetInstance(seq[index++]); } |