Skip to content

Commit

Permalink
Fix OAEP config in CRSEnrollment
Browse files Browse the repository at this point in the history
Previously the CRSEnrollment was trying to get the
keyWrap.useOAEP param from the authority config, but it's
actually reading a non-existent ca.keyWrap.useOAEP param.

To fix the problem the code has been modified to call the
EngineConfig.getUseOAEPKeyWrap().
  • Loading branch information
edewata committed May 3, 2023
1 parent e9f5e07 commit 955856b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
import org.dogtagpki.server.authentication.AuthToken;
import org.dogtagpki.server.ca.CAConfig;
import org.dogtagpki.server.ca.CAEngine;
import org.dogtagpki.server.ca.CAEngineConfig;
import org.mozilla.jss.CryptoManager;
import org.mozilla.jss.NoSuchTokenException;
import org.mozilla.jss.NotInitializedException;
Expand Down Expand Up @@ -260,6 +261,7 @@ public void init(ServletConfig sc) {
crsCA = "ca";

CAEngine engine = CAEngine.getInstance();
CAEngineConfig cs = engine.getConfig();
JssSubsystem jssSubsystem = engine.getJSSSubsystem();

mAuthority = (CertificateAuthority) engine.getSubsystem(crsCA);
Expand All @@ -273,7 +275,7 @@ public void init(ServletConfig sc) {
CAConfig authorityConfig = mAuthority.getConfig();
ConfigStore scepConfig = authorityConfig.getSubStore("scep", ConfigStore.class);
mEnabled = scepConfig.getBoolean("enable", false);
mUseOAEPKeyWrap = authorityConfig.getBoolean("keyWrap.useOAEP",false);
mUseOAEPKeyWrap = cs.getUseOAEPKeyWrap();
if (sc.getServletName().equals(SERVLET_NAME_DYN_PROFILE)) {
mIsDynamicProfileId = true;
logger.debug("CRSEnrollment: init: expecting dynamic ProfileId in URL");
Expand Down

0 comments on commit 955856b

Please sign in to comment.