1. 程式人生 > >openssl簽名配置tomcat7單雙向SSL

openssl簽名配置tomcat7單雙向SSL

Windows 下OpenSSL 安裝詳解 +圖解

安裝環境:

     1、作業系統:Windows XP SP2

2C++編譯器:VC++ 6.0

下載:

  • 下載ActivePerl  5.10.1.1007(最新的版本或較低的版本也可以):

(當前的最新版本為ActivePerl 5.10.1.1007 ,只要按照Windows下一般程式的安裝步驟進行即可~~~在此就不贅述了)

  • 下載 openssl-0.9.8m(當然也可以最新的版本)並解壓。

PerlOpenSSL的安裝:

安裝Perl

(我的安裝目錄為C:\perl\eg)

執行“CMD”命令,使用cd命令指向perl安裝目錄的eg檔案,執行“perl example.pl”若顯示“Hello from ActivePerl!”,則說明Perl安裝成功,可以開始使用Perl的相關命令來進行OpenSSL的安裝了,如下圖:

Note:如果你想看看原始的INSTALL檔案,那麼請開啟OpenSSL的解壓縮目錄,下面有兩個檔案INSTALL.W32和INSTALL.W64,用記事本方式開啟,你可以看到詳細的關於安裝的解釋~~~~

開始安裝OpenSSL

  • 初始化VC++ 6.0 環境變數(找到vc++ 6.0的安裝目錄下的\VC98\Bin\執行如下的命令):

  • 執行Configure命令(配置編譯引數):

  • 執行ms\do_ms命令(在使用Configure指令碼配置好引數):

另外兩種方式 如果使用也必須保證本機安裝有相應的編譯器才能使用。
     :ms\do_masm
(預設vc自帶的;也可以自己下載masm並安裝)   
     :ms\do_nasm (需要下載nasm)

  • 執行“nmake -f ms\ntdll.mak”命令進行程式碼編譯(需將目錄跳到OpenSSL目錄下)

如果編譯成功,最後的輸出都在out32dll目錄下:包括可執行檔案、兩個dll和兩個lib檔案: libeay32.dll, libeay32.lib, ssleay32.dll, ssleay32.lib ;把他們放到PATH環境變數對應的一個目錄裡就可以了。

  • 測試使用命令“nmake -f ms\ntdll.mak test”

若安裝成功的話,顯示的最後幾行如下圖:

  • 配置VC++ 6.0下的相關引數

VC++ 6.0的工具》選項》目錄下的Include files下新增

OpenSSL安裝目錄下的include目錄;在Library files下新增out32dll目錄,現在你就可以使用OpenSSL程式設計了~~~



使用openssl簽名證書並在tomcat7中進行配置

1 準備
首先,在進行證書籤名前準備一些軟體,並配置一些環境。包括:
1.1 下載安裝openssl
1.2 確定伺服器及客戶端使用者名稱
這裡規劃如下:
機器                           機器名                             備註
部署應用伺服器的伺服器 server.neuqdomain                最好採用:名稱 + “.域名”格式
客戶端使用者              任意                             任意格式
ca根證書                           無                             不同於伺服器名的任意名稱

這裡比較重要的一點是:需要在伺服器和測試的客戶端中配置該伺服器的DNS名稱為

server.neuqdomain。在windows下測試時,我們可以直接修改%windir%\system32

\drivers\etc\hosts 檔案。在該檔案中新增:
127.0.0.1 server.neuqdomain
即可。
1.3 根證書資訊規劃
檢查是否有根證書,如果沒有先確定根證書的名稱
這裡規劃根證書為:neuqca
完整資訊為:
國家:CN,省:heb,市:qhd,單位性質:com,單位名:neuqsoft
使用者名稱:  neuqrootca    密碼:
1.4 伺服器端證書規劃
這裡規劃根證書為:server (注意:此伺服器端證書使用者名稱必須和伺服器機器名一致)
完整資訊為:
國家:CN,省:heb,市:qhd,單位性質:com,單位名:neuqsoft
使用者名稱:  server.neuqdomain    密碼:
1.5 客戶器端證書規劃
這裡規劃根證書為:client (此處客戶端使用者名稱可以任意指定)
完整資訊為:
國家:CN,省:heb,市:qhd,單位性質:com,單位名:neuqsoft
使用者名稱:  client    密碼:
1.6 規劃一下儲存放置證書的目錄
這裡產生的證書放到測試用的tomcat中的 %TOMCAT_HOME%\conf\ssl中(實際任意目錄均可

,建議統一規劃),再在該目錄下劃分為:ca,server,client,jks幾個目錄
配置openssl的環境變數
將%openssl_home%\bin目錄新增到path的環境變數中,確保能在命令列中執行openssl命令。

