summary refs log tree commit diff
path: root/crypto/src/pkcs
diff options
context:
space:
mode:
authorDavid Hook <dgh@cryptoworkshop.com>2022-07-10 13:31:41 +1000
committerDavid Hook <dgh@cryptoworkshop.com>2022-07-10 13:31:41 +1000
commita795e32c11ddec477e788e3882a3ba7ca3e47dab (patch)
treed801ab06ea1d3f2c5de1eede3177d115ad8ac336 /crypto/src/pkcs
parentMerge remote-tracking branch 'refs/remotes/origin/master' (diff)
downloadBouncyCastle.NET-ed25519-a795e32c11ddec477e788e3882a3ba7ca3e47dab.tar.xz
initial setting of trusted certificate entry
Diffstat (limited to 'crypto/src/pkcs')
-rw-r--r--crypto/src/pkcs/Pkcs12Store.cs8
1 files changed, 8 insertions, 0 deletions
diff --git a/crypto/src/pkcs/Pkcs12Store.cs b/crypto/src/pkcs/Pkcs12Store.cs
index f6e5c32e5..dc5f41dd5 100644
--- a/crypto/src/pkcs/Pkcs12Store.cs
+++ b/crypto/src/pkcs/Pkcs12Store.cs
@@ -827,6 +827,14 @@ namespace Org.BouncyCastle.Pkcs
                             new DerSet(new DerBmpString(certId))));
                 }
 
+                if (cert[MiscObjectIdentifiers.id_oracle_pkcs12_trusted_key_usage] == null)
+                {
+                    fName.Add(
+                        new DerSequence(
+                            MiscObjectIdentifiers.id_oracle_pkcs12_trusted_key_usage,
+                            new DerSet(KeyPurposeID.AnyExtendedKeyUsage)));
+                }
+
                 certBags.Add(new SafeBag(PkcsObjectIdentifiers.CertBag, cBag.ToAsn1Object(), new DerSet(fName)));
 
                 doneCerts.Add(cert.Certificate);