国产成人毛片视频|星空传媒久草视频|欧美激情草久视频|久久久久女女|久操超碰在线播放|亚洲强奸一区二区|五月天丁香社区在线|色婷婷成人丁香网|午夜欧美6666|纯肉无码91视频

制作ssl的證書

Preparation :1,deploy 一個新的server 時,需要申請兩個ports ,一個給http 用,一個給https 用,如:firestar 就是8099給http 用,8100給h

Preparation :

1,deploy 一個新的server 時,需要申請兩個ports ,一個給http 用,一個給https 用,如:

firestar 就是8099給http 用,8100給https 用。

即使開始時還沒有cert ,要先給deploy https做準(zhǔn)備,預(yù)留出https 的port :

1), 在weblogic 控制臺的servers ->myserver->general,要將http 和https (ssl )都設(shè)好。

如圖:

2) 在主配置文件:fusion-config.xml 中也要將https 的內(nèi)容都填了,是和http 相對應(yīng)的, 都是填url 信息,只是http 的用一個port ,如:8099,而https 的都用另一個,如:8100。 (refer to :InstallFusiondm313libo.doc )剛deploy 好的server ,登陸用的都是http 的,是不能使用https 的,因為沒有在weblogic 中deploy cert。具體制作和deploy cert,在本文中說明。

一、 在pc 上安裝openssl 。安裝后的Path :C:OpenSSL

安裝Win32OpenSSL-v0.9.7i.exe ,

并手動拷貝demoCA (path :SSLWin32OpenSSL-v0.9.7i?moCA,下面有private 和newcerts 兩個folders ,是gongzhi 和安裝程序一起給的)到C:OpenSSLbin下面(這步,每次必須做)

Note, when you install OpenSSL in your PC, need to copy 'demoCA' folder to '{OpenSSL}bin'.

,

如果已經(jīng)做了一個證書,想做個新的,需要刪除C:OpenSSLbin下面的jks,der,pem,client.p12,crs ,.rnd 等文件(這些是做證書執(zhí)行指令是生成的,日期同做證書的時間,執(zhí)行command 的結(jié)果寫入這些files 中),別的exe 、CA.pl 和folder 等留著。

二、 安裝JDK1.4. Path :C:j2sdk1.4.2_06

并手動配置環(huán)境變量

Need install JDK1.4. to your pc first, set environment variable(JAVA home), my computer->right key->property-> advanced-> environment variables->system variables,

1, 先add a new sys variable: [variable name: JAVA_HOME, variable value: C:j2sdk1.4.2_06(值是安裝jdk 的路徑,即:java home)]

2, 修改原來的變量:path ,在它的值里面加上我們新加的變量:[ variable name: Path, variable value: JAVA_HOMEbin;],原來就有個variable 叫:path ,現(xiàn)在是往它下面添加新的路徑,直接填到value 的最后,用分號和前面的隔開,將新的路徑拷上去保存即可。

Java_home這個名字是自己隨便起的,因為是新加的變量。后面引用要一致。 變量Path 是系統(tǒng)原來就有的,不能隨便改

可以在path 這個variable 的值中看到我們定義的變量:

C:Program FilesPC Connectivity Solution;JAVA_HOMEbin;C:Program FilesCommon

FilesNetSarang;C:oracleproduct.2.0client_1bin;SystemRootsystem32;SystemRoot;SystemRootSystem32Wbem;C:Program Files?tivCard?tivCard Goldresources;C:Program FilesCommon FilesThunder NetworkKanKanCodecs

用這個指令查一下:

C:Documents and Settingsbli1>java -version

java version "1.4.2_06"

Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_06-b03) Java HotSpot(TM) Client VM (build 1.4.2_06-b03, mixed mode)

說明已經(jīng)是這個version 了。

如果pc 上原來就安裝了別的版本的jdk ,不必刪除,繼續(xù)安裝新的即可。有時,一個pc 上可能安裝好幾個不同版本的jdk ,他們能同時存在(1.6好像是安裝高版本的,會把低的先刪除)。

