summary refs log tree commit diff
path: root/crypto/src
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2019-05-06 17:43:16 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2019-05-06 17:43:16 +0700
commita0f190f93151a9b83194603ac56120337c1bdfbd (patch)
tree3d2ed0c831d6f98c18222ae03c04110838733d33 /crypto/src
parentEdDSA verifiers now reject overly long signatures (diff)
downloadBouncyCastle.NET-ed25519-a0f190f93151a9b83194603ac56120337c1bdfbd.tar.xz
TLS: Clone in GetPsk since TlsPskKeyExchange will clear after use
- use not-all-zeroes test psk to ensure coverage
Diffstat (limited to 'crypto/src')
-rw-r--r--crypto/src/crypto/tls/BasicTlsPskIdentity.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/src/crypto/tls/BasicTlsPskIdentity.cs b/crypto/src/crypto/tls/BasicTlsPskIdentity.cs
index db5954422..7a3bbe72e 100644
--- a/crypto/src/crypto/tls/BasicTlsPskIdentity.cs
+++ b/crypto/src/crypto/tls/BasicTlsPskIdentity.cs
@@ -37,7 +37,7 @@ namespace Org.BouncyCastle.Crypto.Tls
 
         public virtual byte[] GetPsk()
         {
-            return mPsk;
+            return Arrays.Clone(mPsk);
         }
     }
 }