锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲AV无码专区在线电影成人,久久亚洲国产成人亚,国产成人精品日本亚洲语音 http://m.tkk7.com/alwayscy/category/17978.html<br> 鏈夊叴瓚e彲浠ヨ闂笅鎴戠殑鐢熸椿鍗氬錛?lt;a >qqmovie.qzone.com</a>zh-cnTue, 13 Nov 2012 00:41:04 GMTTue, 13 Nov 2012 00:41:04 GMT60杞殑:鏋滅劧鏄?鍒嗛挓閰嶆垚TOMCAT浣跨敤SSL(https)http://m.tkk7.com/alwayscy/archive/2012/11/12/391235.html鎴戠埍浣?jīng)_▋鎴戠埍浣?jīng)_▋Mon, 12 Nov 2012 15:17:00 GMThttp://m.tkk7.com/alwayscy/archive/2012/11/12/391235.htmlhttp://m.tkk7.com/alwayscy/comments/391235.htmlhttp://m.tkk7.com/alwayscy/archive/2012/11/12/391235.html#Feedback0http://m.tkk7.com/alwayscy/comments/commentRss/391235.htmlhttp://m.tkk7.com/alwayscy/services/trackbacks/391235.htmlSetting Up SSL on Tomcat in 5 minutes (https://localhost:8443)
June 30, 2011 | By 

