• Post Reply Bookmark Topic Watch Topic
  • New Topic

Keystores  RSS feed

 
kojo Owusu-Ansah
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Dear all,

Am tasked to write API using java to call web services from an authentication server to perfume multiple task,the big problem is i have downloaded two certificates from the server and have imported them into my keystore which accepted the given password.

I dont know if am doing something wrong but when i try wsimport i get this error "[ERROR] java.security.cert.CertificateException: No subject alternative names present".

Secondly I tried to import the keystore directly in the C:\Program Files\Java\jdk1.8.0_91\jre\lib\security which also gave this error keytool error: java.io.IOException: Keystore was tampered with, or password was incorrect even with the same password.

CAN SOME ONE PLEASE HELP? this is driving me crazy for days now.

Thank you
Kojo
1.PNG
[Thumbnail for 1.PNG]
2_2.PNG
[Thumbnail for 2_2.PNG]
 
Ron McLeod
Bartender
Posts: 1602
232
Android Angular Framework Eclipse IDE Java Linux MySQL Database Redhat TypeScript
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would guess it is because the hostname being specified for wsimport (197.XXX.XXX.XXX) doesn't match the hostname for the certificate (activid-02.hertitagebank.loc).
 
kojo Owusu-Ansah
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Ron I will get the client to asign the name to the ip instead and try if that would work.
Thanks so very much for pointing this out it makes much sense and am still hoping you come up with more possible reasons.

God bless you
 
kojo Owusu-Ansah
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Would you have any idea about the java . I of I exception? ?...The password is actually correct
 
Ron McLeod
Bartender
Posts: 1602
232
Android Angular Framework Eclipse IDE Java Linux MySQL Database Redhat TypeScript
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
kojo Owusu-Ansah wrote:Would you have any idea about the java . I of I exception? ?...The password is actually correct

java.io.IOException: Keystore was tampered with, or password was incorrect usually means that you provided the wrong password.  The default password is often changeit.


From the screen captures (please copy and paste the text next time), it looks like you first created a new keystore in directory C:\Users\Kojo, provided a password, and imported the credentials.

Later, you tried to update the update the keystore in directory C:\Program Files\Java\jdk1.8.0_91\jre\lib\security, but it failed because the password was incorrect, because it is a different keystore than the one that you created earlier.


Check to see if you have two keystores: one C:\Users\Kojo\cacerts and the other C:\Program Files\Java\jdk1.8.0_91\jre\lib\security\cacerts.
 
kojo Owusu-Ansah
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are right Ron.

I first created one in users and gave it a simple password O123456 and after it still didn't work I went ahead to import it into java jre security with the same password O123456.

So is it advisable to import it into documents or it should always be in the java jre security?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!