執行正確會出現 openssl>提示符。出現提示符後quit即可。
1.7 檔案字尾名規劃
產生證書過程中會用到的檔案字尾規劃如下:
字尾名 格式 備註
-key.pem pem pem檔案一般是文字格式的,可以放證書或者私鑰。這裡用來放key檔案
-req.csr csr 證書請求檔案
-cert.cer cer 公鑰證書
.p12 p12 個人證書格式PKCS12
.keystore jks jks證書儲存庫,注意linux下最好使用keystore字尾名
.srl srl CA序列號檔案
證書key檔案,未簽名的證書檔案
2 證書生成配置
2.1 建立根證書,並用openssl自簽名
此工程產生的證書可複用。應當每次使用一個相同的根證書,不要重新生成。
1. 生成ca根證書key
openssl genrsa -out ca/root-key.pem 1024
2.建立根證書請求檔案
openssl req -new -out ca/root-req.csr -key ca/root-key.pem
#openssl req -new -out ca/root-req.csr -key ca/root-key.pem -keyform PEM
3.自籤根證書
openssl x509 -req -in ca/root-req.csr -out ca/root-cert.cer -signkey ca/root-key.pem -

CAcreateserial -days 3650
4.匯出p12格式根證書
openssl pkcs12 -export -clcerts -in ca/root-cert.cer -inkey ca/root-key.pem -out ca/root.p12
5.生成root.jks檔案
keytool -import -v -trustcacerts -storepass 222222 -alias neuqrootca -file ca/root-cert.cer -

keystore jks/root.keystore
輸出截圖資訊為:
------------------------產生自簽名根證書部分--------------------------------
D:\appserver\tomcat-7.0.37\conf\ssl>openssl genrsa -out ca/root-key.pem 1024
Loading 'screen' into random state - done
Generating RSA private key, 1024 bit long modulus
.......++++++
...........++++++
e is 65537 (0x10001)

D:\appserver\tomcat-7.0.37\conf\ssl>openssl req -new -out ca/root-req.csr -key c
a/root-key.pem
Loading 'screen' into random state - done
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]:heb
Locality Name (eg, city) []:qhd
Organization Name (eg, company) [Internet Widgits Pty Ltd]:com
Organizational Unit Name (eg, section) []:neuqsoft
Common Name (e.g. server FQDN or YOUR name) []:neuqrootca
Email Address []:[email protected]

Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:123456
An optional company name []:

D:\appserver\tomcat-7.0.37\conf\ssl>openssl x509 -req -in ca/root-req.csr -out c
a/root-cert.cer -signkey ca/root-key.pem -CAcreateserial -days 3650
Loading 'screen' into random state - done
Signature ok
subject=/C=CN/ST=heb/L=qhd/O=com/OU=neuqsoft/CN=neuqrootca/emailAddress=neuqro

D:\appserver\tomcat-7.0.37\conf\ssl>openssl pkcs12 -export -clcerts -in ca/root-
cert.cer -inkey ca/root-key.pem -out ca/root.p12
Loading 'screen' into random state - done
Enter Export Password:
Verifying - Enter Export Password:

D:\appserver\tomcat-7.0.37\conf\ssl>keytool -import -v -trustcacerts -storepass
222222 -alias neuqrootca -file ca/root-cert.cer -keystore jks/root.jks
所有者:[email protected], CN=neuqrootca, OU=neuqsoft, O=com,
L=qhd, ST=heb, C=CN
簽發人:[email protected], CN=neuqrootca, OU=neuqsoft, O=com,
L=qhd, ST=heb, C=CN
序列號:e6d18bc29dc3513e
有效期: Fri Apr 05 10:11:00 CST 2013 至Mon Apr 03 10:11:00 CST 2023
證書指紋:
         MD5:99:14:5B:63:F2:79:ED:B6:A6:FD:21:1E:20:ED:06:4F
         SHA1:9F:1D:AE:13:EE:98:4F:C0:19:70:38:A4:37:28:4B:31:D4:63:60:4C
         簽名演算法名稱:SHA1withRSA
         版本: 1
