diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2013-11-28 14:11:00 +0400 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2013-11-28 14:11:00 +0400 |
commit | 87cfdbd973dcd5172e056f00e6e58644486342f3 (patch) | |
tree | ab291e27d41927f2ab113633673f333147b56fb5 /core/src/main/java/org/bouncycastle/crypto/tls/TlsECCUtils.java | |
parent | e921f78433b08699fc4c1228384e982d7ae1ff97 (diff) |
Refactor array utility method into Arrays class
Diffstat (limited to 'core/src/main/java/org/bouncycastle/crypto/tls/TlsECCUtils.java')
-rw-r--r-- | core/src/main/java/org/bouncycastle/crypto/tls/TlsECCUtils.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/src/main/java/org/bouncycastle/crypto/tls/TlsECCUtils.java b/core/src/main/java/org/bouncycastle/crypto/tls/TlsECCUtils.java index dbc25884..3e7ef39d 100644 --- a/core/src/main/java/org/bouncycastle/crypto/tls/TlsECCUtils.java +++ b/core/src/main/java/org/bouncycastle/crypto/tls/TlsECCUtils.java @@ -20,6 +20,7 @@ import org.bouncycastle.crypto.params.ECPublicKeyParameters; import org.bouncycastle.math.ec.ECCurve; import org.bouncycastle.math.ec.ECFieldElement; import org.bouncycastle.math.ec.ECPoint; +import org.bouncycastle.util.Arrays; import org.bouncycastle.util.BigIntegers; import org.bouncycastle.util.Integers; @@ -73,7 +74,7 @@ public class TlsECCUtils { ecPointFormats = new short[] { ECPointFormat.uncompressed }; } - else if (!TlsProtocol.arrayContains(ecPointFormats, ECPointFormat.uncompressed)) + else if (!Arrays.contains(ecPointFormats, ECPointFormat.uncompressed)) { /* * RFC 4492 5.1. If the Supported Point Formats Extension is indeed sent, it MUST @@ -132,7 +133,7 @@ public class TlsECCUtils TlsProtocol.assertEmpty(buf); - if (!TlsProtocol.arrayContains(ecPointFormats, ECPointFormat.uncompressed)) + if (!Arrays.contains(ecPointFormats, ECPointFormat.uncompressed)) { /* * RFC 4492 5.1. If the Supported Point Formats Extension is indeed sent, it MUST @@ -524,7 +525,7 @@ public class TlsECCUtils private static void checkNamedCurve(int[] namedCurves, int namedCurve) throws IOException { - if (namedCurves != null && !TlsProtocol.arrayContains(namedCurves, namedCurve)) + if (namedCurves != null && !Arrays.contains(namedCurves, namedCurve)) { /* * RFC 4492 4. [...] servers MUST NOT negotiate the use of an ECC cipher suite |