Jump to content
  • Sign Up

Fixing certificate issues


Sariel V.7024

Recommended Posts

One of the few helpful posts I made in the old forum came out of some trouble I had getting my Java program to access the API. One day, my machine rejected gw2's certificate. Finding out how to get it working again was a right pain, and hopefully this will help someone in the future:

 

----

This was a major headache as several times the fix failed for some reason or other, so I thought I would outline the steps I took to get it working (Windows version).

1. Copy the site certificate -

1.a. Open https://api.guildwars2.com in Chrome.

1.b. Click the green lock next to the address bar. This brings up the security report.

1.c. Next to “Your connection to this site is private.”, click “Details”

1.d. Click the [View certificate] button.

1.e. On the Certificate window, click the “Details” tab.

1.f. Click the [Copy to File…] button.

1.g. Advance through the export wizard. Select Base-64 encoded X.509 (.cer). Select a save directory and name.

2. Launch cmd.exe in administrator mode.

3. Navigate to your Java directory. Enter the /bin subdirectory.

4. Enter the following on one line:

keytool -import -noprompt -trustcacerts -alias wwwGuildWars2 -file “C:/Path_To_Your_Certificate/certificateName.cer” -keystore “C:/Path_To_Java_Directory/lib/security/cacerts” -storepass changeit

4.1. Insert paths to your files as needed. The default password for the keystore is changeit. If you’ve ever actually set it in the past, use whatever that was.

5. If there is some confusion which keystore is being pulled from (e.g. you have multiple java installations), repeat step 4 for each of them.

Now I get to figure out why eclipse is pulling from a different Java’s keystore…

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...