信任這個認證? [否]:  是
認證已新增至keystore中
[正在儲存 jks/root.jks]
2.2 產生根證書籤名的伺服器端證書部分
此過程應當針對具體的伺服器進行證書籤發。不同的伺服器應當使用不同的證書。
1.生成服務端key
openssl genrsa -out server/server-key.pem 1024
2.生成服務端請求檔案
openssl req -new -out server/server-req.csr -key server/server-key.pem
3.生成服務端證書(root證書,rootkey,客戶端key,客戶端請求檔案這4個生成客戶端證書)
openssl x509 -req -in server/server-req.csr -out server/server-cert.cer -signkey

server/server-key.pem -CA ca/root-cert.cer -CAkey ca/root-key.pem -CAcreateserial -days

3650
4.生成服務端p12格式根證書
openssl pkcs12 -export -clcerts -in server/server-cert.cer -inkey server/server-key.pem -out

server/server.p12
檢視證書資訊
使用以下命令可以檢查生成的證書資訊
keytool -list -keystore server/server.p12 -storetype pkcs12 -v -storepass 123456
匯出服務端證書到JKS
keytool -import -v -trustcacerts -storepass 123456 -alias neuqserver -file server/server-

cert.cer -keystore jks/server.keystore
輸出截圖資訊為:
D:\appserver\tomcat-7.0.37\conf\ssl>openssl genrsa -out server/server-key.pem 10
24
Loading 'screen' into random state - done
Generating RSA private key, 1024 bit long modulus
.......................++++++
.............................++++++
e is 65537 (0x10001)

D:\appserver\tomcat-7.0.37\conf\ssl>openssl req -new -out server/server-req.csr
-key server/server-key.pem
Loading 'screen' into random state - done
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]:heb
Locality Name (eg, city) []:qhd
Organization Name (eg, company) [Internet Widgits Pty Ltd]:com
Organizational Unit Name (eg, section) []:neuqsoft
Common Name (e.g. server FQDN or YOUR name) []:server.neuqdomain
Email Address []:[email protected]

Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:

D:\appserver\tomcat-7.0.37\conf\ssl>openssl x509 -req -in server/server-req.csr
-out server/server-cert.cer -signkey server/server-key.pem -CA ca/root-cert.cer
-CAkey ca/root-key.pem -CAcreateserial -days 3650
Loading 'screen' into random state - done
Signature ok
subject=/C=CN/ST=heb/L=qhd/O=com/OU=neuqsoft/CN=server.neuqdomain/emailAddress

=s
[email protected]
Getting Private key
Getting CA Private Key

D:\appserver\tomcat-7.0.37\conf\ssl>openssl pkcs12 -export -clcerts -in server/s
erver-cert.cer -inkey server/server-key.pem -out server/server.p12
Loading 'screen' into random state - done
Enter Export Password:
Verifying - Enter Export Password:

D:\appserver\tomcat-7.0.37\conf\ssl>keytool -import -v -trustcacerts -storepass
123456 -alias neuqserver -file server/server-cert.cer -keystore jks/server.jks
所有者:[email protected], CN=server.neuqdomain, OU=neuqsoft,

O=co
m, L=qhd, ST=heb, C=CN
簽發人:EMAILADDRE[email protected], CN=neuqrootca, OU=neuqsoft, O=com,
L=qhd, ST=heb, C=CN
序列號:bbd911d011910725
有效期: Fri Apr 05 10:21:31 CST 2013 至Mon Apr 03 10:21:31 CST 2023
證書指紋:
         MD5:A7:CD:0C:16:00:A2:A3:77:4C:45:15:30:B1:2F:84:B0
         SHA1:1A:C4:49:77:0C:1C:9F:E5:FC:3E:33:37:6F:A4:27:41:A7:08:15:E7
         簽名演算法名稱:SHA1withRSA
         版本: 1
信任這個認證? [否]:  是
認證已新增至keystore中
[正在儲存 jks/server.jks]
2.3 產生根證書籤名的客戶端證書部分
需要雙喜認證時使用。此時需要為每個客戶端分發客戶端證書。根據實際業務,可以各客戶端

