You should study http://docs.oracle.com/javaee/5/tutorial/doc/bnbxw.html . Note - this does not use OpenSSL but is equivalent to OpenSSL as far as the TLS/SSL aspects are concerned. I know JNI wrappers to OpenSSL exist but I have never used them. Now OpenSSL is more than just SSL - it contains a load of other algorithms which are not part of the SSL/TLS specification. If it is these algorithms (AES, MD5, SHA1 etc) that you are talking of then you should take a look at the JCE tutorial.
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop