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

Unable to add PKCS#11 certs with Java 9+ #4147

Closed
thc202 opened this issue Dec 12, 2017 · 1 comment · Fixed by #4178
Closed

Unable to add PKCS#11 certs with Java 9+ #4147

thc202 opened this issue Dec 12, 2017 · 1 comment · Fixed by #4178
Assignees
Milestone

Comments

@thc202
Copy link
Member

thc202 commented Dec 12, 2017

Steps to reproduce the issue:

  1. Run ZAP (with Java 9);
  2. Go to Options > Certificate > PKCS#11 and try to add a cert;
  3. Note that it shows a generic error (driver or pass wrong), in the log there's an exception:
63290 [AWT-EventQueue-0] ERROR org.parosproxy.paros.extension.option.OptionsCertificatePanel  - Couldn't add key from XYZ
java.lang.NoSuchMethodException: sun.security.pkcs11.SunPKCS11.<init>(java.io.InputStream)
	at java.base/java.lang.Class.getConstructor0(Class.java:3322)
	at java.base/java.lang.Class.getConstructor(Class.java:2108)
	at ch.csnc.extension.httpclient.SSLContextManager.createInstance(SSLContextManager.java:377)
	at ch.csnc.extension.httpclient.SSLContextManager.createPKCS11Provider(SSLContextManager.java:366)
	at ch.csnc.extension.httpclient.SSLContextManager.initPKCS11(SSLContextManager.java:352)
	at org.parosproxy.paros.extension.option.OptionsCertificatePanel.addPkcs11ButtonActionPerformed(OptionsCertificatePanel.java:623)
	at org.parosproxy.paros.extension.option.OptionsCertificatePanel.access$900(OptionsCertificatePanel.java:75)
	at org.parosproxy.paros.extension.option.OptionsCertificatePanel$8.actionPerformed(OptionsCertificatePanel.java:381

ZAP
Version 2.7.0 (and older).

@thc202 thc202 added the bug label Dec 12, 2017
@alfsb alfsb mentioned this issue Dec 12, 2017
13 tasks
@thc202 thc202 added this to the 2.8.0 milestone Dec 13, 2017
@thc202 thc202 self-assigned this Dec 22, 2017
thc202 added a commit to thc202/zaproxy that referenced this issue Dec 22, 2017
Change SSLContextManager to call the new method available in Java 9 when
setting up the PKCS#11 provider.

Fix zaproxy#4147 - Unable to add PKCS#11 certs with Java 9
@thc202 thc202 changed the title Unable to add PKCS#11 certs with Java 9 Unable to add PKCS#11 certs with Java 9+ Mar 15, 2019
@lock
Copy link

lock bot commented Feb 2, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Feb 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging a pull request may close this issue.

2 participants