summaryrefslogtreecommitdiffstats
path: root/pki/base/common/src/com/netscape/cms/authentication
diff options
context:
space:
mode:
authorAde Lee <alee@redhat.com>2012-01-11 12:59:52 -0500
committerAde Lee <alee@redhat.com>2012-01-11 13:49:27 -0500
commit357d48b4f9897d09244f655d9b1836711947cc32 (patch)
tree697e9be4401f683fd552bb72bc036142ea618244 /pki/base/common/src/com/netscape/cms/authentication
parent10cfe7756e967ac91c66d33b392aeab9cf3780fb (diff)
downloadpki-357d48b4f9897d09244f655d9b1836711947cc32.tar.gz
pki-357d48b4f9897d09244f655d9b1836711947cc32.tar.xz
pki-357d48b4f9897d09244f655d9b1836711947cc32.zip
Formatting - line wrap > 120 in code
Diffstat (limited to 'pki/base/common/src/com/netscape/cms/authentication')
-rw-r--r--pki/base/common/src/com/netscape/cms/authentication/AVAPattern.java21
-rw-r--r--pki/base/common/src/com/netscape/cms/authentication/CMCAuth.java12
-rw-r--r--pki/base/common/src/com/netscape/cms/authentication/FlatFileAuth.java3
-rw-r--r--pki/base/common/src/com/netscape/cms/authentication/PortalEnroll.java12
4 files changed, 32 insertions, 16 deletions
diff --git a/pki/base/common/src/com/netscape/cms/authentication/AVAPattern.java b/pki/base/common/src/com/netscape/cms/authentication/AVAPattern.java
index e9b1fb3d0..eaaea5efe 100644
--- a/pki/base/common/src/com/netscape/cms/authentication/AVAPattern.java
+++ b/pki/base/common/src/com/netscape/cms/authentication/AVAPattern.java
@@ -193,9 +193,11 @@ class AVAPattern {
in.read() != 'd' ||
in.read() != 'n' ||
in.read() != '.')
- throw new ECompSyntaxErr(CMS.getUserMessage("CMS_AUTHENTICATION_COMPONENT_SYNTAX", "Invalid $ syntax, expecting $rdn"));
+ throw new ECompSyntaxErr(CMS.getUserMessage("CMS_AUTHENTICATION_COMPONENT_SYNTAX",
+ "Invalid $ syntax, expecting $rdn"));
} catch (IOException e) {
- throw new ECompSyntaxErr(CMS.getUserMessage("CMS_AUTHENTICATION_COMPONENT_SYNTAX", "Invalid $ syntax, expecting $rdn"));
+ throw new ECompSyntaxErr(CMS.getUserMessage("CMS_AUTHENTICATION_COMPONENT_SYNTAX",
+ "Invalid $ syntax, expecting $rdn"));
}
StringBuffer rdnNumberBuf = new StringBuffer();
@@ -214,11 +216,13 @@ class AVAPattern {
String rdnNumber = rdnNumberBuf.toString().trim();
if (rdnNumber.length() == 0)
- throw new ECompSyntaxErr(CMS.getUserMessage("CMS_AUTHENTICATION_COMPONENT_SYNTAX", "$rdn number not set in ava pattern"));
+ throw new ECompSyntaxErr(CMS.getUserMessage("CMS_AUTHENTICATION_COMPONENT_SYNTAX",
+ "$rdn number not set in ava pattern"));
try {
mElement = Integer.parseInt(rdnNumber) - 1;
} catch (NumberFormatException e) {
- throw new ECompSyntaxErr(CMS.getUserMessage("CMS_AUTHENTICATION_COMPONENT_SYNTAX", "Invalid $rdn number in ava pattern"));
+ throw new ECompSyntaxErr(CMS.getUserMessage("CMS_AUTHENTICATION_COMPONENT_SYNTAX",
+ "Invalid $rdn number in ava pattern"));
}
return;
}
@@ -242,7 +246,8 @@ class AVAPattern {
throw new EAuthException(CMS.getUserMessage("CMS_AUTHENTICATION_INTERNAL_ERROR", e.toString()));
}
if (c != '=')
- throw new ECompSyntaxErr(CMS.getUserMessage("CMS_AUTHENTICATION_COMPONENT_SYNTAX", "Missing \"=\" in ava pattern"));
+ throw new ECompSyntaxErr(CMS.getUserMessage("CMS_AUTHENTICATION_COMPONENT_SYNTAX",
+ "Missing \"=\" in ava pattern"));
// read value
//System.out.println("reading value");
@@ -257,7 +262,8 @@ class AVAPattern {
throw new EAuthException(CMS.getUserMessage("CMS_AUTHENTICATION_INTERNAL_ERROR", e.toString()));
}
if (c == -1)
- throw new ECompSyntaxErr(CMS.getUserMessage("CMS_AUTHENTICATION_COMPONENT_SYNTAX", "no value after = in ava pattern"));
+ throw new ECompSyntaxErr(CMS.getUserMessage("CMS_AUTHENTICATION_COMPONENT_SYNTAX",
+ "no value after = in ava pattern"));
if (c == '$') {
// check for $dn or $attr
@@ -304,7 +310,8 @@ class AVAPattern {
//System.out.println("----- attrName "+attrName);
if (attrName.length() == 0)
- throw new ECompSyntaxErr(CMS.getUserMessage("CMS_AUTHENTICATION_COMPONENT_SYNTAX", "attribute name expected"));
+ throw new ECompSyntaxErr(CMS.getUserMessage("CMS_AUTHENTICATION_COMPONENT_SYNTAX",
+ "attribute name expected"));
try {
ObjectIdentifier attrOid =
mLdapDNStrConverter.parseAVAKeyword(attrName);
diff --git a/pki/base/common/src/com/netscape/cms/authentication/CMCAuth.java b/pki/base/common/src/com/netscape/cms/authentication/CMCAuth.java
index c699be925..0e747dbe2 100644
--- a/pki/base/common/src/com/netscape/cms/authentication/CMCAuth.java
+++ b/pki/base/common/src/com/netscape/cms/authentication/CMCAuth.java
@@ -158,8 +158,10 @@ public class CMCAuth implements IAuthManager, IExtendedPluginInfo,
static {
mExtendedPluginInfo = new Vector();
- mExtendedPluginInfo.add(IExtendedPluginInfo.HELP_TEXT +
- ";Authenticate the CMC request. The signer must be an agent. The \"Authentication Instance ID\" must be named \"CMCAuth\"");
+ mExtendedPluginInfo
+ .add(IExtendedPluginInfo.HELP_TEXT
+ +
+ ";Authenticate the CMC request. The signer must be an agent. The \"Authentication Instance ID\" must be named \"CMCAuth\"");
mExtendedPluginInfo.add(IExtendedPluginInfo.HELP_TOKEN +
";configuration-authentication");
}
@@ -231,7 +233,8 @@ public class CMCAuth implements IAuthManager, IExtendedPluginInfo,
* If an internal error occurred.
* @see com.netscape.certsrv.authentication.AuthToken
*/
- public IAuthToken authenticate(IAuthCredentials authCred) throws EMissingCredential, EInvalidCredentials, EBaseException {
+ public IAuthToken authenticate(IAuthCredentials authCred) throws EMissingCredential, EInvalidCredentials,
+ EBaseException {
String auditMessage = null;
String auditSubjectID = auditSubjectID();
String auditReqType = ILogger.UNIDENTIFIED;
@@ -836,7 +839,8 @@ public class CMCAuth implements IAuthManager, IExtendedPluginInfo,
byte[] issuerB = ASN1Util.encode(issuer);
INTEGER sn = certI.getSerialNumber();
// if this cert is the signer cert, not a cert in the chain
- if (new String(issuerB).equals(new String(ASN1Util.encode(issuerAndSerialNumber.getIssuer())))
+ if (new String(issuerB).equals(new String(
+ ASN1Util.encode(issuerAndSerialNumber.getIssuer())))
&& sn.toString().equals(issuerAndSerialNumber.getSerialNumber().toString())) {
ByteArrayOutputStream os = new
ByteArrayOutputStream();
diff --git a/pki/base/common/src/com/netscape/cms/authentication/FlatFileAuth.java b/pki/base/common/src/com/netscape/cms/authentication/FlatFileAuth.java
index d2142ea3a..028cea376 100644
--- a/pki/base/common/src/com/netscape/cms/authentication/FlatFileAuth.java
+++ b/pki/base/common/src/com/netscape/cms/authentication/FlatFileAuth.java
@@ -210,7 +210,8 @@ public class FlatFileAuth
CMS.debug("FlatFileAuth: " + CMS.getLogMessage("CMS_AUTH_READ_ENTRIES", mFilename));
// printAllEntries();
} catch (IOException e) {
- throw new EBaseException(mName + " authentication: Could not open file " + mFilename + " (" + e.getMessage() + ")");
+ throw new EBaseException(mName + " authentication: Could not open file " + mFilename + " ("
+ + e.getMessage() + ")");
} catch (java.lang.StringIndexOutOfBoundsException ee) {
CMS.debug("FlatFileAuth: " + CMS.getLogMessage("OPERATION_ERROR", ee.toString()));
}
diff --git a/pki/base/common/src/com/netscape/cms/authentication/PortalEnroll.java b/pki/base/common/src/com/netscape/cms/authentication/PortalEnroll.java
index ac13a02fd..e2c3ec871 100644
--- a/pki/base/common/src/com/netscape/cms/authentication/PortalEnroll.java
+++ b/pki/base/common/src/com/netscape/cms/authentication/PortalEnroll.java
@@ -202,11 +202,13 @@ public class PortalEnroll extends DirBasedAuthentication {
if (res.hasMoreElements()) {
LDAPEntry entry = (LDAPEntry) res.nextElement();
- throw new EAuthUserError(CMS.getUserMessage("CMS_AUTHENTICATION_INVALID_ATTRIBUTE_VALUE", "UID already exists."));
+ throw new EAuthUserError(CMS.getUserMessage("CMS_AUTHENTICATION_INVALID_ATTRIBUTE_VALUE",
+ "UID already exists."));
} else {
dn = regist(token, uid);
if (dn == null)
- throw new EAuthUserError(CMS.getUserMessage("CMS_AUTHENTICATION_INVALID_ATTRIBUTE_VALUE", "Could not add user " + uid + "."));
+ throw new EAuthUserError(CMS.getUserMessage("CMS_AUTHENTICATION_INVALID_ATTRIBUTE_VALUE",
+ "Could not add user " + uid + "."));
}
// bind as user dn and pwd - authenticates user with pwd.
@@ -225,8 +227,10 @@ public class PortalEnroll extends DirBasedAuthentication {
switch (e.getLDAPResultCode()) {
case LDAPException.NO_SUCH_OBJECT:
case LDAPException.LDAP_PARTIAL_RESULTS:
- log(ILogger.LL_SECURITY, CMS.getLogMessage("CMS_AUTH_ADD_USER_ERROR", conn.getHost(), Integer.toString(conn.getPort())));
- throw new EAuthInternalError(CMS.getUserMessage("CMS_AUTHENTICATION_INTERNAL_ERROR", "Check Configuration detail."));
+ log(ILogger.LL_SECURITY,
+ CMS.getLogMessage("CMS_AUTH_ADD_USER_ERROR", conn.getHost(), Integer.toString(conn.getPort())));
+ throw new EAuthInternalError(CMS.getUserMessage("CMS_AUTHENTICATION_INTERNAL_ERROR",
+ "Check Configuration detail."));
case LDAPException.INVALID_CREDENTIALS:
log(ILogger.LL_SECURITY,