diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2014-08-21 18:32:13 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2014-08-21 18:32:13 +0700 |
commit | ccb0eab4d2aeba301fd4f64286c951518e8a6674 (patch) | |
tree | c1b3cfa0e51ee6da1d0f96dd4d381200a801100f /crypto | |
parent | More TLS ported from Java API (diff) | |
download | BouncyCastle.NET-ed25519-ccb0eab4d2aeba301fd4f64286c951518e8a6674.tar.xz |
Cater for possibly null ecPointFormats
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/src/crypto/tls/TlsEccUtilities.cs | 5 |
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); } |