使用同一個客戶端證書,也可以各客戶端使用不同的證書。
1.生成客戶端key
openssl genrsa -out client/client-key.pem 1024
2.生成客戶端請求檔案
openssl req -new -out client/client-req.csr -key client/client-key.pem
3.生成客戶端證書(root證書,rootkey,客戶端key,客戶端請求檔案這4個生成客戶端證書)
openssl x509 -req -in client/client-req.csr -out client/client-cert.cer -signkey client/client-

key.pem -CA ca/root-cert.cer -CAkey ca/root-key.pem -CAcreateserial -days 3650
4.生成客戶端p12格式根證書
openssl pkcs12 -export -clcerts -in client/client-cert.cer -inkey client/client-key.pem -out

client/client.p12
檢視證書資訊
使用以下命令可以檢查生成的證書資訊
keytool -list -keystore client/client.p12 -storetype pkcs12 -v -storepass 123456
匯出客戶端證書到jks:
keytool -import -v -trustcacerts -storepass 123456 -alias neuqclient -file client/client-cert.cer

-keystore jks/client.keystore
輸出截圖資訊為:
D:\appserver\tomcat-7.0.37\conf\ssl>openssl genrsa -out client/client-key.pem 10
24
Loading 'screen' into random state - done
Generating RSA private key, 1024 bit long modulus
......++++++
.......++++++
e is 65537 (0x10001)

D:\appserver\tomcat-7.0.37\conf\ssl>openssl req -new -out client/client-req.csr
-key client/client-key.pem
Loading 'screen' into random state - done
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]:heb
Locality Name (eg, city) []:qhd
Organization Name (eg, company) [Internet Widgits Pty Ltd]:com
Organizational Unit Name (eg, section) []:neuqsoft
Common Name (e.g. server FQDN or YOUR name) []:client
Email Address []:[email protected]

Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:

D:\appserver\tomcat-7.0.37\conf\ssl>openssl x509 -req -in client/client-req.csr
-out client/client-cert.cer -signkey client/client-key.pem -CA ca/root-cert.cer
-CAkey ca/root-key.pem -CAcreateserial -days 3650
Loading 'screen' into random state - done
Signature ok
subject=/C=CN/ST=heb/L=qhd/O=com/OU=neuqsoft/CN=client/[email protected]
oft.com
Getting Private key
Getting CA Private Key

D:\appserver\tomcat-7.0.37\conf\ssl>openssl pkcs12 -export -clcerts -in client/c
lient-cert.cer -inkey client/client-key.pem -out client/client.p12
Loading 'screen' into random state - done
Enter Export Password:
Verifying - Enter Export Password:

D:\appserver\tomcat-7.0.37\conf\ssl>keytool -import -v -trustcacerts -storepass
123456 -alias neuqclient -file client/client-cert.cer -keystore jks/client.jks
所有者:[email protected], CN=client, OU=neuqsoft, O=com, L=qhd, S
T=heb, C=CN
簽發人:[email protected], CN=neuqrootca, OU=neuqsoft, O=com,
L=qhd, ST=heb, C=CN
序列號:bbd911d011910726
有效期: Fri Apr 05 10:24:10 CST 2013 至Mon Apr 03 10:24:10 CST 2023
證書指紋:
         MD5:B4:72:08:85:0E:9D:FA:3A:81:62:20:6E:D1:3E:75:C2
         SHA1:88:E4:19:35:EA:8A:A1:08:40:02:4D:23:35:1B:58:5B:56:2C:1C:3B
         簽名演算法名稱:SHA1withRSA
         版本: 1
信任這個認證? [否]:  是
認證已新增至keystore中
[正在儲存 jks/client.jks]
3 Tomcat中的配置
3.1 將ca根證書和客戶端證書匯入keystore
命令:
keytool -import -v -trustcacerts -storepass 222222 -alias neuqrootca -file ca/root-cert.cer -

keystore jks/trust.keystore
keytool -import -v -trustcacerts -storepass 222222 -alias neuqclient -file client/client-cert.cer

-keystore jks/trust.keystore
說明:
這裡產生的jks為一個新的jks,也可以直接使用預設的jks,預設的jks位置位於啟動tomcat時使

