generate certicate and keypair

used bouncycastle but this will generate a proper certificate and
keypair.  make sure you have the latest bouncy castle (1.5 i think?) and
jdk 1.7 to run this.  you will have to follow the bouncy castle
installation tutorial to make it work.