summary refs log tree commit diff
path: root/crypto/src/asn1
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/asn1')
-rw-r--r--crypto/src/asn1/x509/ExtendedKeyUsage.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/crypto/src/asn1/x509/ExtendedKeyUsage.cs b/crypto/src/asn1/x509/ExtendedKeyUsage.cs
index 57f769879..a5b11f210 100644
--- a/crypto/src/asn1/x509/ExtendedKeyUsage.cs
+++ b/crypto/src/asn1/x509/ExtendedKeyUsage.cs
@@ -84,10 +84,11 @@ namespace Org.BouncyCastle.Asn1.X509
         {
             Asn1EncodableVector v = new Asn1EncodableVector();
 
-            foreach (Asn1Object o in usages)
+            foreach (object usage in usages)
             {
-                v.Add(o);
+                Asn1Encodable o = KeyPurposeID.GetInstance(usage);
 
+                v.Add(o);
                 this.usageTable[o] = o;
             }