Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Problem retrieving certificates for signed jar using CodeSource.getCertificates

Posted on 2011-02-14
1
Medium Priority
?
308 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 20

Accepted Solution

by:
ChristoferDutz earned 2000 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

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Upgrading Tomcat – There are a couple of methods to upgrade Tomcat is to use The Apache Installer is to download and unzip and run the services.bat remove|install Tomcat6 Because of the App that we are working with, we can only use Tomcat 6.…
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

610 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