用的JAVA_HOME下,位置為
%JAVA_HOME%/jre/lib/security/cacerts   預設密碼為changeit
雙向ssl認證時,需要在該信任庫中保護根證書及允許訪問的客戶端證書(無需包含伺服器端證

書)。

3.2 在客戶端瀏覽器中匯入根證書
注意應當匯入到受信任的根證書頒發機構中。
3.3 在客戶端瀏覽器中匯入根證書籤名的客戶端證書
3.4 修改context.xml中配置
1.一般情況下,沒有使用APR時,直接遮蔽掉APR聯結器。APR連線預設要求SSL連線
2.對於http聯結器(包括NIO連線),修改其中SSL配置,並取消SSL的註釋。此時為:JSSE方

式)
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
   clientAuth="true" sslProtocol="TLS"
   keystoreFile="conf/ssl/server/server.p12 " keystorePass="123456"

keystoreType="PKCS12"
   truststoreFile="conf/ssl/jks/trust.keystore " truststorePass="222222"

truststoreType="JKS"
   SSLCertificateFile="D:/appservertomcat-7.0.37/conf/ssl/server/server-cert.cer"
   SSLCertificateKeyFile="D:/appservertomcat-7.0.37/conf/ssl/server/server-key.pem" /> 
說明:在Linux中,可能會使用truststoreFile配置自定義的信任庫不能正常使用的情況。會提示

找不帶對應得keystore檔案(如這裡而定trust.jks)。此時預設位置在 ~/下。
4 Tomcat中SSL測試
4.1 單向SSL測試
此時,tomcat中ssl配置中的clientAuth="false"。這裡以使用的伺服器端證書為

server.neuqdomain為例。
在瀏覽器中輸入:  https://server.neuqdomain:8443/ 進行訪問
根據瀏覽器設定可能會直接接受伺服器端證書訪問,也可能會給出證書提示後正確訪問到。此

時瀏覽器不應該有報錯(前提是證書正確,配置無誤,且證書使用者名稱和伺服器機器名相同)
注意:如果證書中配置使用者名稱為server.neuqdomain,而在伺服器上使用https://localhost:8443/

進行訪問時,瀏覽器會提示“證書錯誤是否繼續”。出現此問題是應用,伺服器端認證必須為相

應的伺服器名進行訪問才能正確認證,並非配置錯誤。
4.2 雙向SSL測試
此時,tomcat中ssl配置中的clientAuth="true"。這裡以使用的伺服器端證書為

則不能訪問,如果匯入了客戶端則可以正確訪問。
4.3 客戶端證書使用者驗證
雙向SSL認證下,web應用可以通過客戶端證書獲取證書中的使用者名稱,直接用來進行使用者驗證


這裡以tomcat7及其自帶的manager應用為例。
這裡客戶端證書資訊為:
[email protected], CN=client, OU=neuqsoft, O=com, L=qhd, ST=heb,

C=CN
密碼為null時。
在%tomcat_home%/conf/tomcat-users.xml中,新增:
<user username="[email protected], CN=client, OU=neuqsoft, O=com,

L=qhd, ST=heb, C=CN" password="null" roles="manager-gui,standard,manager-script"/>
及相應的角色(tomcat7中應為manager-gui;tomcat5、6中為manager,admin)後。再到

manager應用中修改web.xml。
將其中的:
  <login-config>
    <auth-method>BASIC</auth-method>
    <realm-name>Tomcat Manager Application</realm-name>
  </login-config>
修改為:
  <login-config>
    <auth-method>CLIENT-CERT</auth-method>
    <realm-name>Tomcat Manager Application</realm-name>
  </login-config>
而後重啟tomcat,則在訪問: https://server.neuqdomain:8443/manager時可以直接訪問到而

無需輸入使用者名稱及密碼。此時tomcat實際是使用了客戶端證書的使用者名稱來進行相應的使用者驗證

及授權。
5 名詞解釋
5.1 SSL簡介
Secure Socket Layer,為Netscape所研發,用以保障在Internet上資料傳輸之安全,利用資料

加密(Encryption)技術,可確保資料在網路上之傳輸過程中不會被擷取及竊聽。
5.2 TLS
安全傳輸層協議(TLS)用於在兩個通訊應用程式之間提供保密性和資料完整性。該協議由兩

層組成: TLS 記錄協議(TLS Record)和 TLS 握手協議(TLS Handshake)。較低的層為

