From ccb0eab4d2aeba301fd4f64286c951518e8a6674 Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Thu, 21 Aug 2014 18:32:13 +0700 Subject: Cater for possibly null ecPointFormats --- crypto/src/crypto/tls/TlsEccUtilities.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'crypto') 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); } -- cgit 1.5.1