<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Bits and Bytes</title>
	<atom:link href="http://pa55word.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://pa55word.wordpress.com</link>
	<description>This blog is to compile the technical programming how to do's into one place in web</description>
	<lastBuildDate>Wed, 21 Jan 2009 11:48:28 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='pa55word.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/5f580b89025f635fe56532dc7947e24b?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Bits and Bytes</title>
		<link>http://pa55word.wordpress.com</link>
	</image>
			<item>
		<title>How to get your java keystore/truststore from pem files</title>
		<link>http://pa55word.wordpress.com/2009/01/21/how-to-get-your-java-keystoretruststore-from-pem-files/</link>
		<comments>http://pa55word.wordpress.com/2009/01/21/how-to-get-your-java-keystoretruststore-from-pem-files/#comments</comments>
		<pubDate>Wed, 21 Jan 2009 11:44:59 +0000</pubDate>
		<dc:creator>sun</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[TLS]]></category>

		<guid isPermaLink="false">http://pa55word.wordpress.com/?p=12</guid>
		<description><![CDATA[Requirement : Create JKS keystore and truststore out of certificate and private key files given in pem format.
Try to open the certificate and key files and it contains ASCII text that starts with &#8212;&#8211;BEGIN CERTIFICATE&#8212;&#8211;, then it is in PEM format.
Using keytool in java, when a keystore is created it already has the private key [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pa55word.wordpress.com&blog=1492994&post=12&subd=pa55word&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Requirement : Create JKS keystore and truststore out of certificate and private key files given in pem format.</p>
<p>Try to open the certificate and key files and it contains ASCII text that starts with &#8212;&#8211;BEGIN CERTIFICATE&#8212;&#8211;, then it is in PEM format.</p>
<p>Using keytool in java, when a keystore is created it already has the private key in it. Keytool does not allow us to import a private key into a keystore. Thus we need to use OpenSSL for this but OpenSSL creates the keystore in pkcs12 format. So we use jetty to convert our pkcs12 into jks format.</p>
<p>OpenSSL for Windows is available from <a class="external free" title="http://www.slproweb.com/products/Win32OpenSSL.html" rel="nofollow" href="http://www.slproweb.com/products/Win32OpenSSL.html">http://www.slproweb.com/products/Win32OpenSSL.html</a>.</p>
<p>Keystore to be created : keystore.pkcs12, Certificate File : test.cert.pem, PrivateKey File : test.key.pem.<br />
<strong>openssl pkcs12 -export -out keystore.pkcs12 -in test.cert.pem -inkey test.key.pem</strong><br />
Enter the appropriate password. Now using jetty we can convert the pkcs12 keystore into jks keystore (keystore.jks).<br />
<strong>java -cp c:\jetty\lib\jetty-6.1.1.jar org.mortbay.jetty.security.PKCS12Import keystore.pkcs12 keystore.jks</strong></p>
<p>Now to create truststore file.<br />
<strong>keytool -import -alias test -file test.cert.pem -keystore truststore</strong></p>
<p>where truststore is the new TrustStore in jks format. You can import as many other certificates as you need to trust into the truststore. Give the password and type y when asked trust the certificate.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pa55word.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pa55word.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pa55word.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pa55word.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pa55word.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pa55word.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pa55word.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pa55word.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pa55word.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pa55word.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pa55word.wordpress.com&blog=1492994&post=12&subd=pa55word&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://pa55word.wordpress.com/2009/01/21/how-to-get-your-java-keystoretruststore-from-pem-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8dfd33724157102562bd013251affe66?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sunray</media:title>
		</media:content>
	</item>
		<item>
		<title>Need to free that port</title>
		<link>http://pa55word.wordpress.com/2008/01/23/need-to-free-that-port/</link>
		<comments>http://pa55word.wordpress.com/2008/01/23/need-to-free-that-port/#comments</comments>
		<pubDate>Wed, 23 Jan 2008 09:57:33 +0000</pubDate>
		<dc:creator>sun</dc:creator>
				<category><![CDATA[Windows Tips]]></category>
		<category><![CDATA[port]]></category>

		<guid isPermaLink="false">http://pa55word.wordpress.com/2008/01/23/need-to-free-that-port/</guid>
		<description><![CDATA[Started a java app and here comes jvm_bind issue. Use
netstat -a
in command prompt to discover the ports in use and the process ids. Then kill our process to free that port.
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pa55word.wordpress.com&blog=1492994&post=11&subd=pa55word&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Started a java app and here comes jvm_bind issue. Use</p>
<p>netstat -a</p>
<p>in command prompt to discover the ports in use and the process ids. Then kill our process to free that port.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/pa55word.wordpress.com/11/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/pa55word.wordpress.com/11/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pa55word.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pa55word.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pa55word.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pa55word.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pa55word.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pa55word.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pa55word.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pa55word.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pa55word.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pa55word.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pa55word.wordpress.com&blog=1492994&post=11&subd=pa55word&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://pa55word.wordpress.com/2008/01/23/need-to-free-that-port/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8dfd33724157102562bd013251affe66?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sunray</media:title>
		</media:content>
	</item>
		<item>
		<title>Cool Java Secure Socket Resources</title>
		<link>http://pa55word.wordpress.com/2007/11/23/cool-java-secure-socket-resources/</link>
		<comments>http://pa55word.wordpress.com/2007/11/23/cool-java-secure-socket-resources/#comments</comments>
		<pubDate>Fri, 23 Nov 2007 14:02:23 +0000</pubDate>
		<dc:creator>sun</dc:creator>
				<category><![CDATA[TLS]]></category>
		<category><![CDATA[resources]]></category>
		<category><![CDATA[secure]]></category>
		<category><![CDATA[socket]]></category>

		<guid isPermaLink="false">http://pa55word.wordpress.com/2007/11/23/cool-java-secure-socket-resources/</guid>
		<description><![CDATA[ http://java.sun.com/docs/books/tutorial/networking/sockets/index.html
http://www.ibm.com/developerworks/edu/j-dw-javajsse-i.html
You require a free ibm id for this above.
http://www.ddj.com/java/184404478?pgno=1 
I will be adding more later.
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pa55word.wordpress.com&blog=1492994&post=10&subd=pa55word&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p> <a HREF="http://java.sun.com/docs/books/tutorial/networking/sockets/index.html">http://java.sun.com/docs/books/tutorial/networking/sockets/index.html</a></p>
<p><a HREF="http://www.ibm.com/developerworks/edu/j-dw-javajsse-i.html">http://www.ibm.com/developerworks/edu/j-dw-javajsse-i.html</a></p>
<p>You require a free ibm id for this above.</p>
<p><a HREF="http://www.ddj.com/java/184404478?pgno=1">http://www.ddj.com/java/184404478?pgno=1 </a></p>
<p>I will be adding more later.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/pa55word.wordpress.com/10/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/pa55word.wordpress.com/10/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pa55word.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pa55word.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pa55word.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pa55word.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pa55word.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pa55word.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pa55word.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pa55word.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pa55word.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pa55word.wordpress.com/10/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pa55word.wordpress.com&blog=1492994&post=10&subd=pa55word&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://pa55word.wordpress.com/2007/11/23/cool-java-secure-socket-resources/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8dfd33724157102562bd013251affe66?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sunray</media:title>
		</media:content>
	</item>
		<item>
		<title>Secure Sockets in Java</title>
		<link>http://pa55word.wordpress.com/2007/11/23/secure-sockets-in-java/</link>
		<comments>http://pa55word.wordpress.com/2007/11/23/secure-sockets-in-java/#comments</comments>
		<pubDate>Fri, 23 Nov 2007 13:56:17 +0000</pubDate>
		<dc:creator>sun</dc:creator>
				<category><![CDATA[TLS]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://pa55word.wordpress.com/2007/11/23/secure-sockets-in-java/</guid>
		<description><![CDATA[ In plain words secure sockets using javax.net.ssl package.
We need secure socket to connect to an ip and port with security. Thus Secure Socket is like a door which we need to go inside apartment whose address is its ip and door number is the port. Now how to we open the door. We need keys.
Certificates are keys which is verified and signed by some authority(Certifying Authority [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pa55word.wordpress.com&blog=1492994&post=8&subd=pa55word&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p> In plain words secure sockets using javax.net.ssl package.</p>
<p>We need secure socket to connect to an ip and port with security. Thus Secure Socket is like a door which we need to go inside apartment whose address is its ip and door number is the port. Now how to we open the door. We need keys.</p>
<p>Certificates are keys which is verified and signed by some authority(Certifying Authority &#8211; CA) as good keys.</p>
<p>Now we have more than one key. So we use a keystore. Its like key-rings holding all your keys in one place. KeyStore Class can be used to represent a certificate in java. You upload your keystore made by java keytool into this object.</p>
<p>KeyManagerFactory class does the job of managing your key ring. Give that to your SSLContextClass and from that you can get the SSLSocketFactory. Using SSLSocketFactory we finally get our SSLSocket.</p>
<p>That much code in place the problem of how to trust others keys which they(servers) send to verify themselves while communicating comes up. We will put those keys in another keystore and call it our trust store. Again put the trust store in a KeyStore object and put it a TrustManagerFactory and give it to the context.</p>
<p>Of-course the question how to get keystore and truststore with certificates is still there. <a TITLE="Quick and easy certificates for TLS" HREF="http://pa55word.wordpress.com/2007/11/23/quick-and-easy-certificates-for-tls/">Click this link for that.</a></p>
<p>The folowing method creates a secure socket with client authentication.</p>
<blockquote><p>public SSLSocket createSecureSocket(String keyStore, String keyStorePwd, String trustStore,<br />
String trustStorePwd) throws IOException {<br />
// create 2 JKS keystores for keystore and truststore<br />
KeyStore clientKeyStore = null;<br />
KeyStore clientTrustStore = null;<br />
try {<br />
clientKeyStore = KeyStore.getInstance( &#8220;JKS&#8221;);<br />
clientTrustStore = KeyStore.getInstance( &#8220;JKS&#8221;) ;<br />
} catch (KeyStoreException e) {<br />
e.printStackTrace();<br />
}<br />
//convert keystore pwd into char array and load the client keystore made with keytool into<br />
//one keystore object.<br />
char[] keyStorePwdArray = keyStorePwd.toCharArray();<br />
try {<br />
clientKeyStore.load(new FileInputStream(keyStore), keyStorePwdArray);<br />
} catch (NoSuchAlgorithmException e1) {<br />
e1.printStackTrace();<br />
} catch (CertificateException e1) {<br />
e1.printStackTrace();<br />
}<br />
//convert truststore pwd into char array and load the client truststore made with keytool into<br />
//other keystore object.<br />
char[] trustStorePwdArray = trustStorePwd.toCharArray();<br />
try {<br />
clientTrustStore.load(new FileInputStream(trustStore), trustStorePwdArray);<br />
} catch (NoSuchAlgorithmException e1) {<br />
e1.printStackTrace();<br />
} catch (CertificateException e1) {<br />
e1.printStackTrace();<br />
}<br />
// create the key manager and trust manager factories.<br />
KeyManagerFactory kmf = null;<br />
TrustManagerFactory tmf = null;<br />
try {<br />
kmf = KeyManagerFactory.getInstance( &#8220;SunX509&#8243; );<br />
tmf = TrustManagerFactory.getInstance(&#8220;SunX509&#8243;);<br />
} catch (NoSuchAlgorithmException e) {<br />
e.printStackTrace();<br />
}<br />
//load client keystore and pwd to key manager factory.<br />
try {<br />
kmf.init(clientKeyStore, keyStorePwdArray);<br />
} catch (KeyStoreException e1) {<br />
e1.printStackTrace();<br />
} catch (NoSuchAlgorithmException e1) {<br />
e1.printStackTrace();<br />
} catch (UnrecoverableKeyException e1) {<br />
e1.printStackTrace();<br />
}<br />
// load client truststore into trust manager factory.<br />
try {<br />
tmf.init(clientTrustStore);<br />
} catch (KeyStoreException e) {<br />
e.printStackTrace();<br />
}<br />
// create sslcontext object and load both the facotries into it.<br />
SSLContext ctx=null;<br />
try {<br />
ctx = SSLContext.getInstance( &#8220;TLS&#8221; );<br />
} catch (NoSuchAlgorithmException e) {<br />
e.printStackTrace();<br />
}<br />
try {<br />
ctx.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);<br />
} catch (KeyManagementException e) {<br />
e.printStackTrace();<br />
}<br />
// Get our socket factory from context and then get the socket.<br />
SSLSocketFactory factory = ctx.getSocketFactory();<br />
SSLSocket socket = (SSLSocket)factory.createSocket();<br />
return socket;<br />
}<em><br />
</em><em><br />
</em></p>
</blockquote>
<p>Now we need to open a connection.<br />
socket.connect(new InetSocketAddress(&#8220;localhost&#8221;, 9999),10000000);<br />
or<br />
SSLSocketFactory sf = sslContext.getSocketFactory();<br />
Socket socket = sf.createSocket(host, port);</p>
<p>To create a server socket use the same method but use servers keystore and truststore.<br />
Get the context object ctx.<br />
SSLServerSocketFactory ssf = ctx.getServerSocketFactory();<br />
ServerSocket ss = ssf.createServerSocket( 6660 );</p>
<p>Note : If you are really bothered by the numerous try catch statements just put the code in one try block and write catch statements at the end. I write really good <br />
system.out.printlns in catch blocks during the first attempt just to know where I am going wrong. Later I combine them.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/pa55word.wordpress.com/8/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/pa55word.wordpress.com/8/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pa55word.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pa55word.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pa55word.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pa55word.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pa55word.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pa55word.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pa55word.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pa55word.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pa55word.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pa55word.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pa55word.wordpress.com&blog=1492994&post=8&subd=pa55word&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://pa55word.wordpress.com/2007/11/23/secure-sockets-in-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8dfd33724157102562bd013251affe66?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sunray</media:title>
		</media:content>
	</item>
		<item>
		<title>Quick and easy certificates for TLS</title>
		<link>http://pa55word.wordpress.com/2007/11/23/quick-and-easy-certificates-for-tls/</link>
		<comments>http://pa55word.wordpress.com/2007/11/23/quick-and-easy-certificates-for-tls/#comments</comments>
		<pubDate>Fri, 23 Nov 2007 13:50:57 +0000</pubDate>
		<dc:creator>sun</dc:creator>
				<category><![CDATA[TLS]]></category>
		<category><![CDATA[certificates]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[keystore]]></category>
		<category><![CDATA[keytool]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://pa55word.wordpress.com/2007/11/23/quick-and-easy-certificates-for-tls/</guid>
		<description><![CDATA[When urgently you need some keystores and truststores to test out some security related java code this is a useful bat file to have. Copy the code below and create a bat file. run it and you got your stuff.
keytool -genkey -alias serverkeys -keyalg RSA -keystore server.k
eystore -storepass 123456 -keypass 123456 -dname &#8220;CN=localhost, OU=MYOU, O=MYORG, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pa55word.wordpress.com&blog=1492994&post=9&subd=pa55word&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>When urgently you need some keystores and truststores to test out some security related java code this is a useful bat file to have. Copy the code below and create a bat file. run it and you got your stuff.</p>
<blockquote><p><em>keytool -genkey -alias serverkeys -keyalg RSA -keystore server.k<br />
eystore -storepass 123456 -keypass 123456 -dname &#8220;CN=localhost, OU=MYOU, O=MYORG, L=MYCITY, ST=M<br />
YSTATE, C=MY&#8221;</em></p>
<p><em><br />
keytool -export -alias serverkeys -keystore server.keystore -stor<br />
epass 123456 -file server.cer</em></p>
<p><em><br />
keytool -genkey -alias clientkeys  -keyalg RSA -keystore client.k<br />
eystore -storepass 123456 -keypass 123456 -dname &#8220;CN=localhost, OU=MYOU, O=MYORG, L=MYCITY, S=MY<br />
STATE, C=MY&#8221;</em></p>
<p><em><br />
keytool -export -alias clientkeys -keystore client.keystore -stor<br />
epass 123456 -file client.cer</em></p>
<p><em><br />
keytool -import -v -keystore client.truststore  -storepass 123456<br />
-file server.cer</em></p>
<p><em><br />
keytool -import -v -keystore server.truststore  -storepass 123456<br />
-file client.cer</em></p></blockquote>
<p>It generates a keystore called  server.keystore with password 123456. Then it creates server certificate server.cer.</p>
<p>Then it  generates a keystore called  client.keystore with password 123456. Creates a client certificate named client.cer</p>
<p>Next it imports server certificate into client truststore and client certificate into server truststore.</p>
<p>These are self signed certificates. Good for internal use. You can use open ssl<br />
and create certificates. But this bat file is short and sweet for immediate use.<br />
When you paste it you do have to be careful about keywords not getting split up like wordpress does.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/pa55word.wordpress.com/9/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/pa55word.wordpress.com/9/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pa55word.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pa55word.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pa55word.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pa55word.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pa55word.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pa55word.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pa55word.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pa55word.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pa55word.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pa55word.wordpress.com/9/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pa55word.wordpress.com&blog=1492994&post=9&subd=pa55word&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://pa55word.wordpress.com/2007/11/23/quick-and-easy-certificates-for-tls/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8dfd33724157102562bd013251affe66?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sunray</media:title>
		</media:content>
	</item>
		<item>
		<title>5 eclipse plugins for software quality</title>
		<link>http://pa55word.wordpress.com/2007/08/17/5-eclipse-plugins-for-software-quality/</link>
		<comments>http://pa55word.wordpress.com/2007/08/17/5-eclipse-plugins-for-software-quality/#comments</comments>
		<pubDate>Fri, 17 Aug 2007 13:04:07 +0000</pubDate>
		<dc:creator>sun</dc:creator>
				<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Quality]]></category>
		<category><![CDATA[code quality]]></category>
		<category><![CDATA[eclipse plugin]]></category>
		<category><![CDATA[software metrics]]></category>

		<guid isPermaLink="false">http://pa55word.wordpress.com/2007/08/17/5-eclipse-plugins-for-software-quality/</guid>
		<description><![CDATA[This is a video podcast by Paul Duvall and Levent Gurses, discussing Levent’s presentation at the Better Software Conference. JDepend4Eclipse, Checkstyle, Coverlipse, PMD, and Metrics eclipse plugins are discussed.
All  these plugins are for software metrics which will help in code quality.
Checkstyle is a plugin which I have used and found useful. We can
give a xml file based rule (coding std) to the plugin and while writing
code it will highlight the checkstyle errors. This avoided a lot of headaches
when compared to times the code went into the automated build process
and then all your checkstyle errors were highlighted before the world.
JDepend4Eclipse &#8211; traverses Java class file directories and generates design metrics for each [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pa55word.wordpress.com&blog=1492994&post=4&subd=pa55word&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This is a video podcast by Paul Duvall and Levent Gurses, discussing Levent’s presentation at the Better Software Conference. JDepend4Eclipse, Checkstyle, Coverlipse, PMD, and Metrics eclipse plugins are discussed.</p>
<p>All  these plugins are for software metrics which will help in code quality.</p>
<p><strong>Checkstyle</strong> is a plugin which I have used and found useful. We can<br />
give a xml file based rule (coding std) to the plugin and while writing<br />
code it will highlight the checkstyle errors. This avoided a lot of headaches<br />
when compared to times the code went into the automated build process<br />
and then all your checkstyle errors were highlighted before the world.</p>
<p><strong>JDepend4Eclipse</strong> &#8211; traverses Java class file directories and generates design metrics for each Java package.</p>
<p><strong>Coverlipse</strong> &#8211; djunit is another plugin which does the same job of showing your unit test coverage.</p>
<p><strong>PMD </strong> &#8211; Helps with code duplication.</p>
<p><strong>Metrics</strong> &#8211; Measures complexity.</p>
<p><a HREF="http://www.testearly.com/2007/06/11/vidcast-improving-code-quality-with-eclipse-and-its-plugins/">The video pod cast I was talking about before</a></p>
<p><a HREF="http://www-128.ibm.com/developerworks/java/library/j-ap01117/index.html">An article and tutorial about the five plugins by ibm developer works :- Automation for the people by Paul Duvall</a></p>
<p>To download the free plugins use the links below.</p>
<p><a HREF="http://pmd.sourceforge.net/eclipse/">http://pmd.sourceforge.net/eclipse/</a></p>
<p><a HREF="http://andrei.gmxhome.de/jdepend4eclipse/index.html">http://andrei.gmxhome.de/jdepend4eclipse/index.html </a></p>
<p><a HREF="http://coverlipse.sourceforge.net/index.php">http://coverlipse.sourceforge.net/index.php</a></p>
<p><a HREF="http://metrics.sourceforge.net/">http://metrics.sourceforge.net/</a></p>
<p><a HREF="http://eclipse-cs.sourceforge.net/">http://eclipse-cs.sourceforge.net/ </a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/pa55word.wordpress.com/4/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/pa55word.wordpress.com/4/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pa55word.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pa55word.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pa55word.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pa55word.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pa55word.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pa55word.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pa55word.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pa55word.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pa55word.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pa55word.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pa55word.wordpress.com&blog=1492994&post=4&subd=pa55word&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://pa55word.wordpress.com/2007/08/17/5-eclipse-plugins-for-software-quality/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8dfd33724157102562bd013251affe66?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sunray</media:title>
		</media:content>
	</item>
	</channel>
</rss>