I have a signed server-side jar file that is doing some certificate checking. At runtime I attempt to retrieve the certificates with the following code:
ProtectionDomain pd = MyApplication.class.getProtectionDomain();
Certificate cert = pd.getCodeSource().getCertificates();
This works fine when my jar is used in a standalone command line Java application. However, when I use this jar in a web application that's deployed in Weblogic server (Linux, 64-bit Sun JVM), the getCertificates() call always returns null. Can anyone help me and explain why this occurs, and any ideas on how to get getCertificates() to work under WebLogic (v10.3.3)?