Solved

Problem retrieving certificates for signed jar using CodeSource.getCertificates

Posted on 2011-02-14
1
284 Views
Last Modified: 2012-05-11
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)?
 
0
Comment
Question by:bala_pbiddle
1 Comment
 
LVL 20

Accepted Solution

by:
ChristoferDutz earned 500 total points
ID: 34896250
Could it be possible that you stored your certificates in the JVM default keystore? If this is the case, I think Weblogic usses it's own keystore. You have to provide them differently:
http://www.instantssl.com/ssl-certificate-support/cert_installation/ssl-certificate-weblogic.html
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
couple of eclipse 5 36
Windows Server Backup - behind the scenes management algorithm 8 73
Way to decrease size of apk file 9 66
Details to create developer account 10 36
Verbose logging is used to diagnose garbage collector problems. By default, -verbose:gc output is written to either native_stderr.log or native_stdout.log.   It is also possible to redirect the logs to a user-specified file. This article will de…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question