If this value is 0 it is taken to mean that the certificate path * should contain only one certificate. A value of -1 means that the * certificate path length is unconstrained. The default value is 5. * * @return The maximum path length. */ public int getMaxPathLength() { return maxPathLength; } /** * Sets the maximum length of certificate paths to build. * * @param maxPathLength The new path length. * @throws IllegalArgumentException If maxPathLength is less * than -1. */ public void setMaxPathLength(int maxPathLength) { if (maxPathLength < -1) throw new IllegalArgumentException(); this.maxPathLength = maxPathLength; } public String toString() { CPStringBuilder buf = new CPStringBuilder(super.toString()); buf.insert(buf.length() - 2, "; Max Path Length=" + maxPathLength); return buf.toString(); } }