1 7 8 package java.security.cert; 9 10 import java.security.GeneralSecurityException ; 11 12 41 public class CertPathValidatorException extends GeneralSecurityException { 42 43 private static final long serialVersionUID = -3083180014971893139L; 44 45 49 private int index = -1; 50 51 55 private CertPath certPath; 56 57 61 public CertPathValidatorException() { 62 super(); 63 } 64 65 72 public CertPathValidatorException(String msg) { 73 super(msg); 74 } 75 76 89 public CertPathValidatorException(Throwable cause) { 90 super(cause); 91 } 92 93 102 public CertPathValidatorException(String msg, Throwable cause) { 103 super(msg, cause); 104 } 105 106 123 public CertPathValidatorException(String msg, Throwable cause, 124 CertPath certPath, int index) { 125 super(msg, cause); 126 if (certPath == null && index != -1) { 127 throw new IllegalArgumentException (); 128 } 129 if (index < -1 || 130 (certPath != null && index >= certPath.getCertificates().size())) { 131 throw new IndexOutOfBoundsException (); 132 } 133 this.certPath = certPath; 134 this.index = index; 135 } 136 137 144 public CertPath getCertPath() { 145 return this.certPath; 146 } 147 148 156 public int getIndex() { 157 return this.index; 158 } 159 160 } 161 | Popular Tags |