Skip to content

Commit c1dccb8

Browse files
committed
Experimental: unwrap lines where <=80 chars
1 parent 13cb353 commit c1dccb8

18 files changed

Lines changed: 54 additions & 108 deletions

src/java/com/wolfssl/WolfSSL.java

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -670,14 +670,10 @@ public WolfSSL() throws WolfSSLException {
670670
getTls13SecretEnum_CLIENT_HANDSHAKE_TRAFFIC_SECRET();
671671
SERVER_HANDSHAKE_TRAFFIC_SECRET =
672672
getTls13SecretEnum_SERVER_HANDSHAKE_TRAFFIC_SECRET();
673-
CLIENT_TRAFFIC_SECRET =
674-
getTls13SecretEnum_CLIENT_TRAFFIC_SECRET();
675-
SERVER_TRAFFIC_SECRET =
676-
getTls13SecretEnum_SERVER_TRAFFIC_SECRET();
677-
EARLY_EXPORTER_SECRET =
678-
getTls13SecretEnum_EARLY_EXPORTER_SECRET();
679-
EXPORTER_SECRET =
680-
getTls13SecretEnum_EXPORTER_SECRET();
673+
CLIENT_TRAFFIC_SECRET = getTls13SecretEnum_CLIENT_TRAFFIC_SECRET();
674+
SERVER_TRAFFIC_SECRET = getTls13SecretEnum_SERVER_TRAFFIC_SECRET();
675+
EARLY_EXPORTER_SECRET = getTls13SecretEnum_EARLY_EXPORTER_SECRET();
676+
EXPORTER_SECRET = getTls13SecretEnum_EXPORTER_SECRET();
681677

682678
this.active = true;
683679

@@ -783,8 +779,7 @@ public static void loadLibrary() throws UnsatisfiedLinkError {
783779

784780
int fipsLoaded = 0;
785781

786-
String skipLoad =
787-
System.getProperty("wolfssl.skipLibraryLoad");
782+
String skipLoad = System.getProperty("wolfssl.skipLibraryLoad");
788783
if (skipLoad != null && skipLoad.equalsIgnoreCase("true")) {
789784
/* User will load native libraries manually */
790785
libraryLoadSkipped = true;

src/java/com/wolfssl/WolfSSLCRL.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,7 @@ private static Asn1TimeData buildAsn1TimeData(Date date) {
114114
boolean useUtcTime = (year >= ASN1_UTC_YEAR_MIN &&
115115
year <= ASN1_UTC_YEAR_MAX);
116116

117-
String pattern = useUtcTime ? "yyMMddHHmmss'Z'" :
118-
"yyyyMMddHHmmss'Z'";
117+
String pattern = useUtcTime ? "yyMMddHHmmss'Z'" : "yyyyMMddHHmmss'Z'";
119118
int type = useUtcTime ? ASN_UTC_TIME : ASN_GENERALIZED_TIME;
120119

121120
SimpleDateFormat format = new SimpleDateFormat(pattern, Locale.US);
@@ -160,8 +159,7 @@ public WolfSSLCRL() throws WolfSSLException {
160159
this.weOwnCrlPtr = true;
161160

162161
WolfSSLDebug.log(getClass(), WolfSSLDebug.Component.JNI,
163-
WolfSSLDebug.INFO, crlPtr,
164-
() -> "creating new WolfSSLCRL");
162+
WolfSSLDebug.INFO, crlPtr, () -> "creating new WolfSSLCRL");
165163

166164
synchronized (stateLock) {
167165
this.active = true;
@@ -646,8 +644,7 @@ public byte[] getSignature() {
646644

647645
synchronized (crlLock) {
648646
WolfSSLDebug.log(getClass(), WolfSSLDebug.Component.JNI,
649-
WolfSSLDebug.INFO, this.crlPtr,
650-
() -> "entered getSignature()");
647+
WolfSSLDebug.INFO, this.crlPtr, () -> "entered getSignature()");
651648

652649
return X509_CRL_get_signature(this.crlPtr);
653650
}

src/java/com/wolfssl/WolfSSLCertificate.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -877,8 +877,7 @@ public void setAuthorityKeyIdEx(WolfSSLCertificate issuer)
877877
() -> "entering setAuthorityKeyIdEx(issuerPtr=" +
878878
issuerX509Ptr + ")");
879879

880-
ret = X509_set_authority_key_id_ex(this.x509Ptr,
881-
issuerX509Ptr);
880+
ret = X509_set_authority_key_id_ex(this.x509Ptr, issuerX509Ptr);
882881
}
883882

884883
if (ret != WolfSSL.SSL_SUCCESS) {
@@ -1238,8 +1237,7 @@ public void addAltNameIP(String ipAddress)
12381237
throws IllegalStateException, WolfSSLException {
12391238

12401239
if (ipAddress == null || ipAddress.isEmpty()) {
1241-
throw new WolfSSLException(
1242-
"IP address must not be null or empty");
1240+
throw new WolfSSLException("IP address must not be null or empty");
12431241
}
12441242

12451243
addAltName(ipAddress, WolfSSL.ASN_IP_TYPE);

src/java/com/wolfssl/WolfSSLContext.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,7 @@ private int internalIORecvCallback(WolfSSLSession ssl, byte[] buf, int sz)
155155
int ret;
156156

157157
/* call user-registered recv method */
158-
ret = internRecvCb.receiveCallback(ssl, buf, sz,
159-
ssl.getIOReadCtx());
158+
ret = internRecvCb.receiveCallback(ssl, buf, sz, ssl.getIOReadCtx());
160159

161160
return ret;
162161
}
@@ -166,8 +165,7 @@ private int internalIOSendCallback(WolfSSLSession ssl, byte[] buf, int sz)
166165
int ret;
167166

168167
/* call user-registered recv method */
169-
ret = internSendCb.sendCallback(ssl, buf, sz,
170-
ssl.getIOWriteCtx());
168+
ret = internSendCb.sendCallback(ssl, buf, sz, ssl.getIOWriteCtx());
171169

172170
return ret;
173171
}
@@ -319,8 +317,7 @@ private int internalRsaDecCallback(WolfSSLSession ssl, ByteBuffer in,
319317
}
320318

321319
private long internalPskClientCallback(WolfSSLSession ssl, String hint,
322-
StringBuffer identity, long idMaxLen, byte[] key,
323-
long keyMaxLen)
320+
StringBuffer identity, long idMaxLen, byte[] key, long keyMaxLen)
324321
{
325322
long ret;
326323

src/java/com/wolfssl/WolfSSLDebug.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ public class WolfSSLDebug {
5050
* com.wolfssl.jni - JNI layer logging
5151
* com.wolfssl.jsse - JSSE layer logging
5252
*/
53-
private static final Logger jniLogger =
54-
Logger.getLogger("com.wolfssl.jni");
53+
private static final Logger jniLogger = Logger.getLogger("com.wolfssl.jni");
5554
private static final Logger jsseLogger =
5655
Logger.getLogger("com.wolfssl.jsse");
5756

src/java/com/wolfssl/WolfSSLIOSendCallback.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ public interface WolfSSLIOSendCallback {
5050
* codes, see the default EmbedSend() function in
5151
* wolfssl_package/src/io.c
5252
*/
53-
public int sendCallback(WolfSSLSession ssl, byte[] buf, int sz,
54-
Object ctx);
53+
public int sendCallback(WolfSSLSession ssl, byte[] buf, int sz, Object ctx);
5554
}
5655

src/java/com/wolfssl/WolfSSLPskClientCallback.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ public interface WolfSSLPskClientCallback {
5050
* @return length of key in octets or 0 for error
5151
*/
5252
public long pskClientCallback(WolfSSLSession ssl, String hint,
53-
StringBuffer identity, long idMaxLen, byte[] key,
54-
long keyMaxLen);
53+
StringBuffer identity, long idMaxLen, byte[] key, long keyMaxLen);
5554
}
5655

src/java/com/wolfssl/WolfSSLSession.java

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -506,8 +506,7 @@ private int internalIOSSLSendCallback(WolfSSLSession ssl,
506506
}
507507

508508
private long internalPskClientCallback(WolfSSLSession ssl, String hint,
509-
StringBuffer identity, long idMaxLen, byte[] key,
510-
long keyMaxLen)
509+
StringBuffer identity, long idMaxLen, byte[] key, long keyMaxLen)
511510
{
512511
/* call user-registered PSK client callback method */
513512
return internPskClientCb.pskClientCallback(ssl, hint, identity,
@@ -638,8 +637,7 @@ private native int useCertificateBuffer(long ssl, byte[] in, long sz,
638637
int format);
639638
private native int usePrivateKeyBuffer(long ssl, byte[] in, long sz,
640639
int format);
641-
private native int useCertificateChainBuffer(long ssl, byte[] in,
642-
long sz);
640+
private native int useCertificateChainBuffer(long ssl, byte[] in, long sz);
643641
private native int useCertificateChainBufferFormat(
644642
long ssl, byte[] in, long sz, int format);
645643
private native int setGroupMessages(long ssl);
@@ -1798,8 +1796,7 @@ public void freeSSL()
17981796
}
17991797

18001798
WolfSSLDebug.log(getClass(), WolfSSLDebug.Component.JNI,
1801-
WolfSSLDebug.INFO, this.sslPtr,
1802-
() -> "entered freeSSL()");
1799+
WolfSSLDebug.INFO, this.sslPtr, () -> "entered freeSSL()");
18031800

18041801
/* free native resources */
18051802
freeSSL(this.sslPtr);
@@ -4007,8 +4004,7 @@ public byte[] getMacSecret(int verify)
40074004

40084005
synchronized (sslLock) {
40094006
WolfSSLDebug.log(getClass(), WolfSSLDebug.Component.JNI,
4010-
WolfSSLDebug.INFO, this.sslPtr,
4011-
() -> "entered getMacSecret()");
4007+
WolfSSLDebug.INFO, this.sslPtr, () -> "entered getMacSecret()");
40124008

40134009
return getMacSecret(this.sslPtr, verify);
40144010
}
@@ -4129,8 +4125,7 @@ public int getKeySize() throws IllegalStateException {
41294125

41304126
synchronized (sslLock) {
41314127
WolfSSLDebug.log(getClass(), WolfSSLDebug.Component.JNI,
4132-
WolfSSLDebug.INFO, this.sslPtr,
4133-
() -> "entered getKeySize()");
4128+
WolfSSLDebug.INFO, this.sslPtr, () -> "entered getKeySize()");
41344129

41354130
return getKeySize(this.sslPtr);
41364131
}
@@ -4282,8 +4277,7 @@ public int getHmacSize() throws IllegalStateException {
42824277

42834278
synchronized (sslLock) {
42844279
WolfSSLDebug.log(getClass(), WolfSSLDebug.Component.JNI,
4285-
WolfSSLDebug.INFO, this.sslPtr,
4286-
() -> "entered getHmacSize()");
4280+
WolfSSLDebug.INFO, this.sslPtr, () -> "entered getHmacSize()");
42874281

42884282
return getHmacSize(this.sslPtr);
42894283
}
@@ -4949,8 +4943,7 @@ public long getOptions()
49494943

49504944
synchronized (sslLock) {
49514945
WolfSSLDebug.log(getClass(), WolfSSLDebug.Component.JNI,
4952-
WolfSSLDebug.INFO, this.sslPtr,
4953-
() -> "entered getOptions()");
4946+
WolfSSLDebug.INFO, this.sslPtr, () -> "entered getOptions()");
49544947

49554948
return getOptions(this.sslPtr);
49564949
}
@@ -5777,8 +5770,7 @@ public void keepArrays()
57775770