定義環(huán)境變量,應(yīng)該有兩種方法,一種就是上面的,先加一個新的,然后在path 里面,用引用,加到path 里面。再一個就是直接將全路徑加到path 中,不用在前面定義了。

,

三、 Steps :

Run -》Cmd ,

cd C:OpenSSLbin

Execute commands:

如果給別人做cert ,要讓他給我、他所要部署的server 的IP 地址(或域名,這里不用端口) ,這是我所用的最有效信息,這個不對,做好的cert 往它server 上部署后也不能用。

別的也可以按照他的要求做,如:廠家名稱寫成他的,但這些都不是必須的信息。而且這些信息,即使不準(zhǔn)確也行,如:用SS 或IBM 都行,這些信息不是關(guān)鍵,關(guān)鍵是IP 或域名。

如果已經(jīng)做了一個證書,想做個新的,需要刪除C:OpenSSLbin下面的jks,der,pem,client.p12,crs ,.rnd 等文件(這些是做證書執(zhí)行指令是生成的,日期同做證書的時間,執(zhí)行command 的結(jié)果寫入這些files 中),別的exe 、CA.pl 和folder 等留著。

Step 1: Creating Certificate Authority Keys

此指令執(zhí)行完,會自動添加環(huán)境變量到系統(tǒng):

it can create a Environment Variables

(Variable :OPENSSL_CONF,

Value: C:OpenSSLbinopenssl.cnf,在systems variables下) in your system.

在run 中執(zhí)行,path 是:C:OpenSSLbin,本文檔的所有指令都要在此目錄下執(zhí)行,如:openssl 命令等。

Run -》Cmd

cd C:OpenSSLbin

Execute command:

1,

$ openssl req -x509 -newkey rsa:1024 -keyout cakey.pem -out cacert.pem -config openssl.cnf -days 3650

,

會提示填寫一些信息,生成files :cakey.pem 和 cacert.pem ,并將結(jié)果寫入這兩個files 。–days 拷入后,會出問題:自動生成空格,需要在cmd 下手動修改,去掉空格(去掉空格、加橫線時,輸入法要用英文的)。

從指令可看出,period of validity is 10年

指定pass phrase在下面操作中會被調(diào)用。

輸入pass phrase的地方愛出問題,最好不要拷,要輸對,因為看不到,這里要用拼音加加,輸入值能先看一下,再回車,輸入進去。

方法二: 輸入密碼前, 先在cmd 下將輸入法調(diào)為英文, 并且輸幾個字母, 如果沒有問題, 就能在輸入密碼時使用.

這里即使輸錯了,現(xiàn)在還不報錯,到第8條指令時,因為還要輸這個密碼,這里如果不知道輸入的什么,到時就總是通不過了。而且到時用什么輸入法,都看不到輸入值,如果這里用了拼音加加,到時還用拼音加加,即使看不到,但還能通過,不然,到了第8條指令時,會老是輸入不通過?;蛘叩綍r直接拷過去就行。 反正在這里時,如果輸入密碼時什么都沒有看見而輸了,到第8條指令時,肯定過不去。

Now you will be asked a set of questions in creating the key pair as shown below:

C:OpenSSLbin>openssl req -x509 -newkey rsa:1024 -keyout cakey.pem -out cacert.

pem -config openssl.cnf -days 3650(expire 十年)

Loading 'screen' into random state - done

Generating a 1024 bit RSA private key

...

...

writing new private key to 'CAKey.pem'

Enter PEM pass phrase:changeme (這里要手動輸入,不要拷,用拼音加加的漢字輸入,先看一下輸入值再回車)

Verifying - Enter PEM pass phrase:changeme

-----

You are about to be asked to enter information that will be incorporated into your certificate request.

What you are about to enter is what is called a Distinguished Name or a DN.

There are quite a few fields but you can leave some blank. For some fields there will be a default value,If you enter '.', the field will be left

,

blank.

-----

