summaryrefslogtreecommitdiffstats
path: root/pki/base/util/src/netscape/security/x509/CertException.java
diff options
context:
space:
mode:
authorAde Lee <alee@redhat.com>2012-01-11 12:57:53 -0500
committerAde Lee <alee@redhat.com>2012-01-11 13:49:04 -0500
commit10cfe7756e967ac91c66d33b392aeab9cf3780fb (patch)
treed5ac9b58442265d2ce5ef60e31f041ddacba1b4f /pki/base/util/src/netscape/security/x509/CertException.java
parentedcb24f65cc3700e75d0a1d14dc2483f210b0ee4 (diff)
downloadpki-10cfe7756e967ac91c66d33b392aeab9cf3780fb.tar.gz
pki-10cfe7756e967ac91c66d33b392aeab9cf3780fb.tar.xz
pki-10cfe7756e967ac91c66d33b392aeab9cf3780fb.zip
Formatting (no line wrap in comments or code)
Diffstat (limited to 'pki/base/util/src/netscape/security/x509/CertException.java')
-rw-r--r--pki/base/util/src/netscape/security/x509/CertException.java66
1 files changed, 33 insertions, 33 deletions
diff --git a/pki/base/util/src/netscape/security/x509/CertException.java b/pki/base/util/src/netscape/security/x509/CertException.java
index 0b83ff116..31d9e686e 100644
--- a/pki/base/util/src/netscape/security/x509/CertException.java
+++ b/pki/base/util/src/netscape/security/x509/CertException.java
@@ -19,9 +19,9 @@ package netscape.security.x509;
/**
* CertException indicates one of a variety of certificate problems.
- *
+ *
* @version 1.18
- *
+ *
* @author David Brownell
* @author Amit Kapoor
* @author Hemma Prafullchandra
@@ -47,8 +47,10 @@ public class CertException extends SecurityException {
/** Indicates that the certificate has expired and so is not valid. */
public static final int verf_INVALID_EXPIRED = 4;
- /** Indicates that a certificate authority in the certification
- * chain is not trusted. */
+ /**
+ * Indicates that a certificate authority in the certification
+ * chain is not trusted.
+ */
public static final int verf_CA_UNTRUSTED = 5;
/** Indicates that the certification chain is too long. */
@@ -65,56 +67,56 @@ public class CertException extends SecurityException {
/** Indicates a problem with the certificate version */
public static final int err_INVALID_VERSION = 10;
-
+
/** Indicates a problem with the certificate format */
public static final int err_INVALID_FORMAT = 11;
-
+
/** Indicates a problem with the certificate encoding */
public static final int err_ENCODING = 12;
-
- // Private data members
- private int verfCode;
- private String moreData;
+ // Private data members
+ private int verfCode;
+ private String moreData;
/**
* Constructs a certificate exception using an error code
* (<code>verf_*</code>) and a string describing the context
* of the error.
*/
- public CertException(int code, String moredata)
- {
- verfCode = code;
- moreData = moredata;
+ public CertException(int code, String moredata) {
+ verfCode = code;
+ moreData = moredata;
}
/**
* Constructs a certificate exception using just an error code,
* without a string describing the context.
*/
- public CertException(int code)
- {
- verfCode = code;
+ public CertException(int code) {
+ verfCode = code;
}
/**
* Returns the error code with which the exception was created.
*/
- public int getVerfCode() { return verfCode; }
+ public int getVerfCode() {
+ return verfCode;
+ }
/**
* Returns a string describing the context in which the exception
* was reported.
*/
- public String getMoreData() { return moreData; }
+ public String getMoreData() {
+ return moreData;
+ }
/**
* Return a string corresponding to the error code used to create
* this exception.
*/
- public String getVerfDescription()
- {
- switch (verfCode) {
+ public String getVerfDescription() {
+ switch (verfCode) {
case verf_INVALID_SIG:
return "The signature in the certificate is not valid.";
case verf_INVALID_REVOKED:
@@ -134,32 +136,30 @@ public class CertException extends SecurityException {
case err_INVALID_PUBLIC_KEY:
return "The public key was not in the correct format.";
case err_INVALID_VERSION:
- return "The certificate has an invalid version number.";
+ return "The certificate has an invalid version number.";
case err_INVALID_FORMAT:
- return "The certificate has an invalid format.";
+ return "The certificate has an invalid format.";
case err_ENCODING:
return "Problem encountered while encoding the data.";
default:
return "Unknown code: " + verfCode;
- }
+ }
}
/**
* Returns a string describing the certificate exception.
*/
- public String toString()
- {
- return "[Certificate Exception: " + getMessage() + "]";
+ public String toString() {
+ return "[Certificate Exception: " + getMessage() + "]";
}
/**
* Returns a string describing the certificate exception.
*/
- public String getMessage()
- {
- return getVerfDescription()
- + ( (moreData != null)
- ? ( "\n (" + moreData + ")" ) : "" );
+ public String getMessage() {
+ return getVerfDescription()
+ + ((moreData != null)
+ ? ("\n (" + moreData + ")") : "");
}
}