57785771
synchronized (sslLock) {
57795772
WolfSSLDebug.log(getClass(), WolfSSLDebug.Component.JNI,
5780-
WolfSSLDebug.INFO, this.sslPtr,
5781-
() -> "entered keepArrays()");
5773+
WolfSSLDebug.INFO, this.sslPtr, () -> "entered keepArrays()");
57825774

57835775
keepArrays(this.sslPtr);
57845776
}
@@ -5854,8 +5846,7 @@ public synchronized byte[] sessionToDer()
58545846
confirmObjectIsActive();
58555847
synchronized (sslLock) {
58565848
WolfSSLDebug.log(WolfSSLSession.class, WolfSSLDebug.Component.JNI,
5857-
WolfSSLDebug.INFO, this.sslPtr,
5858-
() -> "entered sessionToDer()");
5849+
WolfSSLDebug.INFO, this.sslPtr, () -> "entered sessionToDer()");
58595850
long sessPtr = this.getSession();
58605851
return sessionToDerNative(sessPtr);
58615852
}
@@ -5957,8 +5948,7 @@ public int rehandshake() throws IllegalStateException {
59575948

59585949
synchronized (sslLock) {
59595950
WolfSSLDebug.log(getClass(), WolfSSLDebug.Component.JNI,
5960-
WolfSSLDebug.INFO, this.sslPtr,
5961-
() -> "entered rehandshake()");
5951+
WolfSSLDebug.INFO, this.sslPtr, () -> "entered rehandshake()");
59625952

59635953
return rehandshake(this.sslPtr);
59645954
}
@@ -5976,8 +5966,7 @@ public int getShutdown() throws IllegalStateException {
59765966

59775967
synchronized (sslLock) {
59785968
WolfSSLDebug.log(getClass(), WolfSSLDebug.Component.JNI,
5979-
WolfSSLDebug.INFO, this.sslPtr,
5980-
() -> "entered getShutdown()");
5969+
WolfSSLDebug.INFO, this.sslPtr, () -> "entered getShutdown()");
59815970

59825971
ret = getShutdown(this.sslPtr);
59835972

src/java/com/wolfssl/WolfSSLX509Name.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -469,8 +469,7 @@ public synchronized String getSurname() {
469469
confirmObjectIsActive();
470470

471471
WolfSSLDebug.log(getClass(), WolfSSLDebug.Component.JNI,
472-
WolfSSLDebug.INFO, this.x509NamePtr,
473-
() -> "entered getSurname()");
472+
WolfSSLDebug.INFO, this.x509NamePtr, () -> "entered getSurname()");
474473

475474
return this.surname;
476475
}
@@ -577,8 +576,7 @@ public synchronized String getUserId() {
577576
confirmObjectIsActive();
578577

579578
WolfSSLDebug.log(getClass(), WolfSSLDebug.Component.JNI,
580-
WolfSSLDebug.INFO, this.x509NamePtr,
581-
() -> "entered getUserId()");
579+
WolfSSLDebug.INFO, this.x509NamePtr, () -> "entered getUserId()");
582580

583581
return this.userId;
584582
}

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -400,8 +400,7 @@ else if (!sessionCipherSuiteAvailable(
400400
ses.setValid(true); /* new sessions marked as valid */
401401

402402
ses.isFromTable = false;
403-
ses.setPseudoSessionId(
404-
Integer.toString(ssl.hashCode()).getBytes());
403+
ses.setPseudoSessionId(Integer.toString(ssl.hashCode()).getBytes());
405404
}
406405
else {
407406
WolfSSLDebug.log(getClass(), WolfSSLDebug.INFO,
@@ -544,8 +543,7 @@ private void printSessionStoreStatus() {
544543
}
545544

546545
synchronized (storeLock) {
547-
Collection<WolfSSLImplementSSLSession> values =
548-
store.values();
546+
Collection<WolfSSLImplementSSLSession> values = store.values();
549547

550548
WolfSSLDebug.log(getClass(), WolfSSLDebug.INFO,
551549
() -> "SessionStore Status : (" + this +

0 commit comments

Comments
 (0)