Country Name (2 letter code) [AU]:CN

State or Province Name (full name) [Some-State]:BEIJING

Locality Name (eg, city) []:BEIJING

Organization Name (eg, company) [Internet Widgits Pty Ltd]:SS Organizational Unit Name (eg, section) []:PPP

Common Name (eg, YOUR name) []:15.154.146.104 (Please input your server IP address or Domain name,這就是登陸ip 地址, 外網(wǎng):219.143.232.134,這個一定不能填錯)

Email Address []:bo.li@SS.com //email只輸入這么一次即可,以下都是display

After the configure operation, automatic quit.以上info 會在做好的cert 中顯示。

現(xiàn)在keystore 主密碼是:changeme

The result of the above will be two files(執(zhí)行指令的result ,是將一些信息寫入下面two files ,這兩個files ,是automatic 生成的。Bin 下面,at first ,there are only *.exe files in the folder,執(zhí)行command 后,會陸續(xù)生成cakey.pem 等這些文件):

? cakey.pem

? cacert.pem

The cakey.pem file contains the encrypted private key and the cacert.pem file contains the public key certificate signed using the private key

(Figure 1).changeme

Figure 1: CA's private key and the self signed certificate

Step 2: Client and Service Keys

Now let ’s create the two sets of keys for the service and the client using the 'keytool' that comes with the JDK. Lets use the 'keytool -genkey' to

,

create a keypair and store it in a keystore using the following command: Cmd

Cd C:OpenSSLbin

Need install JDK1.4. to your pc first, set environment variable(JAVA home)

2,

$ keytool -genkey -alias client -keyalg RSA -keystore client.jks 會提示重新填寫一些信息,生成一個文件:client.jks ,并將這些信息寫入這個文件,info 要和1填寫的一致。

指令中parameter :alias ,是讓指定別名,這里輸入的叫:client 。

{

C:OpenSSLbin>keytool -genkey -alias client -keyalg RSA -keystore client.jks

輸入keystore 密碼: changeme(輸入)

您的名字與姓氏是什么?

[Unknown]: 15.154.146.104(所配server 的IP 或域名,外網(wǎng):219.143.232.134) 您的組織單位名稱是什么?

[Unknown]: PPP

您的組織名稱是什么?

[Unknown]: SS

您所在的城市或區(qū)域名稱是什么?

[Unknown]: BEIJING

您所在的州或省份名稱是什么?

[Unknown]: BEIJING

該單位的兩字母國家代碼是什么

[Unknown]: CN

CN=15.154.146.104, OU=PPP, O=SS, L=BEIJING, ST=BEIJING, C=CN 正確嗎?

[否]: y

輸入的主密碼

(如果和 keystore 密碼相同,按回車):回車

C:OpenSSLbin>

}

執(zhí)行result 是生成了file :client.jks ,將相關(guān)信息,寫入這個文件中。

,

The created keys are stored in the client.jks file (Figure 2) which is

a Java keystore under the alias client.

Figure 2: Contents of a keystore with a single key entry To verify this fact we can list the contents of the keystore as shown below.

3,

$ keytool -list -v -keystore client.jks -storepass changeme

