View Javadoc
1   /*
2    * Licensed under the GPL License. You may not use this file except in compliance with the License.
3    * You may obtain a copy of the License at
4    *
5    *   https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
6    *
7    * THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
8    * WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
9    * PURPOSE.
10   */
11  package psiprobe.model.certificates;
12  
13  import java.io.Serializable;
14  import java.util.ArrayList;
15  import java.util.Collection;
16  import java.util.Collections;
17  import java.util.List;
18  
19  /**
20   * SSL Host Configuration Information Class.
21   */
22  public class SslHostConfigInfo implements Serializable {
23  
24    /** The Constant serialVersionUID. */
25    private static final long serialVersionUID = 8264467511525154728L;
26  
27    /** The host name. */
28    private String hostName;
29  
30    /** The trust store certs. */
31    private List<Cert> trustStoreCerts;
32  
33    /** Certificate infos. */
34    private List<CertificateInfo> certificateInfos;
35  
36    /** The ssl protocol. */
37    private String protocols;
38  
39    /** The ciphers. */
40    private String ciphers;
41  
42    /** The certificate verification. */
43    private String certificateVerification;
44  
45    /** The certificate verification depth. */
46    private String certificateVerificationDepth;
47  
48    /** The insecure renegotiation. */
49    private String insecureRenegotiation;
50  
51    /** The truststore file. */
52    private String truststoreFile;
53  
54    /** The truststore password. */
55    private String truststorePassword;
56  
57    /** The truststore provider. */
58    private String truststoreProvider;
59  
60    /** The truststore type. */
61    private String truststoreType;
62  
63    /** The truststore algorithm. */
64    private String truststoreAlgorithm;
65  
66    /**
67     * Gets the hostName.
68     *
69     * @return the hostName
70     */
71    public String getHostName() {
72      return hostName;
73    }
74  
75    /**
76     * Sets the hostName.
77     *
78     * @param hostName the new the hostName
79     */
80    public void setHostName(String hostName) {
81      this.hostName = hostName;
82    }
83  
84    /**
85     * Gets the certificate verification.
86     *
87     * @return the certificate verification
88     */
89    public String getCertificateVerification() {
90      return certificateVerification;
91    }
92  
93    /**
94     * Sets the certificate verification.
95     *
96     * @param certificateVerification the new certificate verification
97     */
98    public void setCertificateVerification(String certificateVerification) {
99      this.certificateVerification = certificateVerification;
100   }
101 
102   /**
103    * Gets protocols.
104    *
105    * @return protocols
106    */
107   public String getProtocols() {
108     return protocols;
109   }
110 
111   /**
112    * Sets protocols.
113    *
114    * @param protocols new protocols
115    */
116   public void setProtocols(String protocols) {
117     this.protocols = protocols;
118   }
119 
120   /**
121    * Gets the ciphers.
122    *
123    * @return the ciphers
124    */
125   public String getCiphers() {
126     return ciphers;
127   }
128 
129   /**
130    * Sets the ciphers.
131    *
132    * @param ciphers the new ciphers
133    */
134   public void setCiphers(String ciphers) {
135     this.ciphers = ciphers;
136   }
137 
138   /**
139    * Gets the certificate verification depth.
140    *
141    * @return the certificate verification depth
142    */
143   public String getCertificateVerificationDepth() {
144     return certificateVerificationDepth;
145   }
146 
147   /**
148    * Sets the certificate verification depth.
149    *
150    * @param certificateVerificationDepth the new certificate verification depth
151    */
152   public void setCertificateVerificationDepth(String certificateVerificationDepth) {
153     this.certificateVerificationDepth = certificateVerificationDepth;
154   }
155 
156   /**
157    * Gets the insecure renegotiation.
158    *
159    * @return the insecure renegotiation
160    */
161   public String getInsecureRenegotiation() {
162     return insecureRenegotiation;
163   }
164 
165   /**
166    * Sets the insecure renegotiation.
167    *
168    * @param insecureRenegotiation the new insecure renegotiation
169    */
170   public void setInsecureRenegotiation(String insecureRenegotiation) {
171     this.insecureRenegotiation = insecureRenegotiation;
172   }
173 
174   /**
175    * Gets the truststore file.
176    *
177    * @return the truststore file
178    */
179   public String getTruststoreFile() {
180     return truststoreFile;
181   }
182 
183   /**
184    * Sets the truststore file.
185    *
186    * @param truststoreFile the new truststore file
187    */
188   public void setTruststoreFile(String truststoreFile) {
189     this.truststoreFile = truststoreFile;
190   }
191 
192   /**
193    * Gets the truststore pass.
194    *
195    * @return the truststore pass
196    */
197   public String getTruststorePassword() {
198     return truststorePassword;
199   }
200 
201   /**
202    * Sets the truststore password.
203    *
204    * @param truststorePassword the new truststore password
205    */
206   public void setTruststorePassword(String truststorePassword) {
207     this.truststorePassword = truststorePassword;
208   }
209 
210   /**
211    * Gets the truststore provider.
212    *
213    * @return the truststore provider
214    */
215   public String getTruststoreProvider() {
216     return truststoreProvider;
217   }
218 
219   /**
220    * Sets the truststore provider.
221    *
222    * @param truststoreProvider the new truststore provider
223    */
224   public void setTruststoreProvider(String truststoreProvider) {
225     this.truststoreProvider = truststoreProvider;
226   }
227 
228   /**
229    * Gets the truststore type.
230    *
231    * @return the truststore type
232    */
233   public String getTruststoreType() {
234     return truststoreType;
235   }
236 
237   /**
238    * Sets the truststore type.
239    *
240    * @param truststoreType the new truststore type
241    */
242   public void setTruststoreType(String truststoreType) {
243     this.truststoreType = truststoreType;
244   }
245 
246   /**
247    * Gets the truststore algorithm.
248    *
249    * @return the truststore algorithm
250    */
251   public String getTruststoreAlgorithm() {
252     return truststoreAlgorithm;
253   }
254 
255   /**
256    * Sets the truststore algorithm.
257    *
258    * @param truststoreAlgorithm the new truststore algorithm
259    */
260   public void setTruststoreAlgorithm(String truststoreAlgorithm) {
261     this.truststoreAlgorithm = truststoreAlgorithm;
262   }
263 
264   /**
265    * Gets the trust store certs.
266    *
267    * @return the trust store certs
268    */
269   public List<Cert> getTrustStoreCerts() {
270     return trustStoreCerts == null ? Collections.emptyList() : new ArrayList<>(trustStoreCerts);
271   }
272 
273   /**
274    * Sets the trust store certs.
275    *
276    * @param trustStoreCerts the new trust store certs
277    */
278   public void setTrustStoreCerts(Collection<Cert> trustStoreCerts) {
279     this.trustStoreCerts =
280         trustStoreCerts == null ? Collections.emptyList() : new ArrayList<>(trustStoreCerts);
281   }
282 
283   /**
284    * Gets certificate infos.
285    *
286    * @return certificate infos
287    */
288   public List<CertificateInfo> getCertificateInfos() {
289     return certificateInfos == null ? Collections.emptyList() : new ArrayList<>(certificateInfos);
290   }
291 
292   /**
293    * Sets certificate infos.
294    *
295    * @param certificateInfos new certificate infos
296    */
297   public void setCertificateInfos(Collection<CertificateInfo> certificateInfos) {
298     this.certificateInfos =
299         certificateInfos == null ? Collections.emptyList() : new ArrayList<>(certificateInfos);
300   }
301 
302 }