From 9f176fcdc0580b408b734003c021fae32b644b4f Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Sat, 17 Oct 2015 15:22:44 +0700 Subject: Fix various warnings from recent commits --- .../src/crypto/agreement/jpake/JPakeParticipant.cs | 1 + .../agreement/jpake/JPakePrimeOrderGroups.cs | 4 +-- .../src/crypto/agreement/jpake/JPakeUtilities.cs | 1 - crypto/src/crypto/tls/TlsClientProtocol.cs | 12 ++++---- crypto/src/crypto/tls/TlsProtocol.cs | 36 +++++++++++----------- crypto/src/crypto/tls/TlsServerProtocol.cs | 12 ++++---- .../crypto/tls/test/TlsProtocolNonBlockingTest.cs | 4 +-- 7 files changed, 35 insertions(+), 35 deletions(-) (limited to 'crypto') diff --git a/crypto/src/crypto/agreement/jpake/JPakeParticipant.cs b/crypto/src/crypto/agreement/jpake/JPakeParticipant.cs index f8ca2cd41..794284866 100755 --- a/crypto/src/crypto/agreement/jpake/JPakeParticipant.cs +++ b/crypto/src/crypto/agreement/jpake/JPakeParticipant.cs @@ -421,6 +421,7 @@ namespace Org.BouncyCastle.Crypto.Agreement.JPake /// Throws CryptoException if validation fails. Throws InvalidOperationException if called prior to /// CalculateKeyingMaterial or multiple times /// + /// The round 3 payload received from the other participant. /// The keying material as returned from CalculateKeyingMaterial(). public virtual void ValidateRound3PayloadReceived(JPakeRound3Payload round3PayloadReceived, BigInteger keyingMaterial) { diff --git a/crypto/src/crypto/agreement/jpake/JPakePrimeOrderGroups.cs b/crypto/src/crypto/agreement/jpake/JPakePrimeOrderGroups.cs index 33640845a..192cd2b51 100755 --- a/crypto/src/crypto/agreement/jpake/JPakePrimeOrderGroups.cs +++ b/crypto/src/crypto/agreement/jpake/JPakePrimeOrderGroups.cs @@ -5,10 +5,10 @@ namespace Org.BouncyCastle.Crypto.Agreement.JPake /// /// Standard pre-computed prime order groups for use by J-PAKE. /// (J-PAKE can use pre-computed prime order groups, same as DSA and Diffie-Hellman.) - ///

+ ///

/// This class contains some convenient constants for use as input for /// constructing {@link JPAKEParticipant}s. - ///

+ ///

/// The prime order groups below are taken from Sun's JDK JavaDoc (docs/guide/security/CryptoSpec.html#AppB), /// and from the prime order groups /// published by NIST. diff --git a/crypto/src/crypto/agreement/jpake/JPakeUtilities.cs b/crypto/src/crypto/agreement/jpake/JPakeUtilities.cs index eaf8af676..b23518a8c 100644 --- a/crypto/src/crypto/agreement/jpake/JPakeUtilities.cs +++ b/crypto/src/crypto/agreement/jpake/JPakeUtilities.cs @@ -310,7 +310,6 @@ namespace Org.BouncyCastle.Crypto.Agreement.JPake /// /// throws CryptoException if the participantId strings are equal. ///

- /// the MacTag received from the partner public static void ValidateMacTag(string participantId, string partnerParticipantId, BigInteger gx1, BigInteger gx2, BigInteger gx3, BigInteger gx4, BigInteger keyingMaterial, IDigest digest, BigInteger partnerMacTag) diff --git a/crypto/src/crypto/tls/TlsClientProtocol.cs b/crypto/src/crypto/tls/TlsClientProtocol.cs index 14c1cf4a4..c2447e434 100644 --- a/crypto/src/crypto/tls/TlsClientProtocol.cs +++ b/crypto/src/crypto/tls/TlsClientProtocol.cs @@ -43,12 +43,12 @@ namespace Org.BouncyCastle.Crypto.Tls } /** - * Constructor for non-blocking mode.
- *
+ * Constructor for non-blocking mode.
+ *
* When data is received, use {@link #offerInput(java.nio.ByteBuffer)} to * provide the received ciphertext, then use - * {@link #readInput(byte[], int, int)} to read the corresponding cleartext.
- *
+ * {@link #readInput(byte[], int, int)} to read the corresponding cleartext.
+ *
* Similarly, when data needs to be sent, use * {@link #offerOutput(byte[], int, int)} to provide the cleartext, then use * {@link #readOutput(byte[], int, int)} to get the corresponding @@ -63,8 +63,8 @@ namespace Org.BouncyCastle.Crypto.Tls } /** - * Initiates a TLS handshake in the role of client.
- *
+ * Initiates a TLS handshake in the role of client.
+ *
* In blocking mode, this will not return until the handshake is complete. * In non-blocking mode, use {@link TlsPeer#NotifyHandshakeComplete()} to * receive a callback when the handshake is complete. diff --git a/crypto/src/crypto/tls/TlsProtocol.cs b/crypto/src/crypto/tls/TlsProtocol.cs index 7acc34d3c..fffde0b2b 100644 --- a/crypto/src/crypto/tls/TlsProtocol.cs +++ b/crypto/src/crypto/tls/TlsProtocol.cs @@ -604,15 +604,15 @@ namespace Org.BouncyCastle.Crypto.Tls } /** - * Offer input from an arbitrary source. Only allowed in non-blocking mode.
- *
+ * Offer input from an arbitrary source. Only allowed in non-blocking mode.
+ *
* After this method returns, the input buffer is "owned" by this object. Other code - * must not attempt to do anything with it.
- *
+ * must not attempt to do anything with it.
+ *
* This method will decrypt and process all records that are fully available. * If only part of a record is available, the buffer will be retained until the - * remainder of the record is offered.
- *
+ * remainder of the record is offered.
+ *
* If any records containing application data were processed, the decrypted data * can be obtained using {@link #readInput(byte[], int, int)}. If any records * containing protocol data were processed, a response may have been generated. @@ -649,8 +649,8 @@ namespace Org.BouncyCastle.Crypto.Tls /** * Gets the amount of received application data. A call to {@link #readInput(byte[], int, int)} - * is guaranteed to be able to return at least this much data.
- *
+ * is guaranteed to be able to return at least this much data.
+ *
* Only allowed in non-blocking mode. * @return The number of bytes of available application data */ @@ -666,8 +666,8 @@ namespace Org.BouncyCastle.Crypto.Tls * Retrieves received application data. Use {@link #getAvailableInputBytes()} to check * how much application data is currently available. This method functions similarly to * {@link InputStream#read(byte[], int, int)}, except that it never blocks. If no data - * is available, nothing will be copied and zero will be returned.
- *
+ * is available, nothing will be copied and zero will be returned.
+ *
* Only allowed in non-blocking mode. * @param buffer The buffer to hold the application data * @param offset The start offset in the buffer at which the data is written @@ -684,12 +684,12 @@ namespace Org.BouncyCastle.Crypto.Tls } /** - * Offer output from an arbitrary source. Only allowed in non-blocking mode.
- *
+ * Offer output from an arbitrary source. Only allowed in non-blocking mode.
+ *
* After this method returns, the specified section of the buffer will have been * processed. Use {@link #readOutput(byte[], int, int)} to get the bytes to - * transmit to the other peer.
- *
+ * transmit to the other peer.
+ *
* This method must not be called until after the handshake is complete! Attempting * to call it before the handshake is complete will result in an exception. * @param buffer The buffer containing application data to encrypt @@ -710,8 +710,8 @@ namespace Org.BouncyCastle.Crypto.Tls /** * Gets the amount of encrypted data available to be sent. A call to * {@link #readOutput(byte[], int, int)} is guaranteed to be able to return at - * least this much data.
- *
+ * least this much data.
+ *
* Only allowed in non-blocking mode. * @return The number of bytes of available encrypted data */ @@ -727,8 +727,8 @@ namespace Org.BouncyCastle.Crypto.Tls * Retrieves encrypted data to be sent. Use {@link #getAvailableOutputBytes()} to check * how much encrypted data is currently available. This method functions similarly to * {@link InputStream#read(byte[], int, int)}, except that it never blocks. If no data - * is available, nothing will be copied and zero will be returned.
- *
+ * is available, nothing will be copied and zero will be returned.
+ *
* Only allowed in non-blocking mode. * @param buffer The buffer to hold the encrypted data * @param offset The start offset in the buffer at which the data is written diff --git a/crypto/src/crypto/tls/TlsServerProtocol.cs b/crypto/src/crypto/tls/TlsServerProtocol.cs index 27f7a1dfd..4ab628b13 100644 --- a/crypto/src/crypto/tls/TlsServerProtocol.cs +++ b/crypto/src/crypto/tls/TlsServerProtocol.cs @@ -45,12 +45,12 @@ namespace Org.BouncyCastle.Crypto.Tls } /** - * Constructor for non-blocking mode.
- *
+ * Constructor for non-blocking mode.
+ *
* When data is received, use {@link #offerInput(java.nio.ByteBuffer)} to * provide the received ciphertext, then use - * {@link #readInput(byte[], int, int)} to read the corresponding cleartext.
- *
+ * {@link #readInput(byte[], int, int)} to read the corresponding cleartext.
+ *
* Similarly, when data needs to be sent, use * {@link #offerOutput(byte[], int, int)} to provide the cleartext, then use * {@link #readOutput(byte[], int, int)} to get the corresponding @@ -65,8 +65,8 @@ namespace Org.BouncyCastle.Crypto.Tls } /** - * Receives a TLS handshake in the role of server.
- *
+ * Receives a TLS handshake in the role of server.
+ *
* In blocking mode, this will not return until the handshake is complete. * In non-blocking mode, use {@link TlsPeer#notifyHandshakeComplete()} to * receive a callback when the handshake is complete. diff --git a/crypto/test/src/crypto/tls/test/TlsProtocolNonBlockingTest.cs b/crypto/test/src/crypto/tls/test/TlsProtocolNonBlockingTest.cs index 5fe0f32ad..477e287f1 100644 --- a/crypto/test/src/crypto/tls/test/TlsProtocolNonBlockingTest.cs +++ b/crypto/test/src/crypto/tls/test/TlsProtocolNonBlockingTest.cs @@ -104,7 +104,7 @@ namespace Org.BouncyCastle.Crypto.Tls.Tests protocol.OfferInput(new byte[10]); Assert.Fail("Input was accepted after close"); } - catch (IOException e) + catch (IOException) { } @@ -113,7 +113,7 @@ namespace Org.BouncyCastle.Crypto.Tls.Tests protocol.OfferOutput(new byte[10], 0, 10); Assert.Fail("Output was accepted after close"); } - catch (IOException e) + catch (IOException) { } } -- cgit 1.4.1