TLS 記錄協議,位於某個可靠的傳輸協議(例如 TCP)上面。
5.3 CSR
CSR是Cerificate Signing Request的英文縮寫,即證書請求檔案,也就是證書申請者在申請數

字證書時由CSP(加密服務提供者)在生成私鑰的同時也生成證書請求檔案,證書申請者只要把

CSR檔案提交給證書頒發機構後,證書頒發機構使用其根證書私鑰簽名就生成了證書公鑰檔案

,也就是頒發給使用者的證書。
通常CSR檔案是在拿到參考碼、授權碼進行證書籤發和下載時,通過網頁提交給CA的(也可以

由瀏覽器自動生成)。
5.4 CER
用於儲存公鑰證書的檔案格式。
數字證書採用公鑰體制,即利用一對互相匹配的金鑰進行加密、解密。每個使用者自己設定一把

特定的僅為本人所知的私有金鑰(私鑰),用它進行解密和簽名;同時設定一把公共金鑰(公

鑰)並由本人公開,為一組使用者所共享,用於加密和驗證簽名。當傳送一份保密檔案時,傳送

方使用接收方的公鑰對資料加密,而接收方則使用自己的私鑰解密,這樣資訊就可以安全無誤

地到達目的地了。通過數字的手段保證加密過程是一個不可逆過程,即只有用私有金鑰才能解

