View Javadoc
1   /*
2    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
3    * The software in this package is published under the terms of the CPAL v1.0
4    * license, a copy of which has been included with this distribution in the
5    * LICENSE.txt file.
6    */
7   package org.mule.transport.ssl;
8   
9   
10  import java.security.cert.Certificate;
11  
12  import javax.net.ssl.HandshakeCompletedEvent;
13  import javax.net.ssl.SSLPeerUnverifiedException;
14  import javax.net.ssl.SSLSocket;
15  
16  public class MockHandshakeCompletedEvent extends HandshakeCompletedEvent
17  {
18      
19      public MockHandshakeCompletedEvent()
20      {
21          this(new MockSslSocket());
22      }
23      
24      public MockHandshakeCompletedEvent(SSLSocket socket)
25      {
26          super(socket, null);
27      }
28  
29      @Override
30      public Certificate[] getLocalCertificates()
31      {
32          return new Certificate[0];
33      }
34  
35      @Override
36      public Certificate[] getPeerCertificates() throws SSLPeerUnverifiedException
37      {
38          return new Certificate[0];
39      }
40      
41  }
42