FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
SSL-By-Example/SSLClient.java at master · anishnath/SSL-By-Example · GitHub
anishnath
/
SSL-By-Example
Public
Notifications
You must be signed in to change notification settings
Fork
3
Star
6
Code
Issues
0
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
SSL-By-Example
/
SSLClient.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
39 lines (34 loc) · 1.05 KB
Breadcrumbs
SSL-By-Example
/
SSLClient.java
Copy path
File metadata and controls
39 lines (34 loc) · 1.05 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package
ssl
;
import
javax
.
net
.
ssl
.
SSLSocket
;
import
javax
.
net
.
ssl
.
SSLSocketFactory
;
import
java
.
io
.*;
/**
Visit the channel http://youtube.com/zarigatongy
*/
public
class
SSLClient
{
public
static
void
main
(
String
[]
arstring
) {
try
{
SSLSocketFactory
sslsocketfactory
= (
SSLSocketFactory
)
SSLSocketFactory
.
getDefault
();
SSLSocket
sslsocket
= (
SSLSocket
)
sslsocketfactory
.
createSocket
(
"localhost"
,
1234
);
InputStream
inputstream
=
System
.
in
;
InputStreamReader
inputstreamreader
=
new
InputStreamReader
(
inputstream
);
BufferedReader
bufferedreader
=
new
BufferedReader
(
inputstreamreader
);
OutputStream
outputstream
=
sslsocket
.
getOutputStream
();
OutputStreamWriter
outputstreamwriter
=
new
OutputStreamWriter
(
outputstream
);
BufferedWriter
bufferedwriter
=
new
BufferedWriter
(
outputstreamwriter
);
String
string
=
null
;
while
((
string
=
bufferedreader
.
readLine
()) !=
null
) {
bufferedwriter
.
write
(
string
+
'\n'
);
bufferedwriter
.
flush
();
}
}
catch
(
Exception
e
) {
e
.
printStackTrace
();
}
}
}
Back
|
FazBrowse Home
|
New Git URL