Skip to content

Commit 967f75e

Browse files
committed
Proper styling for comments to match code standards (WolfSSLEngineHelper.java) and fixed identation (WolfSSLSocket.java)
1 parent 20befbc commit 967f75e

2 files changed

Lines changed: 12 additions & 8 deletions

File tree

src/java/com/wolfssl/provider/jsse/WolfSSLEngineHelper.java

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1377,18 +1377,22 @@ else if (peerAddr != null) {
13771377
private void checkKeySize(WolfSSLSession ssl, boolean clientMode) throws SSLException, WolfSSLException {
13781378
int keySize = this.ssl.getKeySize();
13791379

1380-
// Before we update the cached values, and return from the handshake, we
1381-
// check if we are running a legacy cipher suite, if so, we make sure
1382-
// that the actual key size is at least 1024 bits.
1380+
/*
1381+
* Before we update the cached values, and return from the handshake,
1382+
* we check if we are running a legacy cipher suite, if so, we make sure
1383+
* that the actual key size is at least 1024 bits.
1384+
*/
13831385
String[] cipherSuites = getCiphers();
13841386

13851387
if (containsDHECiphers(cipherSuites)) {
1386-
// Get the minimum DH key size from security settings
1388+
/* Get the minimum DH key size from security settings. */
13871389
int minDHEKeySize;
13881390
try {
13891391
minDHEKeySize = WolfSSLUtil.getDisabledAlgorithmsKeySizeLimit("DH");
13901392

1391-
// If we're trying to use DHE with insufficient key size, throw early
1393+
/*
1394+
* If we're trying to use DHE with
1395+
* insufficient key size, throw early. */
13921396
if (isLegacyDHEnabled() && keySize < minDHEKeySize) {
13931397
if (clientMode) {
13941398
throw new SSLHandshakeException(
@@ -1414,7 +1418,7 @@ private boolean containsDHECiphers(String[] cipherSuites) {
14141418
}
14151419

14161420
private boolean isLegacyDHEnabled() {
1417-
// Check if legacy DH is enabled through system properties
1421+
/* Check if legacy DH is enabled through system properties. */
14181422
String dhKeySize = System.getProperty("jdk.tls.ephemeralDHKeySize");
14191423
return "legacy".equals(dhKeySize);
14201424
}

src/java/com/wolfssl/provider/jsse/WolfSSLSocket.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1573,10 +1573,10 @@ public synchronized void startHandshake() throws IOException {
15731573
close();
15741574
throw e;
15751575
} catch (WolfSSLException e) {
1576-
/* close socket if the handshake is unsuccessful */
1576+
/* close socket if the handshake is unsuccessful */
15771577
close();
15781578
throw new SSLException("Handshake failed: " + e.getMessage(), e);
1579-
}
1579+
}
15801580

15811581
if (ret != WolfSSL.SSL_SUCCESS) {
15821582
close();

0 commit comments

Comments
 (0)