Sunday, February 18, 2007

SSL Cheatsheet

Make OpenSSL as a CA

* I am using openssl that is part of cygwin.

cd openssl
mkdir demoCA/private

Step 1: Generate a key for the CA certificate - this should have a larger keysize as it secures all other certificates

openssl genrsa -des3 -out ./demoCA/private/cakey.pem 2048

----------------------------
Generating RSA private key, 2048 bit long modulus
..+++
................+++
e is 65537 (0x10001)
Enter pass phrase for ./demoCA/private/cakey.pem:
2968:error:28069065:lib(40):UI_set_result:result too small:ui_lib.c:849:You must
type in 4 to 1023 characters
Enter pass phrase for ./demoCA/private/cakey.pem:
Verifying - Enter pass phrase for ./demoCA/private/cakey.pem:
-------------------------------

My pass phrase is "changeme". You can choose anything.



Tuesday, February 13, 2007

Wishing Marc Fluery All The Very Best

I would like to wish marcf all the very best in all his future endeavors. At a time when there were no good low-cost Application Servers available to try out J2EE, marcf and others created JBoss, a true open source JavaEE Application Server that was easy to download and use.

Sunday, December 03, 2006

Java Classloader Mystery

If you are writing system software, then you have to worry or deal with classloaders. Here is a nice blog entry on Classloaders from someone at Sun.
Understanding Java class loading

Now, for the second part of the article,
Understanding Classloading Part 2

If you are having scoped deployments in JBoss, follow this good post from Bill Burke
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4028665
Please do not ever use Class.forName() in any of your code, but instead use Thread.currentThread().getContextClassLoader().loadClass().

Reason? The reason is scoped classloaders. Class.forName() will use the calling class's classloader. So, if your code resides in a jbossesb.jar someplace, your code will use the ESB server's (JBoss) classloader, rather than the scoped one of your ESB deployment. For example, if your actions are deployed in a scoped .esb file, then it will not run.