summary refs log tree commit diff
path: root/crypto
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2014-08-21 18:32:13 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2014-08-21 18:32:13 +0700
commitccb0eab4d2aeba301fd4f64286c951518e8a6674 (patch)
treec1b3cfa0e51ee6da1d0f96dd4d381200a801100f /crypto
parentMore TLS ported from Java API (diff)
downloadBouncyCastle.NET-ed25519-ccb0eab4d2aeba301fd4f64286c951518e8a6674.tar.xz
Cater for possibly null ecPointFormats
Diffstat (limited to '')
-rw-r--r--crypto/src/crypto/tls/TlsEccUtilities.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/crypto/src/crypto/tls/TlsEccUtilities.cs b/crypto/src/crypto/tls/TlsEccUtilities.cs

index 909a1002c..fd3145305 100644 --- a/crypto/src/crypto/tls/TlsEccUtilities.cs +++ b/crypto/src/crypto/tls/TlsEccUtilities.cs
@@ -372,8 +372,11 @@ namespace Org.BouncyCastle.Crypto.Tls throw new TlsFatalAlert(AlertDescription.illegal_parameter); } - if (!Arrays.Contains(ecPointFormats, actualFormat)) + if (actualFormat != ECPointFormat.uncompressed + && (ecPointFormats == null || !Arrays.Contains(ecPointFormats, actualFormat))) + { throw new TlsFatalAlert(AlertDescription.illegal_parameter); + } return curve.DecodePoint(encoding); }