Best code examples for Java 8 SSLSocket class (javax.net.ssl.SSLSocket)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 SSLSocket class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Java 8 SSLSocket examples from Open Source projects
This code example shows how to use the following methods: setEnabledCipherSuites, setEnabledProtocols, setNeedClientAuth
100:	socket.setEnabledProtocols(this.jsseSecurityDomain.getProtocols()); 
-
102:	socket.setEnabledCipherSuites(this.jsseSecurityDomain.getCipherSuites()); 
103:	socket.setNeedClientAuth(this.jsseSecurityDomain.isClientAuth()); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: setEnableSessionCreation, setEnabledCipherSuites, setEnabledProtocols, setNeedClientAuth, setUseClientMode
554:	sslSocket.setUseClientMode(isClientMode); 
555:	sslSocket.setEnableSessionCreation(isCreation); 
-
559:	sslSocket.setNeedClientAuth(isNeedClientAuth); 
560:	sslSocket.setWantClientAuth(isWantClientAuth); 
-
563:	sslSocket.setEnabledCipherSuites(suites); 
-
566:	sslSocket.setEnabledProtocols(protocols); 
-
568:	sslSocket.startHandshake(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getSession, startHandshake
247:	ssl.startHandshake(); 
-
249:	SSLSession session = ssl.getSession(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getEnabledCipherSuites, getSession, setEnabledCipherSuites
96:	log.finer("default enabledCipherSuites="+Arrays.toString(resultSocket.getEnabledCipherSuites())); 
-
98:	resultSocket.setEnabledCipherSuites(enabledCipherSuites); 
-
102:	return new TLSNetSocket(new Socket2NetSocket(resultSocket), resultSocket.getSession(), ""+lowerLayerNetSocket); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getEnableSessionCreation, getEnabledCipherSuites, getEnabledProtocols, getNeedClientAuth, getWantClientAuth
78:	client.setEnabledCipherSuites(socket.getEnabledCipherSuites()); 
79:	client.setEnabledProtocols(socket.getEnabledProtocols()); 
80:	client.setNeedClientAuth(socket.getNeedClientAuth()); 
81:	client.setWantClientAuth(socket.getWantClientAuth()); 
82:	client.setEnabledSessionCreation(socket.getEnableSessionCreation()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: close, getInputStream, getOutputStream, getSession
133:	socket.getSession().getPeerCertificates()[0]. 
-
158:	ObjectOutputStream out = new ObjectOutputStream(sock.getOutputStream()); 
-
162:	ObjectInputStream in = new ObjectInputStream(sock.getInputStream()); 
-
164:	sock.close(); 
-
169:	sock.close(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getSession, setUseClientMode, startHandshake
167:	sslSocket.setUseClientMode(true); 
168:	sslSocket.startHandshake(); 
169:	if (!hostnameVerifier.verify(hostName, sslSocket.getSession())) { 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setSoTimeout, setEnabledProtocols, setUseClientMode
92:	socket.setSoTimeout(timeout); 
-
101:	socket.setEnabledProtocols(new String[]{ 
-
106:	socket.setUseClientMode(true); 
107:	sockHolder.setSocket(socket); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: close, getInetAddress, getInputStream, getOutputStream
74:	System.out.printf("Client connected from %s.\n", sock.getInetAddress()); 
75:	out = new BufferedWriter(new OutputStreamWriter(sock.getOutputStream())); 
76:	in = new BufferedReader(new InputStreamReader(sock.getInputStream())); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getSSLParameters, getHandshakeSession
115:	String alias = chooseServerAlias(keyType,issuers,sslSocket.getSSLParameters().getSNIMatchers(),sslSocket.getHandshakeSession()); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setUseClientMode, startHandshake
38:	socket.setUseClientMode(true); 
39:	socket.startHandshake(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: bind, connect
175:	sslSocket.bind(localaddr); 
176:	sslSocket.connect(remoteaddr, timeout); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: close, setEnabledCipherSuites, setEnabledProtocols, startHandshake
222:	socket.setEnabledProtocols(supportedProtocols); 
-
225:	socket.setEnabledCipherSuites(supportedCipherSuites); 
-
280:	sslsock.startHandshake(); 
-
291:	this.hostnameVerifier.verify(hostname, sslsock); 
-
295:	try { sslsock.close(); } catch (final Exception x) { /*ignore*/ } 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getSupportedProtocols, setEnabledCipherSuites, setEnabledProtocols
32:	socket.setEnabledCipherSuites(_factory.getDefaultCipherSuites()); 
33:	socket.setEnabledProtocols(socket.getSupportedProtocols()); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setEnabledCipherSuites, setUseClientMode, startHandshake
96:	paramSSLSocket.setUseClientMode(true); 
-
98:	paramSSLSocket.setEnabledCipherSuites(arrayOfString); 
99:	paramSSLSocket.startHandshake(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getInputStream, getOutputStream, isClosed
71:	if (aSock.isClosed()) 
-
76:	OutputStream aOS = aSock.getOutputStream(); 
-
82:	InputStream aIS = aSock.getInputStream(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getSoTimeout, setSoTimeout
47:	oldTimeout = sock.getSoTimeout(); 
48:	sock.setSoTimeout( 10 ); 
-
55:	sock.setSoTimeout(oldTimeout); 
-
60:	sock.setSoTimeout(oldTimeout); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: close, startHandshake
94:	c.startHandshake(); 
-
98:	FileSender.SendFile(c, fs); 
99:	c.close(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getEnabledCipherSuites, getEnabledProtocols, setEnabledCipherSuites, setEnabledProtocols
424:	if (!msf.isServerTrusted(host, (SSLSocket)socket)) { 
-
467:	sslsocket.setEnabledProtocols(stringArray(protocols)); 
-
475:	sslsocket.setEnabledProtocols(new String[] {"TLSv1"}); 
-
479:	sslsocket.setEnabledCipherSuites(stringArray(ciphers)); 
-
482:	Arrays.asList(sslsocket.getEnabledProtocols())); 
-
484:	Arrays.asList(sslsocket.getEnabledCipherSuites())); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setSoTimeout
209:	socket.setSoTimeout(timeout); 
210:	return new TSocket(socket); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getSupportedCipherSuites, setEnabledCipherSuites, startHandshake
194:	socket.setEnabledCipherSuites(socket.getSupportedCipherSuites()); 
-
196:	socket.startHandshake(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: close, startHandshake
194:	c.startHandshake(); 
-
198:	FileSender.SendFile(c, fs); 
199:	c.close(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getSession, startHandshake
247:	ssl.startHandshake(); 
-
249:	SSLSession session = ssl.getSession(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getNeedClientAuth
89:	return socket.getNeedClientAuth(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getInputStream, getSession, startHandshake
91:	SSLSession session = ssl.getSession(); 
-
96:	InputStream in = ssl.getInputStream(); 
-
116:	session = ssl.getSession(); 
-
120:	ssl.startHandshake(); 
-
124:	session = ssl.getSession(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setEnabledCipherSuites, setEnabledProtocols, setNeedClientAuth, setWantClientAuth
1475:	socket.setWantClientAuth(getWantClientAuth()); 
-
1477:	socket.setNeedClientAuth(getNeedClientAuth()); 
-
1479:	socket.setEnabledCipherSuites(_selectedCipherSuites); 
1480:	socket.setEnabledProtocols(_selectedProtocols); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: setEnableSessionCreation, setEnabledCipherSuites, setEnabledProtocols, setNeedClientAuth, setUseClientMode
575:	sslSocket.setUseClientMode(isClientMode); 
576:	sslSocket.setEnableSessionCreation(isCreation); 
-
580:	sslSocket.setNeedClientAuth(isNeedClientAuth); 
581:	sslSocket.setWantClientAuth(isWantClientAuth); 
-
584:	sslSocket.setEnabledCipherSuites(suites); 
-
587:	sslSocket.setEnabledProtocols(protocols); 
-
589:	sslSocket.startHandshake(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getInputStream, getSession, startHandshake
91:	SSLSession session = ssl.getSession(); 
-
96:	InputStream in = ssl.getInputStream(); 
-
116:	session = ssl.getSession(); 
-
120:	ssl.startHandshake(); 
-
124:	session = ssl.getSession(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getSession, startHandshake
236:	ssl.startHandshake(); 
-
238:	SSLSession session = ssl.getSession(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: close
79:	soc.close(); 
Full Snippet Info
5
CodeRank
Related Java 8 SSLSocket Questions & Answers:
See Code Examples for Java 8 SSLSocket Methods: