diff options
Diffstat (limited to 'pki/base/common/src/com/netscape/cmscore')
7 files changed, 0 insertions, 248 deletions
diff --git a/pki/base/common/src/com/netscape/cmscore/apps/CMSEngine.java b/pki/base/common/src/com/netscape/cmscore/apps/CMSEngine.java index 59b38712..e812cf10 100644 --- a/pki/base/common/src/com/netscape/cmscore/apps/CMSEngine.java +++ b/pki/base/common/src/com/netscape/cmscore/apps/CMSEngine.java @@ -1120,22 +1120,6 @@ public class CMSEngine implements ICMSEngine { mServerCertNickname = newName; } - private String lineParsing(String input, String newName) { - //<SSLPARAMS servercertnickname="Server-Cert cert-firefly" - int index = input.indexOf("servercertnickname"); - - if (index >= 0) { - String str = input.substring(index + 20); - int index2 = str.indexOf("\""); - String newLine = input.substring(0, index + 20) - + newName + str.substring(index2); - - return newLine; - } else { - return input; - } - } - public String getFingerPrint(Certificate cert) throws CertificateEncodingException, NoSuchAlgorithmException { return CertUtils.getFingerPrint(cert); diff --git a/pki/base/common/src/com/netscape/cmscore/authentication/ChallengePhraseAuthentication.java b/pki/base/common/src/com/netscape/cmscore/authentication/ChallengePhraseAuthentication.java index bf698dda..38901f3b 100644 --- a/pki/base/common/src/com/netscape/cmscore/authentication/ChallengePhraseAuthentication.java +++ b/pki/base/common/src/com/netscape/cmscore/authentication/ChallengePhraseAuthentication.java @@ -295,16 +295,6 @@ public class ChallengePhraseAuthentication implements IAuthManager { return authToken; } - private String getDecimalStr(String str) { - String newStr = str; - - if (str.startsWith("0x") || str.startsWith("0X")) { - newStr = "" + Integer.parseInt(str.trim().substring(2), 16); - } - - return newStr; - } - private boolean compareChallengePassword(CertRecord record, String pwd) throws EBaseException { MetaInfo metaInfo = (MetaInfo) record.get(CertRecord.ATTR_META_INFO); diff --git a/pki/base/common/src/com/netscape/cmscore/base/SimpleProperties.java b/pki/base/common/src/com/netscape/cmscore/base/SimpleProperties.java index 684f8a8e..924248d0 100644 --- a/pki/base/common/src/com/netscape/cmscore/base/SimpleProperties.java +++ b/pki/base/common/src/com/netscape/cmscore/base/SimpleProperties.java @@ -269,132 +269,6 @@ public class SimpleProperties extends Hashtable { return (slashCount % 2 == 1); } - /* - * Converts encoded \\uxxxx to unicode chars - * and changes special saved chars to their original forms - */ - private String loadConvert(String theString) { - char aChar; - int len = theString.length(); - StringBuffer outBuffer = new StringBuffer(len); - - for (int x = 0; x < len;) { - aChar = theString.charAt(x++); - if (aChar == '\\') { - aChar = theString.charAt(x++); - if (aChar == 'u') { - // Read the xxxx - int value = 0; - - for (int i = 0; i < 4; i++) { - aChar = theString.charAt(x++); - switch (aChar) { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - value = (value << 4) + aChar - '0'; - break; - - case 'a': - case 'b': - case 'c': - case 'd': - case 'e': - case 'f': - value = (value << 4) + 10 + aChar - 'a'; - break; - - case 'A': - case 'B': - case 'C': - case 'D': - case 'E': - case 'F': - value = (value << 4) + 10 + aChar - 'A'; - break; - - default: - throw new IllegalArgumentException( - "Malformed \\uxxxx encoding."); - } - } - outBuffer.append((char) value); - } else { - if (aChar == 't') aChar = '\t'; - else if (aChar == 'r') aChar = '\r'; - else if (aChar == 'n') aChar = '\n'; - else if (aChar == 'f') aChar = '\f'; - outBuffer.append(aChar); - } - } else - outBuffer.append(aChar); - } - return outBuffer.toString(); - } - - /* - * Converts unicodes to encoded \\uxxxx - * and writes out any of the characters in specialSaveChars - * with a preceding slash - */ - private String saveConvert(String theString) { - char aChar; - int len = theString.length(); - StringBuffer outBuffer = new StringBuffer(len * 2); - - for (int x = 0; x < len;) { - aChar = theString.charAt(x++); - switch (aChar) { - case '\\': - outBuffer.append('\\'); - outBuffer.append('\\'); - continue; - - case '\t': - outBuffer.append('\\'); - outBuffer.append('t'); - continue; - - case '\n': - outBuffer.append('\\'); - outBuffer.append('n'); - continue; - - case '\r': - outBuffer.append('\\'); - outBuffer.append('r'); - continue; - - case '\f': - outBuffer.append('\\'); - outBuffer.append('f'); - continue; - - default: - if ((aChar < 20) || (aChar > 127)) { - outBuffer.append('\\'); - outBuffer.append('u'); - outBuffer.append(toHex((aChar >> 12) & 0xF)); - outBuffer.append(toHex((aChar >> 8) & 0xF)); - outBuffer.append(toHex((aChar >> 4) & 0xF)); - outBuffer.append(toHex((aChar >> 0) & 0xF)); - } else { - if (specialSaveChars.indexOf(aChar) != -1) - outBuffer.append('\\'); - outBuffer.append(aChar); - } - } - } - return outBuffer.toString(); - } - /** * Calls the <code>store(OutputStream out, String header)</code> method * and suppresses IOExceptions that were thrown. @@ -599,14 +473,6 @@ public class SimpleProperties extends Hashtable { } } - /** - * Convert a nibble to a hex character - * @param nibble the nibble to convert. - */ - private static char toHex(int nibble) { - return hexDigit[(nibble & 0xF)]; - } - /** A table of hex digits */ private static final char[] hexDigit = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' diff --git a/pki/base/common/src/com/netscape/cmscore/dbs/PublicKeyMapper.java b/pki/base/common/src/com/netscape/cmscore/dbs/PublicKeyMapper.java index f55248ee..8a2d1f2d 100644 --- a/pki/base/common/src/com/netscape/cmscore/dbs/PublicKeyMapper.java +++ b/pki/base/common/src/com/netscape/cmscore/dbs/PublicKeyMapper.java @@ -124,22 +124,6 @@ public class PublicKeyMapper implements IDBAttrMapper { return mLdapName + op + value; } - private String normalize(String s) { - String val = ""; - - for (int i = 0; i < s.length(); i++) { - if (s.charAt(i) == '\n') { - continue; - } else if (s.charAt(i) == '\r') { - continue; - } else if (s.charAt(i) == '"') { - continue; - } - val += s.charAt(i); - } - return val; - } - public static String escapeBinaryData(byte data[]) { String result = ""; diff --git a/pki/base/common/src/com/netscape/cmscore/extensions/KeyUsage.java b/pki/base/common/src/com/netscape/cmscore/extensions/KeyUsage.java index a5378ced..9b8e16cf 100644 --- a/pki/base/common/src/com/netscape/cmscore/extensions/KeyUsage.java +++ b/pki/base/common/src/com/netscape/cmscore/extensions/KeyUsage.java @@ -231,9 +231,5 @@ public class KeyUsage implements ICMSExtension { return params; } - private void log(int level, String msg) { - mLogger.log(ILogger.EV_SYSTEM, ILogger.S_OTHER, level, msg); - } - } diff --git a/pki/base/common/src/com/netscape/cmscore/policy/GenericPolicyProcessor.java b/pki/base/common/src/com/netscape/cmscore/policy/GenericPolicyProcessor.java index 95d66828..cdfb7025 100644 --- a/pki/base/common/src/com/netscape/cmscore/policy/GenericPolicyProcessor.java +++ b/pki/base/common/src/com/netscape/cmscore/policy/GenericPolicyProcessor.java @@ -458,19 +458,6 @@ public class GenericPolicyProcessor implements IPolicyProcessor { return mAuthority.getId() + ".Policy"; } - private void setError(IRequest req, String format, String arg) { - if (format == null) - return; - EPolicyException ex = new EPolicyException(format, arg); - - Vector ev = req.getExtDataInStringVector(IRequest.ERRORS); - if (ev == null) { - ev = new Vector(); - } - ev.addElement(ex.toString()); - req.setExtData(IRequest.ERRORS, ev); - } - public Enumeration getPolicyImpls() { Vector impls = new Vector(); Enumeration enum1 = mImplTable.elements(); diff --git a/pki/base/common/src/com/netscape/cmscore/util/OsSubsystem.java b/pki/base/common/src/com/netscape/cmscore/util/OsSubsystem.java index 47bb6280..05118b9e 100644 --- a/pki/base/common/src/com/netscape/cmscore/util/OsSubsystem.java +++ b/pki/base/common/src/com/netscape/cmscore/util/OsSubsystem.java @@ -32,7 +32,6 @@ import com.netscape.certsrv.logging.ILogger; import com.netscape.cmscore.base.SubsystemRegistry; import com.netscape.osutil.LibC; import com.netscape.osutil.OSUtil; -import com.netscape.osutil.ResourceLimit; import com.netscape.osutil.Signal; import com.netscape.osutil.SignalListener; import com.netscape.osutil.UserID; @@ -174,42 +173,6 @@ public final class OsSubsystem implements ISubsystem { } /** - * Hooks up unix signals. - */ - private void initUnix() throws EBaseException { - // Set up signal handling. We pretty much exit on anything - // Signal.watch(Signal.SIGHUP); - // Signal.watch(Signal.SIGTERM); - // Signal.watch(Signal.SIGINT); - // mSignalThread = new SignalThread(); - // mSignalThread.setDaemon(true); - // mSignalThread.start(); - - Signal.addSignalListener(Signal.SIGHUP, new SIGHUPListener(this)); - Signal.addSignalListener(Signal.SIGTERM, new SIGTERMListener(this)); - Signal.addSignalListener(Signal.SIGINT, new SIGINTListener(this)); - - /* Increase the maximum number of file descriptors */ - int i = mConfig.getInteger("maxFiles", - ResourceLimit.getHardLimit(ResourceLimit.RLIMIT_NOFILE)); - - ResourceLimit.setLimits(ResourceLimit.RLIMIT_NOFILE, - i, ResourceLimit.getHardLimit(ResourceLimit.RLIMIT_NOFILE)); - - // write current pid to specified file - String pf = mConfig.getString("pidFile", null); - - if (pf == null) { - return; // development environment does not rely on this - } - File pidFile = new File(pf); - - if (pidFile.exists()) { - throw new EBaseException(CMS.getUserMessage("CMS_BASE_PID_EXIST")); - } - } - - /** * Used to change the process user id usually called after the appropriate * network ports have been opened. */ @@ -344,24 +307,6 @@ public final class OsSubsystem implements ISubsystem { } /** - * Unix restart - * <P> - */ - private void restartUnix() { - // Tell watch dog to restart us - int ppid = LibC.getppid(); - - Signal.send(ppid, Signal.SIGHUP); - } - - /** - * NT restart - * <P> - */ - private void restartNT() { - } - - /** * Returns the root configuration storage of this system. * <P> * |