diff --git a/src/java/com/wolfssl/WolfSSL.java b/src/java/com/wolfssl/WolfSSL.java index 9e591549..402fbbc0 100644 --- a/src/java/com/wolfssl/WolfSSL.java +++ b/src/java/com/wolfssl/WolfSSL.java @@ -670,14 +670,10 @@ public WolfSSL() throws WolfSSLException { getTls13SecretEnum_CLIENT_HANDSHAKE_TRAFFIC_SECRET(); SERVER_HANDSHAKE_TRAFFIC_SECRET = getTls13SecretEnum_SERVER_HANDSHAKE_TRAFFIC_SECRET(); - CLIENT_TRAFFIC_SECRET = - getTls13SecretEnum_CLIENT_TRAFFIC_SECRET(); - SERVER_TRAFFIC_SECRET = - getTls13SecretEnum_SERVER_TRAFFIC_SECRET(); - EARLY_EXPORTER_SECRET = - getTls13SecretEnum_EARLY_EXPORTER_SECRET(); - EXPORTER_SECRET = - getTls13SecretEnum_EXPORTER_SECRET(); + CLIENT_TRAFFIC_SECRET = getTls13SecretEnum_CLIENT_TRAFFIC_SECRET(); + SERVER_TRAFFIC_SECRET = getTls13SecretEnum_SERVER_TRAFFIC_SECRET(); + EARLY_EXPORTER_SECRET = getTls13SecretEnum_EARLY_EXPORTER_SECRET(); + EXPORTER_SECRET = getTls13SecretEnum_EXPORTER_SECRET(); this.active = true; @@ -783,8 +779,7 @@ public static void loadLibrary() throws UnsatisfiedLinkError { int fipsLoaded = 0; - String skipLoad = - System.getProperty("wolfssl.skipLibraryLoad"); + String skipLoad = System.getProperty("wolfssl.skipLibraryLoad"); if (skipLoad != null && skipLoad.equalsIgnoreCase("true")) { /* User will load native libraries manually */ libraryLoadSkipped = true; diff --git a/src/java/com/wolfssl/WolfSSLCRL.java b/src/java/com/wolfssl/WolfSSLCRL.java index bab52f78..73533ac2 100644 --- a/src/java/com/wolfssl/WolfSSLCRL.java +++ b/src/java/com/wolfssl/WolfSSLCRL.java @@ -114,8 +114,7 @@ private static Asn1TimeData buildAsn1TimeData(Date date) { boolean useUtcTime = (year >= ASN1_UTC_YEAR_MIN && year <= ASN1_UTC_YEAR_MAX); - String pattern = useUtcTime ? "yyMMddHHmmss'Z'" : - "yyyyMMddHHmmss'Z'"; + String pattern = useUtcTime ? "yyMMddHHmmss'Z'" : "yyyyMMddHHmmss'Z'"; int type = useUtcTime ? ASN_UTC_TIME : ASN_GENERALIZED_TIME; SimpleDateFormat format = new SimpleDateFormat(pattern, Locale.US); @@ -160,8 +159,7 @@ public WolfSSLCRL() throws WolfSSLException { this.weOwnCrlPtr = true; WolfSSLDebug.log(getClass(), WolfSSLDebug.Component.JNI, - WolfSSLDebug.INFO, crlPtr, - () -> "creating new WolfSSLCRL"); + WolfSSLDebug.INFO, crlPtr, () -> "creating new WolfSSLCRL"); synchronized (stateLock) { this.active = true; @@ -646,8 +644,7 @@ public byte[] getSignature() { synchronized (crlLock) { WolfSSLDebug.log(getClass(), WolfSSLDebug.Component.JNI, - WolfSSLDebug.INFO, this.crlPtr, - () -> "entered getSignature()"); + WolfSSLDebug.INFO, this.crlPtr, () -> "entered getSignature()"); return X509_CRL_get_signature(this.crlPtr); } diff --git a/src/java/com/wolfssl/WolfSSLCertificate.java b/src/java/com/wolfssl/WolfSSLCertificate.java index 1933c8bc..f795fa88 100644 --- a/src/java/com/wolfssl/WolfSSLCertificate.java +++ b/src/java/com/wolfssl/WolfSSLCertificate.java @@ -877,8 +877,7 @@ public void setAuthorityKeyIdEx(WolfSSLCertificate issuer) () -> "entering setAuthorityKeyIdEx(issuerPtr=" + issuerX509Ptr + ")"); - ret = X509_set_authority_key_id_ex(this.x509Ptr, - issuerX509Ptr); + ret = X509_set_authority_key_id_ex(this.x509Ptr, issuerX509Ptr); } if (ret != WolfSSL.SSL_SUCCESS) { @@ -1238,8 +1237,7 @@ public void addAltNameIP(String ipAddress) throws IllegalStateException, WolfSSLException { if (ipAddress == null || ipAddress.isEmpty()) { - throw new WolfSSLException( - "IP address must not be null or empty"); + throw new WolfSSLException("IP address must not be null or empty"); } addAltName(ipAddress, WolfSSL.ASN_IP_TYPE); diff --git a/src/java/com/wolfssl/WolfSSLContext.java b/src/java/com/wolfssl/WolfSSLContext.java index 2b226a01..55135a9b 100644 --- a/src/java/com/wolfssl/WolfSSLContext.java +++ b/src/java/com/wolfssl/WolfSSLContext.java @@ -155,8 +155,7 @@ private int internalIORecvCallback(WolfSSLSession ssl, byte[] buf, int sz) int ret; /* call user-registered recv method */ - ret = internRecvCb.receiveCallback(ssl, buf, sz, - ssl.getIOReadCtx()); + ret = internRecvCb.receiveCallback(ssl, buf, sz, ssl.getIOReadCtx()); return ret; } @@ -166,8 +165,7 @@ private int internalIOSendCallback(WolfSSLSession ssl, byte[] buf, int sz) int ret; /* call user-registered recv method */ - ret = internSendCb.sendCallback(ssl, buf, sz, - ssl.getIOWriteCtx()); + ret = internSendCb.sendCallback(ssl, buf, sz, ssl.getIOWriteCtx()); return ret; } @@ -319,8 +317,7 @@ private int internalRsaDecCallback(WolfSSLSession ssl, ByteBuffer in, } private long internalPskClientCallback(WolfSSLSession ssl, String hint, - StringBuffer identity, long idMaxLen, byte[] key, - long keyMaxLen) + StringBuffer identity, long idMaxLen, byte[] key, long keyMaxLen) { long ret; diff --git a/src/java/com/wolfssl/WolfSSLDebug.java b/src/java/com/wolfssl/WolfSSLDebug.java index 7d746ed9..6002f203 100644 --- a/src/java/com/wolfssl/WolfSSLDebug.java +++ b/src/java/com/wolfssl/WolfSSLDebug.java @@ -50,8 +50,7 @@ public class WolfSSLDebug { * com.wolfssl.jni - JNI layer logging * com.wolfssl.jsse - JSSE layer logging */ - private static final Logger jniLogger = - Logger.getLogger("com.wolfssl.jni"); + private static final Logger jniLogger = Logger.getLogger("com.wolfssl.jni"); private static final Logger jsseLogger = Logger.getLogger("com.wolfssl.jsse"); diff --git a/src/java/com/wolfssl/WolfSSLIOSendCallback.java b/src/java/com/wolfssl/WolfSSLIOSendCallback.java index 09f35d61..bba9f403 100644 --- a/src/java/com/wolfssl/WolfSSLIOSendCallback.java +++ b/src/java/com/wolfssl/WolfSSLIOSendCallback.java @@ -50,7 +50,6 @@ public interface WolfSSLIOSendCallback { * codes, see the default EmbedSend() function in * wolfssl_package/src/io.c */ - public int sendCallback(WolfSSLSession ssl, byte[] buf, int sz, - Object ctx); + public int sendCallback(WolfSSLSession ssl, byte[] buf, int sz, Object ctx); } diff --git a/src/java/com/wolfssl/WolfSSLPskClientCallback.java b/src/java/com/wolfssl/WolfSSLPskClientCallback.java index df176512..b9234e05 100644 --- a/src/java/com/wolfssl/WolfSSLPskClientCallback.java +++ b/src/java/com/wolfssl/WolfSSLPskClientCallback.java @@ -50,7 +50,6 @@ public interface WolfSSLPskClientCallback { * @return length of key in octets or 0 for error */ public long pskClientCallback(WolfSSLSession ssl, String hint, - StringBuffer identity, long idMaxLen, byte[] key, - long keyMaxLen); + StringBuffer identity, long idMaxLen, byte[] key, long keyMaxLen); } diff --git a/src/java/com/wolfssl/WolfSSLSession.java b/src/java/com/wolfssl/WolfSSLSession.java index 3d4e8e96..8ae55edb 100644 --- a/src/java/com/wolfssl/WolfSSLSession.java +++ b/src/java/com/wolfssl/WolfSSLSession.java @@ -506,8 +506,7 @@ private int internalIOSSLSendCallback(WolfSSLSession ssl, } private long internalPskClientCallback(WolfSSLSession ssl, String hint, - StringBuffer identity, long idMaxLen, byte[] key, - long keyMaxLen) + StringBuffer identity, long idMaxLen, byte[] key, long keyMaxLen) { /* call user-registered PSK client callback method */ return internPskClientCb.pskClientCallback(ssl, hint, identity, @@ -638,8 +637,7 @@ private native int useCertificateBuffer(long ssl, byte[] in, long sz, int format); private native int usePrivateKeyBuffer(long ssl, byte[] in, long sz, int format); - private native int useCertificateChainBuffer(long ssl, byte[] in, - long sz); + private native int useCertificateChainBuffer(long ssl, byte[] in, long sz); private native int useCertificateChainBufferFormat( long ssl, byte[] in, long sz, int format); private native int setGroupMessages(long ssl); @@ -1798,8 +1796,7 @@ public void freeSSL() } WolfSSLDebug.log(getClass(), WolfSSLDebug.Component.JNI, - WolfSSLDebug.INFO, this.sslPtr, - () -> "entered freeSSL()"); + WolfSSLDebug.INFO, this.sslPtr, () -> "entered freeSSL()"); /* free native resources */ freeSSL(this.sslPtr); @@ -4007,8 +4004,7 @@ public byte[] getMacSecret(int verify) synchronized (sslLock) { WolfSSLDebug.log(getClass(), WolfSSLDebug.Component.JNI, - WolfSSLDebug.INFO, this.sslPtr, - () -> "entered getMacSecret()"); + WolfSSLDebug.INFO, this.sslPtr, () -> "entered getMacSecret()"); return getMacSecret(this.sslPtr, verify); } @@ -4129,8 +4125,7 @@ public int getKeySize() throws IllegalStateException { synchronized (sslLock) { WolfSSLDebug.log(getClass(), WolfSSLDebug.Component.JNI, - WolfSSLDebug.INFO, this.sslPtr, - () -> "entered getKeySize()"); + WolfSSLDebug.INFO, this.sslPtr, () -> "entered getKeySize()"); return getKeySize(this.sslPtr); } @@ -4282,8 +4277,7 @@ public int getHmacSize() throws IllegalStateException { synchronized (sslLock) { WolfSSLDebug.log(getClass(), WolfSSLDebug.Component.JNI, - WolfSSLDebug.INFO, this.sslPtr, - () -> "entered getHmacSize()"); + WolfSSLDebug.INFO, this.sslPtr, () -> "entered getHmacSize()"); return getHmacSize(this.sslPtr); } @@ -4949,8 +4943,7 @@ public long getOptions() synchronized (sslLock) { WolfSSLDebug.log(getClass(), WolfSSLDebug.Component.JNI, - WolfSSLDebug.INFO, this.sslPtr, - () -> "entered getOptions()"); + WolfSSLDebug.INFO, this.sslPtr, () -> "entered getOptions()"); return getOptions(this.sslPtr); } @@ -5777,8 +5770,7 @@ public void keepArrays() synchronized (sslLock) { WolfSSLDebug.log(getClass(), WolfSSLDebug.Component.JNI, - WolfSSLDebug.INFO, this.sslPtr, - () -> "entered keepArrays()"); + WolfSSLDebug.INFO, this.sslPtr, () -> "entered keepArrays()"); keepArrays(this.sslPtr); } @@ -5854,8 +5846,7 @@ public synchronized byte[] sessionToDer() confirmObjectIsActive(); synchronized (sslLock) { WolfSSLDebug.log(WolfSSLSession.class, WolfSSLDebug.Component.JNI, - WolfSSLDebug.INFO, this.sslPtr, - () -> "entered sessionToDer()"); + WolfSSLDebug.INFO, this.sslPtr, () -> "entered sessionToDer()"); long sessPtr = this.getSession(); return sessionToDerNative(sessPtr); } @@ -5957,8 +5948,7 @@ public int rehandshake() throws IllegalStateException { synchronized (sslLock) { WolfSSLDebug.log(getClass(), WolfSSLDebug.Component.JNI, - WolfSSLDebug.INFO, this.sslPtr, - () -> "entered rehandshake()"); + WolfSSLDebug.INFO, this.sslPtr, () -> "entered rehandshake()"); return rehandshake(this.sslPtr); } @@ -5976,8 +5966,7 @@ public int getShutdown() throws IllegalStateException { synchronized (sslLock) { WolfSSLDebug.log(getClass(), WolfSSLDebug.Component.JNI, - WolfSSLDebug.INFO, this.sslPtr, - () -> "entered getShutdown()"); + WolfSSLDebug.INFO, this.sslPtr, () -> "entered getShutdown()"); ret = getShutdown(this.sslPtr); diff --git a/src/java/com/wolfssl/WolfSSLX509Name.java b/src/java/com/wolfssl/WolfSSLX509Name.java index 4fd06208..162efc2a 100644 --- a/src/java/com/wolfssl/WolfSSLX509Name.java +++ b/src/java/com/wolfssl/WolfSSLX509Name.java @@ -469,8 +469,7 @@ public synchronized String getSurname() { confirmObjectIsActive(); WolfSSLDebug.log(getClass(), WolfSSLDebug.Component.JNI, - WolfSSLDebug.INFO, this.x509NamePtr, - () -> "entered getSurname()"); + WolfSSLDebug.INFO, this.x509NamePtr, () -> "entered getSurname()"); return this.surname; } @@ -577,8 +576,7 @@ public synchronized String getUserId() { confirmObjectIsActive(); WolfSSLDebug.log(getClass(), WolfSSLDebug.Component.JNI, - WolfSSLDebug.INFO, this.x509NamePtr, - () -> "entered getUserId()"); + WolfSSLDebug.INFO, this.x509NamePtr, () -> "entered getUserId()"); return this.userId; } diff --git a/src/java/com/wolfssl/provider/jsse/WolfSSLAuthStore.java b/src/java/com/wolfssl/provider/jsse/WolfSSLAuthStore.java index 94d0322f..e9c97463 100644 --- a/src/java/com/wolfssl/provider/jsse/WolfSSLAuthStore.java +++ b/src/java/com/wolfssl/provider/jsse/WolfSSLAuthStore.java @@ -400,8 +400,7 @@ else if (!sessionCipherSuiteAvailable( ses.setValid(true); /* new sessions marked as valid */ ses.isFromTable = false; - ses.setPseudoSessionId( - Integer.toString(ssl.hashCode()).getBytes()); + ses.setPseudoSessionId(Integer.toString(ssl.hashCode()).getBytes()); } else { WolfSSLDebug.log(getClass(), WolfSSLDebug.INFO, @@ -544,8 +543,7 @@ private void printSessionStoreStatus() { } synchronized (storeLock) { - Collection values = - store.values(); + Collection values = store.values(); WolfSSLDebug.log(getClass(), WolfSSLDebug.INFO, () -> "SessionStore Status : (" + this + @@ -758,8 +756,7 @@ protected void updateTimeouts(int in, int side) { diff = (now - current.creation.getTime()) / 1000; if (diff < 0) { - /* session is from the future ... */ //@TODO - + /* session is from the future ... @TODO */ } if (in > 0 && diff > in) { diff --git a/src/java/com/wolfssl/provider/jsse/WolfSSLEngine.java b/src/java/com/wolfssl/provider/jsse/WolfSSLEngine.java index 706509b5..cc8a08d6 100644 --- a/src/java/com/wolfssl/provider/jsse/WolfSSLEngine.java +++ b/src/java/com/wolfssl/provider/jsse/WolfSSLEngine.java @@ -1322,8 +1322,7 @@ else if (hs == SSLEngineResult.HandshakeStatus.NEED_WRAP && if (this.ssl.dtls() == 1) { int pending = this.ssl.pending(); if (pending > 0) { - status = - SSLEngineResult.Status. + status = SSLEngineResult.Status. BUFFER_OVERFLOW; } } @@ -1344,8 +1343,7 @@ else if (hs == SSLEngineResult.HandshakeStatus.NEED_WRAP && * time. */ synchronized (ioLock) { if (this.handshakeFinished && - (ssl.getError(0) == 0) && - !this.sessionStored) { + (ssl.getError(0) == 0) && !this.sessionStored) { WolfSSLDebug.log(getClass(), WolfSSLDebug.INFO, () -> "calling engineHelper.saveSession()"); int ret2 = this.engineHelper.saveSession(); @@ -2259,8 +2257,7 @@ protected synchronized int internalSendCb(ByteBuffer in, int sz) { } byte[] newBuf = new byte[newSz]; System.arraycopy(this.internalIOSendBuf, 0, - newBuf, 0, - this.internalIOSendBufOffset); + newBuf, 0, this.internalIOSendBufOffset); this.internalIOSendBuf = newBuf; this.internalIOSendBufSz = newSz; } diff --git a/src/java/com/wolfssl/provider/jsse/WolfSSLEngineHelper.java b/src/java/com/wolfssl/provider/jsse/WolfSSLEngineHelper.java index 5693fc78..4f5faea1 100644 --- a/src/java/com/wolfssl/provider/jsse/WolfSSLEngineHelper.java +++ b/src/java/com/wolfssl/provider/jsse/WolfSSLEngineHelper.java @@ -120,8 +120,7 @@ private void getSystemAndSecurityProperties() { checkBooleanProperty("jsse.enableSNIExtension", true); this.jdkTlsTrustNameService = checkBooleanProperty("jdk.tls.trustNameService", false); - this.wolfjsseAutoSni = - checkBooleanProperty("wolfjsse.autoSNI", false); + this.wolfjsseAutoSni = checkBooleanProperty("wolfjsse.autoSNI", false); } /** @@ -1125,10 +1124,8 @@ private void setLocalSigAlgorithms() { * user in "wolfjsse.enabledSigAlgorithms" Security property */ sigAlgos = WolfSSLUtil.getSignatureAlgorithms(); } - sigSchemes = - WolfSSLUtil.getSignatureSchemes(this.clientMode); - cleanSigList = - WolfSSLUtil.formatSigSchemes(sigAlgos, sigSchemes); + sigSchemes = WolfSSLUtil.getSignatureSchemes(this.clientMode); + cleanSigList = WolfSSLUtil.formatSigSchemes(sigAlgos, sigSchemes); if (cleanSigList != null) { ret = this.ssl.setSignatureAlgorithms(cleanSigList); @@ -1252,8 +1249,7 @@ private void setLocalParams(SSLSocket socket, SSLEngine engine) this.setLocalCiphers( WolfSSLUtil.sanitizeSuites(this.params.getCipherSuites())); - this.setLocalProtocol( - WolfSSLUtil.sanitizeProtocols( + this.setLocalProtocol(WolfSSLUtil.sanitizeProtocols( this.params.getProtocols(), WolfSSL.TLS_VERSION.INVALID)); this.setLocalAuth(socket, engine); this.setLocalServerNames(); @@ -1350,8 +1346,7 @@ private void initHandshakeInternal(SSLSocket socket, SSLEngine engine) this.session.setSessionContext(authStore.getServerContext()); this.session.setSide(WolfSSL.WOLFSSL_SERVER_END); /* Track client auth state for getPeerCertificates() */ - boolean clientAuthRequested = - this.params.getNeedClientAuth() || + boolean clientAuthRequested = this.params.getNeedClientAuth() || this.params.getWantClientAuth(); this.session.setClientAuthRequested(clientAuthRequested); } @@ -1510,8 +1505,7 @@ else if (peerAddr != null) { this.session.updateStoredSessionValues(); if (!this.clientMode && !matchSNI()) { - throw new SSLHandshakeException( - "Unrecognized Server Name"); + throw new SSLHandshakeException("Unrecognized Server Name"); } return ret; diff --git a/src/java/com/wolfssl/provider/jsse/WolfSSLImplementSSLSession.java b/src/java/com/wolfssl/provider/jsse/WolfSSLImplementSSLSession.java index edcdb8d5..b8a26fd4 100644 --- a/src/java/com/wolfssl/provider/jsse/WolfSSLImplementSSLSession.java +++ b/src/java/com/wolfssl/provider/jsse/WolfSSLImplementSSLSession.java @@ -536,8 +536,7 @@ public synchronized Certificate[] getPeerCertificates() x509 = this.ssl.getPeerCertificate(); } catch (IllegalStateException | WolfSSLJNIException ex) { WolfSSLDebug.log(getClass(), WolfSSLDebug.INFO, - () -> "Error getting peer certificate: " - + ex.getMessage()); + () -> "Error getting peer certificate: " + ex.getMessage()); x509 = 0; } diff --git a/src/java/com/wolfssl/provider/jsse/WolfSSLInternalVerifyCb.java b/src/java/com/wolfssl/provider/jsse/WolfSSLInternalVerifyCb.java index 79f3e16c..828d7369 100644 --- a/src/java/com/wolfssl/provider/jsse/WolfSSLInternalVerifyCb.java +++ b/src/java/com/wolfssl/provider/jsse/WolfSSLInternalVerifyCb.java @@ -311,8 +311,7 @@ public int verifyCallback(int preverify_ok, long x509StorePtr) { try { /* Get WolfSSLCertificate[] from x509StorePtr, certs from * store.getCerts() should be listed in order of peer to root */ - WolfSSLX509StoreCtx store = - new WolfSSLX509StoreCtx(x509StorePtr); + WolfSSLX509StoreCtx store = new WolfSSLX509StoreCtx(x509StorePtr); certs = store.getCerts(); } catch (WolfSSLException e) { diff --git a/src/java/com/wolfssl/provider/jsse/WolfSSLServerSocket.java b/src/java/com/wolfssl/provider/jsse/WolfSSLServerSocket.java index a712d17e..3ebe103b 100644 --- a/src/java/com/wolfssl/provider/jsse/WolfSSLServerSocket.java +++ b/src/java/com/wolfssl/provider/jsse/WolfSSLServerSocket.java @@ -241,8 +241,7 @@ synchronized public void setEnabledProtocols(String[] protocols) /* sanitize protocol array for unsupported strings */ List supported; - supported = Arrays.asList( - WolfSSLUtil.sanitizeProtocols( + supported = Arrays.asList(WolfSSLUtil.sanitizeProtocols( WolfSSL.getProtocols(), WolfSSL.TLS_VERSION.INVALID)); for (int i = 0; i < protocols.length; i++) { diff --git a/src/java/com/wolfssl/provider/jsse/WolfSSLSocket.java b/src/java/com/wolfssl/provider/jsse/WolfSSLSocket.java index 86b0da59..1d90b6e1 100644 --- a/src/java/com/wolfssl/provider/jsse/WolfSSLSocket.java +++ b/src/java/com/wolfssl/provider/jsse/WolfSSLSocket.java @@ -940,8 +940,7 @@ public final void setPerformancePreferences(int connectionTime, this.socket.setPerformancePreferences(connectionTime, latency, bandwidth); } else { - super.setPerformancePreferences(connectionTime, latency, - bandwidth); + super.setPerformancePreferences(connectionTime, latency, bandwidth); } } @@ -2108,8 +2107,7 @@ public synchronized void close() throws IOException { ret = ssl.shutdownSSL( this.socket.getSoLinger()); } else { - ret = ssl.shutdownSSL( - super.getSoLinger()); + ret = ssl.shutdownSSL(super.getSoLinger()); } WolfSSLDebug.log(getClass(), WolfSSLDebug.INFO, @@ -2297,8 +2295,7 @@ public synchronized void connect(SocketAddress endpoint, int timeout) createSocket() was called without host/port, but SSLSocket.connect() was explicitly called with SocketAddress */ if (address != null && EngineHelper != null) { - EngineHelper.setHostAndPort( - address.getAddress().getHostAddress(), + EngineHelper.setHostAndPort(address.getAddress().getHostAddress(), address.getPort()); EngineHelper.setPeerAddress(address.getAddress()); } @@ -2407,8 +2404,7 @@ public int sendCallback(WolfSSLSession ssl, } return WolfSSL.WOLFSSL_CBIO_ERR_GENERAL; - } catch (NullPointerException | - IndexOutOfBoundsException e) { + } catch (NullPointerException | IndexOutOfBoundsException e) { return WolfSSL.WOLFSSL_CBIO_ERR_GENERAL; } @@ -2473,8 +2469,7 @@ public int receiveCallback(WolfSSLSession ssl, } return WolfSSL.WOLFSSL_CBIO_ERR_GENERAL; - } catch (NullPointerException | - IndexOutOfBoundsException e) { + } catch (NullPointerException | IndexOutOfBoundsException e) { return WolfSSL.WOLFSSL_CBIO_ERR_GENERAL; } @@ -2939,8 +2934,7 @@ public synchronized void write(byte[] b, int off, int len) WolfSSLDebug.log(getClass(), WolfSSLDebug.INFO, () -> "thread got socket.handshakeLock (write)"); if (socket.connectionClosed == true) { - throw new SocketException( - "Connection already shutdown"); + throw new SocketException("Connection already shutdown"); } } diff --git a/src/java/com/wolfssl/provider/jsse/WolfSSLTrustManager.java b/src/java/com/wolfssl/provider/jsse/WolfSSLTrustManager.java index 1171ec56..f6c37e18 100644 --- a/src/java/com/wolfssl/provider/jsse/WolfSSLTrustManager.java +++ b/src/java/com/wolfssl/provider/jsse/WolfSSLTrustManager.java @@ -732,8 +732,7 @@ protected void engineInit(KeyStore in) throws KeyStoreException { /* [5] Try to load common CA cert locations */ if (certs == null) { - certs = LoadCommonSystemCerts(wksAvailable, pass, - requiredType); + certs = LoadCommonSystemCerts(wksAvailable, pass, requiredType); } /* [6] Try to load system certs if on Android */ @@ -777,8 +776,7 @@ protected void engineInit(ManagerFactoryParameters arg0) certPathParams.getParameters(); if (certPathParameters instanceof PKIXParameters) { - PKIXParameters pkixParams = - (PKIXParameters) certPathParameters; + PKIXParameters pkixParams = (PKIXParameters) certPathParameters; Set anchors = pkixParams.getTrustAnchors(); try { diff --git a/src/java/com/wolfssl/provider/jsse/WolfSSLUtil.java b/src/java/com/wolfssl/provider/jsse/WolfSSLUtil.java index ae2e9f27..f1e9758a 100644 --- a/src/java/com/wolfssl/provider/jsse/WolfSSLUtil.java +++ b/src/java/com/wolfssl/provider/jsse/WolfSSLUtil.java @@ -251,8 +251,7 @@ else if (sigAlgs != null && sigSchemes == null) { } if (schemeComp.length >= 3 && - schemeComp[0].equals("RSA") && - schemeComp[1].equals("PSS")) { + schemeComp[0].equals("RSA") && schemeComp[1].equals("PSS")) { algorithm = "RSA-PSS"; hash = schemeComp[schemeComp.length - 1]; } else { @@ -384,8 +383,7 @@ protected static String getSignatureSchemes(boolean clientMode) { */ protected static String[] getSupportedCurves() { - String curves = - Security.getProperty("wolfjsse.enabledSupportedCurves"); + String curves = Security.getProperty("wolfjsse.enabledSupportedCurves"); if (curves == null || curves.isEmpty()) { return null; @@ -460,8 +458,7 @@ protected static boolean sessionCacheDisabled() { */ protected static boolean useExtendedMasterSecret() { - String useEMS = - System.getProperty("jdk.tls.useExtendedMasterSecret"); + String useEMS = System.getProperty("jdk.tls.useExtendedMasterSecret"); /* Native wolfSSL defaults to having extended master secret support * enabled. Do the same here if property not set or empty. */