Skip to content

Commit

Permalink
Move CertUtils.printRequestContent() into Request
Browse files Browse the repository at this point in the history
  • Loading branch information
edewata committed May 6, 2023
1 parent b960017 commit 1cb42cb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
16 changes: 0 additions & 16 deletions base/server/src/main/java/com/netscape/cmscore/cert/CertUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.profile.EProfileException;
import com.netscape.cmscore.apps.CMS;
import com.netscape.cmscore.request.Request;

/**
* Utility class with assorted methods to check for
Expand Down Expand Up @@ -959,21 +958,6 @@ else if (certusage.equalsIgnoreCase("EmailRecipient"))
return cu;
}

public static void printRequestContent(Request request) {
String method = "CertUtils.printRequestContent: ";
logger.debug(method + "Content of request: ");
Enumeration<String> ereq = request.getExtDataKeys();
while (ereq.hasMoreElements()) {
String reqKey = ereq.nextElement();
String reqVal = request.getExtDataInString(reqKey);
if (reqVal != null) {
logger.debug(" req entry - " + reqKey + ": " + reqVal);
} else {
logger.debug(" req entry - " + reqKey + ": no value");
}
}
}

/*
* addCTpoisonExt adds the Certificate Transparency V1 poison extension
* to the Ceritificate Info
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1040,4 +1040,22 @@ public String getRealm() {
public void setRealm(String realm) {
this.realm = realm;
}

public void printContent() {

String method = "Request.printContent: ";
logger.debug(method + "Content of request: ");

Enumeration<String> ereq = getExtDataKeys();
while (ereq.hasMoreElements()) {
String reqKey = ereq.nextElement();
String reqVal = getExtDataInString(reqKey);

if (reqVal != null) {
logger.debug(" req entry - " + reqKey + ": " + reqVal);
} else {
logger.debug(" req entry - " + reqKey + ": no value");
}
}
}
}

0 comments on commit 1cb42cb

Please sign in to comment.