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