资源简介
71c7f9eea20bfdeb24319c13f0b52703.rar
代码片段和文件信息
import java.net.*;
import java.io.*;
import javax.net.ssl.*;
public class SimpleClient {
public static void main(String args[])throws IOException
{
InetAddress hostIA = InetAddress.getByName(args[0]);
String host = hostIA.getHostName();
int port = Integer.parseInt(args[1]);
System.out.println(“USAGE: java SimpleClient host port“);
try {
System.out.println(“connecting...“);
SSLSocketFactory sslFact =
(SSLSocketFactory)SSLSocketFactory.getDefault();
SSLSocket c = (SSLSocket)sslFact.createSocket(host port);
System.out.println(“handshaking...“);
c.startHandshake();
BufferedReader in =
new BufferedReader(
new InputStreamReader(c.getInputStream()));
PrintWriter out = new PrintWriter(
new BufferedWriter(
new OutputStreamWriter(
c.getOutputStream())));
BufferedReader stdin =
new BufferedReader(
new InputStreamReader(System.in));
String line;
String strin;
for(;;)
{
System.out.print(“Enter a line:“);
strin = stdin.readLine();
if (strin.length() == 0) break;
out.println (strin);
out.flush();
line = in.readLine();
System.out.println(“Msg from Server is: “ + line);
}
in.close();
out.close();
c.close();
System.out.println(“done...“);
} catch (IOException e) {
System.out.println(“SimpleClient died: “ + e.getMessage());
e.printStackTrace();
}
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2005-03-19 12:47 sslJAVA_example
目录 0 2005-03-19 12:47 sslJAVA_example\openssl生成证书
文件 323 2002-12-02 14:11 sslJAVA_example\openssl生成证书\genclient
文件 68 2002-12-02 14:11 sslJAVA_example\openssl生成证书\gendh
文件 158 2002-12-02 14:11 sslJAVA_example\openssl生成证书\genroot
文件 325 2002-12-02 14:11 sslJAVA_example\openssl生成证书\genserver
文件 7151 2002-12-02 14:11 sslJAVA_example\openssl生成证书\myopenssl.cnf
文件 3 2002-12-02 14:13 sslJAVA_example\openssl生成证书\rootcert.srl
文件 1127 2002-12-02 14:11 sslJAVA_example\rootcert.pem
文件 1143 2002-12-02 14:13 sslJAVA_example\servercert.pem
文件 3192 2002-12-03 15:24 sslJAVA_example\serverkeys
文件 688 2002-12-03 14:24 sslJAVA_example\serverreq.pem
文件 2163 2002-12-02 15:23 sslJAVA_example\SimpleClient.class
文件 1754 2002-11-25 09:13 sslJAVA_example\SimpleClient.java
文件 2815 2002-12-02 15:23 sslJAVA_example\SimpleServer.class
文件 2348 2002-12-02 15:23 sslJAVA_example\SimpleServer.java
文件 2294 2002-11-25 16:39 sslJAVA_example\SimpleServer.java.bak
文件 35840 2005-03-19 12:39 sslJAVA_example\ssl.doc
文件 781 2002-11-25 09:16 sslJAVA_example\wahab.cert
文件 1253 2002-11-25 09:15 sslJAVA_example\wahabPrivateStore
文件 846 2002-11-25 09:22 sslJAVA_example\wahabPublicStore
----------- --------- ---------- ----- ----
64272 21
相关资源
- 改进型JAKES模型在OFDM系统中的仿真.
- 8f8c313c51b9106c29d322b46802692f.7z
- e2c105e93aaafb1f8f2a5004bbea3e3b.rar
- b7bc79d087b2d734fb41e951f0b7454e.rar
- cbc970483af4c418facf4389b5cb4149.rar
- 99秒跑马表.doc
- DS1302_8位数码管_仿真.zip
- 国六诊断服务说明.docx
- 11选5历史统计工具.rar
- 54b963f4fe4d219cd17985afaef282f8.rar
- cubeMX视频教程stm32hal库函数cubemx实战讲
- 微软官方正式版Win101903专业版64位MS
- 09869d2b577c3f2e9ef988038386df3f.txt
- 3.circ
- 20a5aaea8f1d8859ad58a976efdb90a7.txt
- SPSS地址信息-百度云盘.txt
- 268bbc81ae87aec7a19d5ccf3afde809.rar
- 基于FEKO软件仿真计算战斗机的RCS_赵雷
- e3590920c6d1cb91e70a29464056d46f.doc
- 网络化控制切换仿真.docx
- cd7b02a80b63de41fce63008c278aae1.rar
- a6d355e44937795364dd3f1d9d6b8bee.docx
- 虚拟同步机VSG仿真.zip
- 66b557733ace1535d3a4ff36eb748e99.rar
- Quartus链接,及内容展示压缩包3.3G,超
- chopper.exe
- 以弹体坐标系定义A、N的仿真.zip
- ArcgisServer10.7.1许可.rar
- 广联达GQI2021GTJ2021计价6.0最新写锁ID模
- 6机器调度问题.rar
评论
共有 条评论