用list 命令,查看一下client file :client.jks 中的info, 這里的changeme ,是上面設(shè)置的密碼。Display 的別名名稱叫:client ,是執(zhí)行2時指定的。 {

C:OpenSSLbin>keytool -list -v -keystore client.jks -storepass changeme

Keystore 類型: jks

Keystore 提供者: SUN

您的 keystore 包含 1 輸入

別名名稱: client

創(chuàng)建日期: 2009-5-25

輸入類型:KeyEntry

認(rèn)證鏈長度: 1

認(rèn)證 [1]:

Owner: CN=15.154.146.104, OU=PPP, O=SS, L=BEIJING, ST=BEIJING, C=CN 發(fā)照者: CN=15.154.146.104, OU=PPP, O=SS, L=BEIJING, ST=BEIJING, C=CN 序號: 4a1a3a26

有效期間: Mon May 25 14:26:46 CST 2009 至: Sun Aug 23 14:26:46 CST 2009 認(rèn)證指紋:

MD5: 93:3E:B4:2F:95:41:02:AB:DD:A3:FE:48:E0:80:5E:1D

SHA1: 9A:03:63:17:F7:F0:85:A5:15:8A:8D:9A:1D:9F:CD:12:00:C8:34:5A

,

*******************************************

*******************************************

C:OpenSSLbin>

C:OpenSSLbin>

Excute 完這個帶list 的command ,是display some values that be created automatic at that process ,如:指紋碼、client 的別名。只是顯示,沒有讓輸入任何值。這是做了client 的,并顯示一下。通過這個指令,指紋碼就建好了,應(yīng)是隨即生成的。下面建立server 的。

4,

$ keytool -genkey -alias service -keyalg RSA -keystore service.jks Note that we will be using 'changeme' (without quotes) as the password of both keys and keystores.

會提示重新填寫一些信息,生成一個文件:service.jks ,并將這些信息寫入這個文件,info 要和1填寫的一致。

指令中parameter :alias ,它后面是讓指定別名,這里輸入的叫:service ,那指定的server 的別名就叫:service 。

輸入一些信息,引用changeme 。

C:OpenSSLbin>keytool -genkey -alias service -keyalg RSA -keystore service.jks

輸入keystore 密碼: changeme(輸入)

您的名字與姓氏是什么?

[Unknown]: 15.154.146.104(外網(wǎng):219.143.232.134)

您的組織單位名稱是什么?

[Unknown]: PPP

,

您的組織名稱是什么?

[Unknown]: SS

您所在的城市或區(qū)域名稱是什么?

[Unknown]: BEIJING

您所在的州或省份名稱是什么?

[Unknown]: BEIJING

該單位的兩字母國家代碼是什么

[Unknown]: CN

CN=15.154.146.104, OU=PPP, O=SS, L=BEIJING, ST=BEIJING, C=CN 正確嗎?

[否]: Y

輸入的主密碼

(如果和 keystore 密碼相同,按回車):回車

C:OpenSSLbin>

}

執(zhí)行完成,是建立了file :service.jks ,并往里寫了上面info ,可以看一下,將上面keytool -list 指令里面的client 改為server ,密碼都是changeme 。server 的別名是service ,這個是執(zhí)行4時生成的,這個別名要在weblogic 的控制臺deploy 這個cert 時用,因為在weblogic 中算是部署server ,不是client ,5是顯示service.jks 的信息。

5,

$ keytool -list -v -keystore service.jks -storepass changeme 這command 是顯示service.jks 的info 。包括在4中設(shè)置的別名。

C:OpenSSLbin>keytool -list -v -keystore service.jks -storepass changeme

,

Keystore 類型: jks

Keystore 提供者: SUN

您的 keystore 包含 1 輸入

別名名稱: service

創(chuàng)建日期: 2009-5-25

輸入類型:KeyEntry

認(rèn)證鏈長度: 1

認(rèn)證 [1]:

Owner: CN=15.154.146.104, OU=PPP, O=SS, L=BEIJING, ST=BEIJING, C=CN 發(fā)照者: CN=15.154.146.104, OU=PPP, O=SS, L=BEIJING, ST=BEIJING, C=CN 序號: 4a1a3ab7

有效期間: Mon May 25 14:29:11 CST 2009 至: Sun Aug 23 14:29:11 CST 2009 認(rèn)證指紋:

MD5: 62:BE:89:60:A3:BD:E8:B1:E3:02:D6:55:EA:1B:73:C3 SHA1:

39:83:C6:B3:E8:13:BA:56:8A:8C:77:EC:83:F3:1F:6D:87:ED:F6:91

*******************************************

*******************************************

C:OpenSSLbin>

Step 3: Producing Signed X509 Certificates

(Please copy ‘cakey.pem ’file to ‘bin?moCAprivate’ folder and copy

標(biāo)簽: