1
2
3
4
5
6
7
8
9
10
11
12
13
14 package ch.qos.logback.classic.net.server;
15
16 import java.security.KeyManagementException;
17 import java.security.KeyStoreException;
18 import java.security.NoSuchAlgorithmException;
19 import java.security.NoSuchProviderException;
20 import java.security.UnrecoverableKeyException;
21 import java.security.cert.CertificateException;
22
23 import javax.net.ssl.SSLContext;
24
25 import ch.qos.logback.core.net.ssl.SSLConfiguration;
26 import ch.qos.logback.core.spi.ContextAware;
27
28
29
30
31
32
33 class MockSSLConfiguration extends SSLConfiguration {
34
35 private boolean contextCreated;
36
37 @Override
38 public SSLContext createContext(ContextAware context) throws NoSuchProviderException, NoSuchAlgorithmException,
39 KeyManagementException, UnrecoverableKeyException, KeyStoreException, CertificateException {
40 contextCreated = true;
41 return super.createContext(context);
42 }
43
44 public boolean isContextCreated() {
45 return contextCreated;
46 }
47
48 }