summary refs log tree commit diff
path: root/crypto/test/src
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/test/src')
-rw-r--r--crypto/test/src/security/test/JksStoreTest.cs16
1 files changed, 16 insertions, 0 deletions
diff --git a/crypto/test/src/security/test/JksStoreTest.cs b/crypto/test/src/security/test/JksStoreTest.cs

index 335786f5e..8794d48a6 100644 --- a/crypto/test/src/security/test/JksStoreTest.cs +++ b/crypto/test/src/security/test/JksStoreTest.cs
@@ -9,6 +9,8 @@ using Org.BouncyCastle.Crypto.Parameters; using Org.BouncyCastle.Math; using Org.BouncyCastle.Utilities.Encoders; +using Org.BouncyCastle.Utilities.Test; + namespace Org.BouncyCastle.Security.Tests { [TestFixture] @@ -177,5 +179,19 @@ namespace Org.BouncyCastle.Security.Tests // Expected } } + + [Test] + public void TestJksModifiedUtf8Roundtrip() + { + JksStore ks = new JksStore(); + Stream fIn = SimpleTest.GetTestDataAsStream("jks.cacerts.jks"); + + ks.Load(fIn, "changeit".ToCharArray()); + + MemoryStream bOut = new MemoryStream(); + ks.Save(bOut, "changedit".ToCharArray()); + + ks.Load(new MemoryStream(bOut.ToArray()), "changedit".ToCharArray()); + } } }