This tutorial will walk you through how to configure SSL (https://localhost:8443 access) on Tomcat in 5 minutes.

apache tomcat Setting Up SSL on Tomcat in 5 minutes (https://localhost:8443)

For this tutorial you will need:

  • Java SDK (used version 6 for this tutorial)
  • Tomcat (used version 7 for this tutorial)

The set up consists in 3 basic steps:

  1. Create a keystore file using Java
  2. Configure Tomcat to use the keystore
  3. Test it
  4. (Bonus ) Configure your app to work with SSL (access through https://localhost:8443/yourApp)

1 – Creating a Keystore file using Java

Fisrt, open the terminal on your computer and type:

Windows:

cd %JAVA_HOME%/bin 

Linux or Mac OS:

cd $JAVA_HOME/bin 

The $JAVA_HOME on Mac is located on “/System/Library/Frameworks/JavaVM.framework/Versions/{your java version}/Home/

You will change the current directory to the directory Java is installed on your computer. Inside the Java Home directory, cd to the bin folder. Inside the bin folder there is a file named keytool. This guy is responsible for generating the keystore file for us.

Next, type on the terminal:

keytool -genkey -alias tomcat -keyalg RSA 

When you type the command above, it will ask you some questions. First, it will ask you to create a password (My password is “password“):

loiane:bin loiane$ keytool -genkey -alias tomcat -keyalg RSA Enter keystore password:  password Re-enter new password: password What is your first and last name?   [Unknown]:  Loiane Groner What is the name of your organizational unit?   [Unknown]:  home What is the name of your organization?   [Unknown]:  home What is the name of your City or Locality?   [Unknown]:  Sao Paulo What is the name of your State or Province?   [Unknown]:  SP What is the two-letter country code for this unit?   [Unknown]:  BR Is CN=Loiane Groner, OU=home, O=home, L=Sao Paulo, ST=SP, C=BR correct?   [no]:  yes  Enter key password for 	(RETURN if same as keystore password):  password Re-enter new password: password 

It will create a .keystore file on your user home directory. On Windows, it will be on: C:\Documents and Settings\[username]; on Mac it will be on /Users/[username] and on Linux will be on /home/[username].

2 – Configuring Tomcat for using the keystore file – SSL config

Open your Tomcat installation directory and open the conf folder. Inside this folder, you will find the server.xml file. Open it.

Find the following declaration:

<!-- <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"     maxThreads="150" scheme="https" secure="true"     clientAuth="false" sslProtocol="TLS" /> --> 

Uncomment it and modify it to look like the following:

Connector SSLEnabled="true" acceptCount="100" clientAuth="false"     disableUploadTimeout="true" enableLookups="false" maxThreads="25"     port="8443" keystoreFile="/Users/loiane/.keystore" keystorePass="password"     protocol="org.apache.coyote.http11.Http11NioProtocol" scheme="https"     secure="true" sslProtocol="TLS" /> 

Note we add the keystoreFilekeystorePass and changed the protocol declarations.

3 – Let’s test it!

Start tomcat service and try to access https://localhost:8443. You will see Tomcat’s local home page.

Note if you try to access the default 8080 port it will be working too: http://localhost:8080

4 – BONUS - Configuring your app to work with SSL (access through https://localhost:8443/yourApp)

To force your web application to work with SSL, you simply need to add the following code to your web.xml file (before web-app tag ends):

<security-constraint> 	<web-resource-collection> 		<web-resource-name>securedapp</web-resource-name> 		<url-pattern>/*</url-pattern> 	</web-resource-collection> 	<user-data-constraint> 		<transport-guarantee>CONFIDENTIAL</transport-guarantee> 	</user-data-constraint> </security-constraint> 

The url pattern is set to /* so any page/resource from your application is secure (it can be only accessed with https). The transport-guarantee tag is set to CONFIDENTIAL to make sure your app will work on SSL.

If you want to turn off the SSL, you don’t need to delete the code above from web.xml, simply changeCONFIDENTIAL to NONE.

Referencehttp://tomcat.apache.org/tomcat-7.0-doc/ssl-howto.html (this tutorial is a little confusing, that is why I decided to write another one my own).

Happy Coding!



鎴戠埍浣?jīng)_▋ 2012-11-12 23:17 鍙戣〃璇勮
]]>
Perl涓嶫ava鐨凷SL閫氫俊紺轟緥http://m.tkk7.com/alwayscy/archive/2006/12/04/85368.html鎴戠埍浣?jīng)_▋鎴戠埍浣?jīng)_▋Mon, 04 Dec 2006 07:20:00 GMThttp://m.tkk7.com/alwayscy/archive/2006/12/04/85368.htmlhttp://m.tkk7.com/alwayscy/comments/85368.htmlhttp://m.tkk7.com/alwayscy/archive/2006/12/04/85368.html#Feedback2http://m.tkk7.com/alwayscy/comments/commentRss/85368.htmlhttp://m.tkk7.com/alwayscy/services/trackbacks/85368.html鐢∣penSSL涓嶫AVA(JSSE)閫氫俊涓鏂囦腑鎵鐢熸垚鐨凜A璇佷功鍙?qiáng)keystore灝卞彲浠ュ湪JAVA鍜孫penSSL涔嬮棿閫氫俊浜嗭紝涓嬮潰浠erl浠g爜涓轟緥錛氾紙Perl瀹為檯浣跨敤浜哋penSSL)

涓嬮潰鐨凜LIENT绔彲浠ヤ笌鍓嶆枃鎻愬埌鐨凧AVA鏈嶅姟绔氫俊錛?br />
#use聽strict;
use聽IO::Socket::SSL(debug4);

my聽($v_mode,$sock,$buf);

if($ARGV[0]聽eq聽"DEBUG")聽{聽$IO::Socket::SSL::DEBUG聽=1;聽}

#聽Check聽to聽make聽sure聽that聽we聽were聽not聽accidentally聽run聽in聽the聽wrong
#聽directory:

unless聽(-d聽"certs")聽{
聽聽聽聽
if聽(-d聽"../certs")聽{
聽聽聽聽
chdir"..";
聽聽聽聽}聽
else聽{
#聽聽聽聽die聽"Please聽run聽this聽example聽from聽the聽IO::Socket::SSL聽distribution聽directory!\n";
聽聽聽聽}
}

if(!($sock=聽IO::Socket::SSL->new(聽PeerAddr聽=>'172.19.149.52',
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽PeerPort聽
=>'5555',
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽Proto聽聽聽聽
=>'tcp',
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽SSL_verify_mode聽
=>0x01,
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽SSL_ca_file聽
=>'mycerts/cacert.pem',
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽)))聽{
聽聽聽聽
warn"unable聽to聽create聽socket:聽",&IO::Socket::SSL::errstr,"\n";
聽聽聽聽
exit(0);
}聽
else聽{
聽聽聽聽
warn"connect聽($sock).\n"if聽($IO::Socket::SSL::DEBUG);
}

#聽check聽server聽cert.
my聽($subject_name,$issuer_name,$cipher);
if(聽ref($sock)聽eq聽"IO::Socket::SSL")聽{
聽聽聽聽
$subject_name=$sock->peer_certificate("subject");
聽聽聽聽
$issuer_name=$sock->peer_certificate("issuer");
聽聽聽聽
$cipher=$sock->get_cipher();
}
warn"cipher:聽$cipher.\n","server聽cert:\n",
聽聽聽聽
"\t聽'$subject_name'聽\n\t聽'$issuer_name'.\n\n";

print$sock"Knock,聽knock.\n";

my聽($buf)聽=$sock->getlines;

$sock->close();

print"read:聽'$buf'.\n";


鍙﹀錛屼篃緇欏嚭涓涓狿ERL鐨凷VR绔ず渚嬶細(xì)
#use聽strict;
use聽IO::Socket::SSL(debug4);


my聽($sock,$s,$v_mode);

if($ARGV[0]聽eq聽"DEBUG")聽{聽$IO::Socket::SSL::DEBUG聽=1;聽}

#聽Check聽to聽make聽sure聽that聽we聽were聽not聽accidentally聽run聽in聽the聽wrong
#聽directory:

unless聽(-d聽"certs")聽{
聽聽聽聽
if聽(-d聽"../certs")聽{
聽聽聽聽
chdir"..";
聽聽聽聽}聽
else聽{
#聽聽聽聽die聽"Please聽run聽this聽example聽from聽the聽IO::Socket::SSL聽distribution聽directory!\n";
聽聽聽聽}
}

if(!($sock=聽IO::Socket::SSL->new(聽Listen=>5,
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽LocalAddr聽
=>'10.56.28.35',
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽LocalPort聽
=>9000,
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽Proto聽聽聽聽聽
=>'tcp',
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽Reuse聽聽聽聽聽
=>1,
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽SSL_use_cert聽
=>1,
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽SSL_verify_mode聽
=>0x00,
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽SSL_cert_file聽
=>'mycerts/cert.pem',
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽SSL_key_file聽
=>'mycerts/key.pem'聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽))聽)聽{
聽聽聽聽
warn"unable聽to聽create聽socket:聽",&IO::Socket::SSL::errstr,"\n";
聽聽聽聽
exit(0);
}
warn"socket聽created:聽$sock.\n";

while聽(1)聽{
聽聽
warn"waiting聽for聽next聽connection.\n";
聽聽
聽聽
while(($s=$sock->accept()))聽{
聽聽聽聽聽聽
my聽($peer_cert,$subject_name,$issuer_name,$date,$str);
聽聽聽聽聽聽
聽聽聽聽聽聽
if(聽!$s聽)聽{
聽聽聽聽聽聽
warn"error:聽",$sock->errstr,"\n";
聽聽聽聽聽聽
next;
聽聽聽聽聽聽}
聽聽聽聽聽聽
聽聽聽聽聽聽
warn"connection聽opened聽($s).\n";
聽聽聽聽聽聽
聽聽聽聽聽聽
if(聽ref($sock)聽eq聽"IO::Socket::SSL")聽{
聽聽聽聽聽聽
$subject_name=$s->peer_certificate("subject");
聽聽聽聽聽聽
$issuer_name=$s->peer_certificate("issuer");
聽聽聽聽聽聽}
聽聽聽聽聽聽
聽聽聽聽聽聽
warn"\t聽subject:聽'$subject_name'.\n";
聽聽聽聽聽聽
warn"\t聽issuer:聽'$issuer_name'.\n";
聽聽
聽聽聽聽聽聽
my$date=localtime();
聽聽聽聽聽聽
print$s"my聽date聽command聽says聽it's:聽'$date'";
聽聽聽聽聽聽
close($s);
聽聽聽聽聽聽
warn"\t聽connection聽closed.\n";
聽聽}
}


$sock->close();

warn"loop聽exited.\n";


鍦≒ERL涓啓SSL鐨凷OCKET錛岃娉ㄦ剰錛?br />SVR绔腑錛?br />聽聽聽聽聽聽 SSL_use_cert => 1,
聽聽聽聽聽聽 SSL_verify_mode => 0x00,
聽聽聽聽聽聽 SSL_cert_file => 'mycerts/cert.pem',
聽聽聽聽聽聽 SSL_key_file => 'mycerts/key.pem'
CLI绔槸錛?br />聽聽聽聽聽聽 SSL_verify_mode => 0x01,
聽聽聽聽聽聽 SSL_ca_file => 'mycerts/cacert.pem',
mode鏄?琛ㄧず錛屼笉璁よ瘉瀵圭錛屾槸1琛ㄧず瑕佽璇佸鏂廣?img src ="http://m.tkk7.com/alwayscy/aggbug/85368.html" width = "1" height = "1" />

鎴戠埍浣?jīng)_▋ 2006-12-04 15:20 鍙戣〃璇勮
]]>
鐢∣penSSL涓嶫AVA(JSSE)閫氫俊http://m.tkk7.com/alwayscy/archive/2006/12/03/85161.html鎴戠埍浣?jīng)_▋鎴戠埍浣?jīng)_▋Sun, 03 Dec 2006 04:36:00 GMThttp://m.tkk7.com/alwayscy/archive/2006/12/03/85161.htmlhttp://m.tkk7.com/alwayscy/comments/85161.htmlhttp://m.tkk7.com/alwayscy/archive/2006/12/03/85161.html#Feedback7http://m.tkk7.com/alwayscy/comments/commentRss/85161.htmlhttp://m.tkk7.com/alwayscy/services/trackbacks/85161.html闃呰鍏ㄦ枃

鎴戠埍浣?jīng)_▋ 2006-12-03 12:36 鍙戣〃璇勮
]]>
鐢∣penSSL鍋氳嚜絳懼悕鐨勮瘉涔?/title><link>http://m.tkk7.com/alwayscy/archive/2006/12/01/84852.html</link><dc:creator>鎴戠埍浣?jīng)_▋</dc:creator><author>鎴戠埍浣?jīng)_▋</author><pubDate>Fri, 01 Dec 2006 07:20:00 GMT</pubDate><guid>http://m.tkk7.com/alwayscy/archive/2006/12/01/84852.html</guid><wfw:comment>http://m.tkk7.com/alwayscy/comments/84852.html</wfw:comment><comments>http://m.tkk7.com/alwayscy/archive/2006/12/01/84852.html#Feedback</comments><slash:comments>13</slash:comments><wfw:commentRss>http://m.tkk7.com/alwayscy/comments/commentRss/84852.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/alwayscy/services/trackbacks/84852.html</trackback:ping><description><![CDATA[榪欓噷鎶勫綍<a class="postTitle2" id="viewpost1_TitleUrl" href="/alwayscy/archive/2006/11/28/83737.html"><font color="#1a8bc8">LDAP+OpenSSL闆嗕腑璁よ瘉閰嶇疆</font></a>涓鏂囩殑涓閮ㄥ垎錛?br /> 鍏閽ワ細(xì)鍏挜鍙互鍞竴瑙e瘑縐侀挜鍔犲瘑榪囩殑鏁版嵁錛屽弽涔嬩害鐒躲備互涓嬬敤P鎸囦唬鍏挜錛孷鎸囦唬縐侀挜銆?br /> SSL榪囩▼錛氶渶瑕佷袱瀵瑰叕縐侀挜(P1,V1),(P2,V2)錛屽亣璁鵑氫俊鍙屾柟鏄疉鍜孊錛孊鏄湇鍔″櫒錛孉瑕佺‘璁ゅ拰瀹冮氫俊鐨勬槸B錛?br /> A->B: hello<br /> B->A: 鐢╒2鍔犲瘑榪囩殑P1錛堝嵆鐢ㄦ埛璇佷功錛孉灝辯敤P2瑙e瘑鍑篜1錛?br /> A->B: ok<br /> B->A: 鐢╒1鍔犲瘑鐨勪竴孌典俊鎭?br /> A->B: 鐢≒1鍔犲瘑涓涓嚜鍔ㄧ敓鎴愮殑K錛堢敤涔嬪墠鐨凱1瑙e瘑鎴愬姛榪欐淇℃伅鍒欒涓築鏄彲淇$殑浜嗭級(jí)<br /> B->A: 鐢↘鍔犲瘑鐨勬暟鎹紙涔嬪悗涓ゅ瀵嗛挜鍔熻兘緇撴潫錛岀敱K鏉ュ姞瑙e瘑鏁版嵁錛?br /> 榪欓噷錛孭2灝辨槸絎?鏂圭殑CA璇佷功錛岀敱浜庨潪瀵圭О鍔犲瘑寰堟參錛屾墍浠ュ叕縐侀挜鍙槸鐢ㄦ潵淇濊瘉K鐨勪紶閫佸畨鍏紝涔嬪悗閫氫俊鏄敤K鐨勫縐板姞瀵嗙畻娉曟潵淇濊瘉銆?br /> <br /> 涓轟粈涔堥氳繃浠ヤ笂榪囩▼A灝辮兘澶熺‘瀹氳偗瀹氭槸B錛岃屼笉鏄煇涓狢鍦ㄥ亣瑁匓浜嗗憿錛熷洜涓鴻繖涓繃紼嬩腑錛孊鐢╒1鍔犲瘑榪囦竴孌典俊鎭彂緇橝錛孉涔熸垚鍔熻В寮浜嗐傛垜浠紑澶磋皥鍒板叕閽ワ紙P1錛夊彧鍙互鍞竴瑙e瘑縐侀挜錛圴1錛夊姞瀵嗚繃鐨勪俊鎭紝榪欐牱A灝卞彲浠ュ畬鍏ㄧ浉淇鏄嫢鏈塚1鐨勶紝鑰孷1鏄弗鏍間繚瀵嗭紝鍙鏈嶅姟鎻愪緵鍏徃鎷ユ湁錛屾墍浠ヤ繚璇佷簡閫氫俊鐨勬湇鍔℃柟姝g‘鎬с?br /> <br /> 榪欓噷(P2,V2)灝辨槸certificate authority (CA)鐢ㄦ潵緇欏鎴風(fēng)鍚嶇敤鐨勫叕縐侀挜銆?br /> (P1,V1)鏄鎴瘋嚜宸辯殑鍏閽ワ紝鎻愪氦緇機(jī)A錛孋A鎵鍋氱殑浜嬫儏灝辨槸鐢?P2,V2)鏉ョ粰瀹㈡埛鐨?P1,V1)絳懼悕錛岀畝鍗曞惂錛?br /> V2鏄疌A鍏徃瑕佷繚瀵嗙殑錛岃孭2灝辨槸鍏敤CA璇佷功銆傜敤V2鍔犲瘑榪囷紙絳懼悕榪囷級(jí)鐨凱1錛岀О涓虹敤鎴瘋瘉涔︼紝涓鑸瀹夎鍦ㄦ湇鍔″櫒绔?br /> <br /> 涓嬮潰鎴戜滑OpenSSL鏉ュ仛榪欎竴鏁翠歡浜嬫儏銆?br /> <br /> <strong>鍏堢敓鎴怌A鐨勫叕縐侀挜(Root Certificate )<br /> </strong>鍑嗗宸ヤ綔<br /> <div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; font-size: 13px; width: 98%; background-color: #eeeeee;"><img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" /><span style="color: #000000;">mkdir CA <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />cd CA <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />mkdir newcerts private <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />echo '</span><span style="color: #000000;">01</span><span style="color: #000000;">' > serial <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />touch index.txt </span></div> <br /> 鐢熸垚閰嶇疆鏂囦歡銆傜敱浜巓penssl鍛戒護(hù)琛屽弬鏁板お澶氾紝鎵浠ュ氨鐢ㄦ枃浠舵潵緇勭粐鍚勭閫夐」銆?br /> 鍏朵腑,req_distinguished_name 鑺傝〃紺洪渶瑕佹彁紺虹敤鎴瘋緭鍏ョ殑淇℃伅銆?br /> v3_ca鏄湁鍏矯A鍏閽ョ敓鎴愮殑錛寁3_req鏄湁鍏崇敤鎴瘋瘉涔︾敓鎴愮殑銆?br /> ca_default鏄敤CA鍏閽ョ鍚嶇殑鏃跺欙紝鐢ㄦ埛璇佷功鐨勯粯璁や俊鎭?br /> <br /> vi ./openssl.cnf<br /> <div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; font-size: 13px; width: 98%; background-color: #eeeeee;"><img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" /><span style="color: #000000;">dir </span><span style="color: #000000;">=</span><span style="color: #000000;"> .<br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" /><br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="font-weight: bold; color: #800000;">[</span><span style="color: #800000;"> req </span><span style="font-weight: bold; color: #800000;">]</span><span style="color: #000000;"> <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />default_bits </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #000000;">1024</span><span style="color: #000000;"> # Size of keys <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />default_keyfile </span><span style="color: #000000;">=</span><span style="color: #000000;"> key.pem # name of generated keys <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />default_md </span><span style="color: #000000;">=</span><span style="color: #000000;"> md5 # message digest algorithm <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />string_mask </span><span style="color: #000000;">=</span><span style="color: #000000;"> nombstr # permitted characters <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />distinguished_name </span><span style="color: #000000;">=</span><span style="color: #000000;"> req_distinguished_name <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />req_extensions </span><span style="color: #000000;">=</span><span style="color: #000000;"> v3_req <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" /><br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="font-weight: bold; color: #800000;">[</span><span style="color: #800000;"> req_distinguished_name </span><span style="font-weight: bold; color: #800000;">]</span><span style="color: #000000;"> <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" /># Variable name   Prompt string <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />#----------------------   ---------------------------------- <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #000000;">0</span><span style="color: #000000;">.organizationName </span><span style="color: #000000;">=</span><span style="color: #000000;"> Organization Name (company) <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />organizationalUnitName </span><span style="color: #000000;">=</span><span style="color: #000000;"> Organizational Unit Name (department</span><span style="color: #000000;">,</span><span style="color: #000000;"> division) <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />emailAddress </span><span style="color: #000000;">=</span><span style="color: #000000;"> Email Address <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />emailAddress_max </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #000000;">40</span><span style="color: #000000;"> <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />localityName </span><span style="color: #000000;">=</span><span style="color: #000000;"> Locality Name (city</span><span style="color: #000000;">,</span><span style="color: #000000;"> district) <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />stateOrProvinceName </span><span style="color: #000000;">=</span><span style="color: #000000;"> State or Province Name (full name) <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />countryName </span><span style="color: #000000;">=</span><span style="color: #000000;"> Country Name (</span><span style="color: #000000;">2</span><span style="color: #000000;"> letter code) <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />countryName_min </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #000000;">2</span><span style="color: #000000;"> <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />countryName_max </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #000000;">2</span><span style="color: #000000;"> <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />commonName </span><span style="color: #000000;">=</span><span style="color: #000000;"> Common Name (hostname</span><span style="color: #000000;">,</span><span style="color: #000000;"> IP</span><span style="color: #000000;">,</span><span style="color: #000000;"> or your name) <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />commonName_max </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #000000;">64</span><span style="color: #000000;"> <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" /><br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" /># Default values for the above</span><span style="color: #000000;">,</span><span style="color: #000000;"> for consistency and less typing. <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" /># Variable name   Value <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />#------------------------------   ------------------------------ <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="color: #000000;">0</span><span style="color: #000000;">.organizationName_default </span><span style="color: #000000;">=</span><span style="color: #000000;"> EB Company <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />localityName_default </span><span style="color: #000000;">=</span><span style="color: #000000;"> Shen Zhen <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />stateOrProvinceName_default </span><span style="color: #000000;">=</span><span style="color: #000000;"> Guan Dong<br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />countryName_default </span><span style="color: #000000;">=</span><span style="color: #000000;"> CN<br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" /><br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="font-weight: bold; color: #800000;">[</span><span style="color: #800000;"> v3_ca </span><span style="font-weight: bold; color: #800000;">]</span><span style="color: #000000;"> <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />basicConstraints </span><span style="color: #000000;">=</span><span style="color: #000000;"> CA:TRUE <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />subjectKeyIdentifier </span><span style="color: #000000;">=</span><span style="color: #000000;"> hash <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />authorityKeyIdentifier </span><span style="color: #000000;">=</span><span style="color: #000000;"> keyid:always</span><span style="color: #000000;">,</span><span style="color: #000000;">issuer:always <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" /><br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="font-weight: bold; color: #800000;">[</span><span style="color: #800000;"> v3_req </span><span style="font-weight: bold; color: #800000;">]</span><span style="color: #000000;"> <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />basicConstraints </span><span style="color: #000000;">=</span><span style="color: #000000;"> CA:FALSE <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />subjectKeyIdentifier </span><span style="color: #000000;">=</span><span style="color: #000000;"> hash <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" /><br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" /><br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="font-weight: bold; color: #800000;">[</span><span style="color: #800000;"> ca </span><span style="font-weight: bold; color: #800000;">]</span><span style="color: #000000;"> <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />default_ca </span><span style="color: #000000;">=</span><span style="color: #000000;"> CA_default <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" /><br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="font-weight: bold; color: #800000;">[</span><span style="color: #800000;"> CA_default </span><span style="font-weight: bold; color: #800000;">]</span><span style="color: #000000;"> <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />serial </span><span style="color: #000000;">=</span><span style="color: #000000;"> $dir/serial <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />database </span><span style="color: #000000;">=</span><span style="color: #000000;"> $dir/index.txt <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />new_certs_dir </span><span style="color: #000000;">=</span><span style="color: #000000;"> $dir/newcerts <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />certificate </span><span style="color: #000000;">=</span><span style="color: #000000;"> $dir/cacert.pem <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />private_key </span><span style="color: #000000;">=</span><span style="color: #000000;"> $dir/private/cakey.pem <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />default_days </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #000000;">365</span><span style="color: #000000;"> <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />default_md </span><span style="color: #000000;">=</span><span style="color: #000000;"> md5 <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />preserve </span><span style="color: #000000;">=</span><span style="color: #000000;"> no <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />email_in_dn </span><span style="color: #000000;">=</span><span style="color: #000000;"> no <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />nameopt </span><span style="color: #000000;">=</span><span style="color: #000000;"> default_ca <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />certopt </span><span style="color: #000000;">=</span><span style="color: #000000;"> default_ca <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />policy </span><span style="color: #000000;">=</span><span style="color: #000000;"> policy_match <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" /><br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" /></span><span style="font-weight: bold; color: #800000;">[</span><span style="color: #800000;"> policy_match </span><span style="font-weight: bold; color: #800000;">]</span><span style="color: #000000;"> <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />countryName </span><span style="color: #000000;">=</span><span style="color: #000000;"> match <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />stateOrProvinceName </span><span style="color: #000000;">=</span><span style="color: #000000;"> match <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />organizationName </span><span style="color: #000000;">=</span><span style="color: #000000;"> match <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />organizationalUnitName </span><span style="color: #000000;">=</span><span style="color: #000000;"> optional <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />commonName </span><span style="color: #000000;">=</span><span style="color: #000000;"> supplied <br /> <img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" />emailAddress </span><span style="color: #000000;">=</span><span style="color: #000000;"> optional </span></div> <br /> <br /> 鐢熸垚CA鍏閽ワ細(xì)<br /> <div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; font-size: 13px; width: 98%; background-color: #eeeeee;"><img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" alt="" align="top" /><span style="color: #000000;">openssl req -new -x509 -extensions v3_ca -keyout private/cakey.pem -out cacert.pem -days </span><span style="color: #000000;">3650</span><span style="color: #000000;"> -config ./openssl.cnf </span></div> <br /> 浼?xì)鎻惤C鴻緭鍏ュ瘑鐮侊紝褰撶敤瀹冪粰鐢ㄦ埛璇佷功絳懼悕鏃墮渶瑕佽緭鍏ワ紝浠ラ伩鍏嶅叾瀹冧漢鐢ㄥ畠闅忔剰浜х敓鐢ㄦ埛璇佷功銆?br /> -days琛ㄧず鏈夋晥鏈燂紝鍥犱負(fù)瀹冩槸鏍硅瘉涔︼紝鎵浠ユ椂闂翠竴瀹氳寰堥暱錛屽惁鍒欑敱瀹冪敓鎴愮殑鐢ㄦ埛璇佷功瀹規(guī)槗榪囨湡銆?br /> <br /> 榪欐椂灝辯敓鎴愪簡錛?br /> P1<br /> <font face="Courier New">cacert.pem</font><br /> V1<br /> <font face="Courier New">private/cakey.pem<br /> <br /> 鏌ョ湅淇℃伅鐢細(xì)<br /> openssl x509 -in cacert.pem -noout -text<br /> <br /> <br /> <strong>鐢熸垚P2,V2錛屽嵆</strong><font face="Times New Roman"><strong>Certificate Signing Request (CSR) <br /> </strong>鎵ц錛?br /> openssl req -new -nodes -out req.pem -config ./openssl.cnf <br /> 榪欐牱灝辯敓鎴愪簡錛?br /> P2<br /> req.pem<br /> V2<br /> key.pem<br /> <br /> 鐢ㄦ鍛戒護(hù)鏌ョ湅錛?br /> openssl req -in req.pem -text -verify -noout <br /> <br /> <br /> <strong>鐢–A鐨勭閽1涓篜2絳懼悕錛屽嵆鐢熸垚鐢ㄦ埛璇佷功</strong><br /> 鎵ц錛?br /> openssl ca -out cert.pem -config ./openssl.cnf -infiles req.pem <br /> 鐢熸垚鐢ㄦ埛璇佷功錛?br /> <font face="Courier New">cert.pem</font><br /> 姝ゆ椂錛屼細(xì)鎷瘋礉涓浠藉埌newcerts鐩綍涓嬨傚茍浼?xì)鏇存柊鏁版嵁搴撴枃錃g錛歩ndex.txt浠ュ強(qiáng)serail鏂囦歡<br /> 鐢ㄥ懡浠ゆ煡鐪嬶細(xì)<br /> openssl x509 -in cert.pem -noout -text -purpose | more <br /> <br /> 濡傛灉瑕佸幓闄ゅ彲璇諱俊鎭儴鍒嗭紝鎵ц錛?br /> mv cert.pem tmp.pem <br /> openssl x509 -in tmp.pem -out cert.pem <br /> <br /> <br /> <strong>瀹夎璇佷功<br /> </strong>key.pem(V2)鍜宑ert.pem(鐢╒1鍔犲瘑榪囩殑P2錛夊畨瑁呭埌鏈嶅姟绔?br /> 鏈夌殑鏈嶅姟鍣ㄩ渶瑕佹妸榪欎袱涓枃浠惰繛涓轟竴涓紝鍙互鎵ц錛?br /> cat key.pem cert.pem >key-cert.pem <br /> <br /> cacert.pem瀹夎鍒板鎴風(fēng)<br /> <br /> Apache鐨勯厤緗細(xì)<br /> File          Comment <br /> /home/httpd/html Apache DocumentRoot <br /> /home/httpd/ssl      SSL-related files <br /> /home/httpd/ssl/cert.pem Site certificate <br /> /home/httpd/ssl/key.pem Site private key <br /> <br /> Stunnel鐨勯厤緗?br /> stunnel -p /etc/ssl/certs/key-cert.pem  <br /> <br /> <br /> 緙栬緫浜?8.4.26錛屽彟鏈変袱涓緥瀛愶細(xì)<br /> <a class="entrylistItemTitle" id="CategoryEntryList1_EntryStoryList_Entries_ctl02_TitleUrl" href="http://m.tkk7.com/alwayscy/archive/2006/12/03/85161.html">鐢∣penSSL涓嶫AVA(JSSE)閫氫俊</a> <br /> <a class="entrylistItemTitle" id="CategoryEntryList1_EntryStoryList_Entries_ctl00_TitleUrl" href="http://m.tkk7.com/alwayscy/archive/2006/12/04/85368.html">Perl涓嶫ava鐨凷SL閫氫俊紺轟緥</a> <br /> </font></font> <img src ="http://m.tkk7.com/alwayscy/aggbug/84852.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/alwayscy/" target="_blank">鎴戠埍浣?jīng)_▋</a> 2006-12-01 15:20 <a href="http://m.tkk7.com/alwayscy/archive/2006/12/01/84852.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鍦╳indows涓嬬紪璇憃pensslhttp://m.tkk7.com/alwayscy/archive/2006/11/26/83575.html鎴戠埍浣?jīng)_▋鎴戠埍浣?jīng)_▋Sun, 26 Nov 2006 03:32:00 GMThttp://m.tkk7.com/alwayscy/archive/2006/11/26/83575.htmlhttp://m.tkk7.com/alwayscy/comments/83575.htmlhttp://m.tkk7.com/alwayscy/archive/2006/11/26/83575.html#Feedback0http://m.tkk7.com/alwayscy/comments/commentRss/83575.htmlhttp://m.tkk7.com/alwayscy/services/trackbacks/83575.html緙栬瘧鐜錛?br />VS2005 Express Edition
SDK WIN SVR 2003 SP1
MASM 8.0

榪涘叆鎵撳紑sdk鐨?000緙栬瘧鍛戒護(hù)琛岋紝鍐嶈繍琛岋細(xì)
%comspec% /k ""C:\Program Files\Microsoft Visual Studio 8\VC\vcvarsall.bat"" x86

鍘誨埌瑙e帇鐩綍錛?br />cd /d "E:\Prj2\ForMe\RefExe\perl+ssl\openssl-0.9.8d"

鍐嶇紪璇戯細(xì)
perl Configure VC-WIN32 --prefix=dist
ms\do_ms
nmake -f ms\ntdll.mak
nmake -f ms\ntdll.mak test
nmake -f ms\ntdll.mak install

瀹屾垚鍚庯紝dist鐩綍灝辨槸瀹夎濂界殑涓滆タ錛屽彲浠ユ嫹璐濆埌鍒浣跨敤



鎴戠埍浣?jīng)_▋ 2006-11-26 11:32 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 亚洲AV日韩AV永久无码下载| 无码人妻精品中文字幕免费 | 国产人成网在线播放VA免费| 特级做A爰片毛片免费69| 无码天堂va亚洲va在线va| selaoban在线视频免费精品| 免费人妻无码不卡中文字幕系| 亚洲午夜久久久久久久久久| 亚洲成a人不卡在线观看| 一区二区免费视频| 亚洲视频网站在线观看| 亚洲1区1区3区4区产品乱码芒果| 亚洲免费视频观看| 亚洲性一级理论片在线观看| 香蕉97超级碰碰碰免费公| 亚洲一区电影在线观看| 在线精品免费视频无码的| 亚洲国产欧洲综合997久久| 国产一级淫片a免费播放口之 | 国产一区二区免费| 国产精品视频免费一区二区三区| 亚洲AV一宅男色影视| 亚洲日韩在线中文字幕综合| 国产免费怕怕免费视频观看| 农村寡妇一级毛片免费看视频| 日本免费xxxx色视频| 亚洲综合av一区二区三区| 99热精品在线免费观看| 亚洲国产亚洲综合在线尤物| 免费观看男人吊女人视频| 亚洲欧洲日本国产| 国产精品免费视频播放器| 一级毛片高清免费播放| 国产免费观看黄AV片| 国产精品偷伦视频免费观看了| 亚洲日本精品一区二区| 免费精品久久天干天干| 亚洲免费视频播放| 免费人妻无码不卡中文字幕18禁| 国产亚洲免费的视频看| 亚洲精品无码久久久久久|