Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Java SDK 6.2.13 from Cybsclients15.jar and new P12 keys... #179

Open
huw-trimet opened this issue May 2, 2024 · 0 comments
Open

Comments

@huw-trimet
Copy link

Hello Community, we are upgrading to the new Java SDK using the RunSample.java and our own projects, I have consistent reproduce the following behaviors, please advise.

P12 keys created using a strong password vs P12 keys created with the "merchantid" being the password. All P12 keys are imported using the "Certificate Import Wizard"

In the RunSample.java run time, the P12 keys with a strong password, required the keyAlias property field being populated, otherwise, would result in error:

Exception in thread "main" java.lang.UnsupportedOperationException: trusted certificate entries are not password-protected
at java.security.KeyStoreSpi.engineGetEntry(KeyStoreSpi.java:466)
at java.security.KeyStore.getEntry(KeyStore.java:1521)
at com.cybersource.ws.client.SecurityUtil.readAndStoreCertificateAndPrivateKey(SecurityUtil.java:158)
at com.cybersource.ws.client.SecurityUtil.loadMerchantP12File(SecurityUtil.java:109)
at com.cybersource.ws.client.Client.soapWrapAndSign(Client.java:231)
at com.cybersource.ws.client.Client.runTransaction(Client.java:117)
at com.cybersource.ws.client.Client.runTransaction(Client.java:67)
at com.cybersource.sample.RunSample.runAuth(RunSample.java:153)
at com.cybersource.sample.RunSample.main(RunSample.java:64)
Command execution failed.

However, the P12 keys were generated with the password as the merchantid, can't have the keyAlias field populated, it would cause the error:

Exception while obtaining private key from KeyStore with alias,

Any insights would be appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant