Open pki-bot opened 4 years ago
Comment from dmoluguw (@SilleBille) at 2019-09-17 09:59:22
On initial investigation, the ClassNotFoundException
might be due to the merge of cmscore jar into cms jar: https://github.com/dogtagpki/pki/commits/master/base/server/src/com/netscape/cms/servlet/cert/scep/ChallengePassword.java
Comment from dmoluguw (@SilleBille) at 2019-09-17 09:59:23
Metadata Update from @SilleBille:
Comment from edewata (@edewata) at 2019-09-17 10:33:51
The stack trace does not point to the origin of the exception, but based on the error message the ClassNotFoundException might have been generated by either one of these lines in JSS:
The code is trying to load a class using the class loader of the current class (i.e. OIDMap). Note that the OIDMap was moved from PKI to JSS last year which also changed the class loader in Tomcat (see https://tomcat.apache.org/tomcat-8.5-doc/class-loader-howto.html).
This will still require further investigation, but I suspect the recent merging of cmscore.jar and cms.jar was probably not the cause because it shouldn't have changed the class loader. It would be nice if the problem can be retested on PKI 10.7.x to confirm that.
Comment from cipherboy (@cipherboy) at 2019-10-30 11:05:12
Interestingly, it seems to reference two files which I can't find anywhere (in PKI, Java, or JSS):
x509extensions.oid
x509extensions.classes
Comment from borama at 2020-08-12 09:17:40
Hello, we hit the same issue while using the current master Dogtag version.
As a workaround, we successfully tried the following solution:
we copied the ChallengePassword.java class to JSS sources (to org/mozilla/jss/netscape/security/pkcs/
)
we rebuilt JSS
we updated the /etc/pki/pki-tomcat/ca/CS.cfg
config file to reflect the new class location:
oidmap.challenge_password.class=org.mozilla.jss.netscape.security.pkcs.ChallengePassword
and used the custom JSS build in Dogtag.
I’m not sure if the class philosophically belongs to Dogtag or JSS but perhaps you might consider moving this class to JSS as a permanent solution to the problem?
We noticed that this class is also used from a few places in Dogtag so the references would need to be updated there. Thanks!
This issue was migrated from Pagure Issue #3107. Originally filed by dmoluguw (@SilleBille) on 2019-09-17 09:58:08:
Description: ClassNotFoundException when trying to install and configure scep
Package: pki-10.8.0-0.1
Environment: Fedora 30
Steps to Reproduce:
Configure scep by following the upstream instructions: https://www.dogtagpki.org/wiki/SCEP_Setup
Also
generate CA certificate
And verify by running
generate CSR request and a key
and when trying to test enroll the followng error is generated:
(Could not unwrap PKCS10 blob: java.security.cert.CertificateException: Error instantiating class for challenge_password java.lang.ClassNotFoundException):
Logs: