diff options
author | David Hook <dgh@cryptoworkshop.com> | 2022-07-10 13:31:41 +1000 |
---|---|---|
committer | David Hook <dgh@cryptoworkshop.com> | 2022-07-10 13:31:41 +1000 |
commit | a795e32c11ddec477e788e3882a3ba7ca3e47dab (patch) | |
tree | d801ab06ea1d3f2c5de1eede3177d115ad8ac336 /crypto/src/pkcs | |
parent | Merge remote-tracking branch 'refs/remotes/origin/master' (diff) | |
download | BouncyCastle.NET-ed25519-a795e32c11ddec477e788e3882a3ba7ca3e47dab.tar.xz |
initial setting of trusted certificate entry
Diffstat (limited to 'crypto/src/pkcs')
-rw-r--r-- | crypto/src/pkcs/Pkcs12Store.cs | 8 |
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); |