密.在公開金鑰密碼體制中,常用的一種是RSA體制。
5.5 PFX
公鑰加密技術12號標準(Public Key Cryptography Standards #12,PKCS#12)為儲存和傳輸

使用者或伺服器私鑰、公鑰和證書指定了一個可移植的格式。它是一種二進位制格式,這些檔案也

稱為PFX檔案。
5.6 PEM
增強型私人郵件(Privacy Enhanced Mail,PEM)格式現在更多地用作金鑰格式,並且可以包

含私鑰(RSA和DSA)、公鑰(RSA和DSA)和x509證書。它儲存ASCII頭部包裝 的Base64編碼

DER格式的資料,所以它適用於系統之間的文字模式傳輸
5.7 DER
分散式編碼規則(Distinguished Encoding Rules,DER)格式也可以包含私鑰、公鑰和證書。

它是大多數瀏覽器的預設格式,並且按照ASN1 DER格式進行儲存。它沒有頭部——PEM是文字

頭部包裝的DER
5.8 JKS
Java金鑰庫(Java Key Store), JKS檔案僅用於儲存伺服器證書、私鑰、公鑰和身份證書。

相關推薦

openssl簽名配置tomcat7雙向SSL

Windows 下OpenSSL 安裝詳解 +圖解 安裝環境:      1、作業系統:Windows XP SP2 2、C++編譯器:VC++ 6.0 下載: 下載ActivePerl  5.10.1.1007(最新的版本或較低的版本也可以): (當前的最新版

https證書 wamp2.5 配置雙向SSL證書

環境: windows732位系統IP:192.168.10.123 wampserver2.5 (Apache-2.4.9Mysql-5.6.17php5.5.12-32b) 目錄: D:\wamp

Tomcat配置https與http自動跳轉和tomcat雙向SSL配置及IE訪問HTTPS下載檔案失敗

Tomcat配置https與http自動跳轉 https介紹:    HTTPS(全稱:Hypertext Transfer Protocol over Secure Socket Layer),是以安全為目標 的HTTP通道,簡單講是HTTP的安全版。即HTTP下加入SS

SSL/TLS 雙向認證程式碼示例

採用SSL/TLS形式的安全連結,能防止資料傳輸過程中被截獲修改等問題。 SSL演算法簡短說明:     對稱加密演算法:DES 3DES AES 客戶端和服務端使用同一個金鑰對訊息進行加密解密。     非對稱加密演算法:RSA, 生成公鑰和私鑰,採用公鑰加密,私鑰解密

OpenSSL 生成自簽名證書(Self-signed SSL certificate)【轉】

環境: CentOS 6.8 x86_64 安裝 openssl openssl-devel cp /etc/pki/tls/openssl.cnf openssl.cnf 修改openssl.cnf [ req ] distinguis

Jetty7配置雙向SSL

參考Tomcat7配置雙向SSL配置客戶端pck12證書。(自簽名證書) 匯入trust key store: keytool -keystore truststore -keypass 123456 -storepass 123456 -alias ca -import

簡單基礎路徑配置用JSP)EASYUI

yui ces getitem col oca ase frame new request <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <%@page

java翻譯lua+c+openssl簽名項目

desc ckey logs {} form pan return lua 代碼 原來項目中用openresty nginx+lua實現server,lua調用c動態鏈接庫,來使用openss做簽名,並生成130字節(128簽名+2位自定義字節)長度的文件。 ngin

python基礎知識0-5(雙向隊列)

pos put div ext get() deque -s spa port #多項隊列import collections #導入模塊d = collections.deque() #deque方法d.append(‘1‘) #添加元素d.appendleft(‘2‘)

配置頁面

ima man backends src emp 技術 cfile 路徑 img 1.settings.py添加數據庫配置 ‘ENGINE‘ = ‘django.db.backends.mysql‘ 2.manage.py中使用makemigrations,migra

關於雙向晶閘管的控制電路

AD 關於 直接 font 電阻 技術分享 謝謝 資料 作用 先看一個原理圖 大家認為這個原理圖怎麽樣??一開始自己也是按照資料做的板子 當上面電壓高的時候,經過 D1 到 6 到 4 到360歐的電阻經過R2 開始供電了...... 當然後期右邊那個單向晶閘

交換機基礎配置交換機劃分vlan

進入 alt terminal show 兩臺 查看 enable exit 之間 我們以以上拓撲圖為例 pc0的IP地址為:192.168.1.1 pc1的ip地址為:192.168.1.2 兩臺主機在同一網段,相互ping是能ping通的 我們的目的是在單交換機上劃分

SpringCloud系列九:SpringCloudConfig 基礎配置(SpringCloudConfig 的基本概念、配置 SpringCloudConfig 服務端、抓取配置文件信息、客戶端使用 SpringCloudConfig 進行配置倉庫目錄匹配、應用倉庫自動選擇、倉庫匹配模式)

servers driver 這樣的 .com tco ces 上傳 [] 應用名 1、概念:SpringCloudConfig 基礎配置 2、具體內容 通過名詞就可以發現,SpringCloudConfig 核心作用一定就在於進行配置文件的管理上。也就是說為了更好的進行所

Jenkins郵箱配置中,使用SSL連線的問題

轉自:https://blog.csdn.net/jiang1986829/article/details/50955359/ 背景:最近在配置Jenkins的郵件傳送功能時,正確設定好各引數後,在進行通過傳送測試郵件測試配置時,總是出現unable to find valid certific

在CentOS 7 1804 中 安裝 Apache HTTP Server 並 配置 騰訊雲 SSL

相關連結: 在CentOS 7 1804 中 安裝 Apache HTTP Server 並 配置 阿里雲 SSL 在CentOS 1804 中的 Tomcat 9 設定 SSL( https ) 加密 (多域名加密,阿里雲 SSL+ 騰訊雲 SSL) 在CentOS 1804 中設定

centos6配置tomcat7為服務並開機啟動

1.安裝tomcat7,解壓即可 2.在/etc/profile檔案中追加tomcat的環境變數 export CATALINA_HOME=/software/apache-tomcat-7.0.55   使用source /etc/profile使配置生效 3.將tom

最全最規範的配置JDK生成的SSL證書

1 找見JDK安裝路徑C:\Program Files\Java\jdk1.8.0_91\bin 2在這個路徑下面開啟dos視窗 3輸入一下命令 keytool -genkey -alias tomcat -keyalg RSA -keystore F:\workspace\gitchexian\ver

Linux下配置TomCat7+JDK

Linux 配置JDK1.8 將jdk.tar 放在目錄下: 解壓: [root@iZwz9c6jlipu33po7lw2kgZ jdk1.8]# tar -zxvf jdk-8u181-linux-x64.tar.gz 進入解壓後的目錄:

maven配置tomcat7與jdk8環境

maven配置tomcat7與jdk8環境 <build> <plugins> <plugin> <artifactId>maven-war-plugin</artifactId> <config

hadoop生態搭建(3節點)-17.sqoop配置_節點

# ==================================================================安裝 sqoop tar -zxvf ~/sqoop-1.4.7.bin__hadoop-2.6.0.tar.gz mv ~/sqoop-1.4.7.bin__had