JSSE与证书

JSSE是一个纯java实现的ssl和tls协议的框架。

JSSE已经成为j2se1.4版本中的标准组件。

 

JSSE 使用的证书要用与 J2SE 一起发布的 Java keytool 来创建。
用下列命令来为 HTTP 服务器创建一个 RSA 证书。

 

-------------------------------------------------------------------------------

证书生成过程如下:

-------------------------------------------------------------------------------


prompt> keytool -genkey -keystore serverkeys -keyalg rsa -alias qusay

[qusay] 是别名
[serverkeys] 该证书会保存在该文件中
--------------------------------------------------------------------------------

控制台运行内容如下 [xxxx]是回答部分
--------------------------------------------------------------------------------
Enter keystore password: [hellothere]

What is your first and last name?

[Unknown]: [ultra.domain.com]

What is the name of your organizational unit?

[Unknown]: [Training and Consulting]

What is the name of your organization?

[Unknown]: [javacourses.com]

What is the name of your City or Locality?

[Unknown]: [Toronto]

What is the name of your State or Province?

[Unknown]: [Ontario]

What is the two-letter country code for this unit?

[Unknown]: [CA]

Is CN=ultra, OU=Training and Consulting,

O=javacourses.com, L=Toronto, ST=Ontario, C=CA correct?

[no]: yes或者y(英文版yes,中文版y)

Enter key password for

(RETURN if same as keystore password): [hiagain]

上面出现2次password 分别是store 和key 的。

你可能感兴趣的:(C++,c,框架,J2SE,C#)