Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to add a Digital Certificate  RSS feed

Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a digital certificate (X.509) with the .pfx extension and the code that was written to add as follows:

private void setupForSSL() {

Properties properties = System.getProperties();
String handlers = System.getProperty("java.protocol.handler.pkgs");

if (handlers == null) {
// nothing specified yet (expected case)
else {
// something already there, put ourselves out front


// put the updated properties back in System

I used Keytool to add the certificate and when i ran this C:\Java\TestingClient>keytool -import -file hooper509.pfx -keystore hooper
Enter keystore password: xxxxxxxxxxxxx

I got this error
keytool error: java.lang.Exception: Input not an X.509 certificate

Any help would be appreciated.

We can walk to school together. And we can both read this tiny ad:
Rocket Oven Kickstarter - from the trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!