1 /* 2 * Copyright (c) 2017, Red Hat, Inc. and/or its affiliates. 3 * 4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 5 * 6 * This code is free software; you can redistribute it and/or modify it 7 * under the terms of the GNU General Public License version 2 only, as 8 * published by the Free Software Foundation. 9 * 10 * This code is distributed in the hope that it will be useful, but WITHOUT 11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 13 * version 2 for more details (a copy is included in the LICENSE file that 14 * accompanied this code). 15 * 16 * You should have received a copy of the GNU General Public License version 17 * 2 along with this work; if not, write to the Free Software Foundation, 18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 19 * 20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 21 * or visit www.oracle.com if you need additional information or have any 22 * questions. 23 */ 24 25 package javax.net.ssl; 26 27 import java.util.EventObject; 28 29 /** 30 * This event contains information about the verify data 31 * sent by both clients and servers in the Finished messages 32 * of an SSL handshake. This data is used for authenticating the 33 * handshake and may be used as a binding value for an upper layer. 34 * See further information in 35 * <a href="https://tools.ietf.org/html/rfc5246#section-7.4.9"> 36 * RFC 5246 - 7.4.9. Finished</a>. 37 * 38 * @since 10 39 * @author Martin Balao 40 */ 41 public final class HandshakeVerifyDataEvent extends EventObject { 42 43 private static final long serialVersionUID = -6511539568892122899L; 44 45 private final byte[] clientVerifyData; 46 private final byte[] serverVerifyData; 47 48 /** 49 * Build a HandshakeVerifyDataEvent containing information about 50 * clients and servers verify data sent in the Finished 51 * messages of an SSL handshake. 52 * 53 * @param source source of the event. 54 * @param clientVerifyData client verify data. 55 * @param serverVerifyData server verify data. 56 */ 57 public HandshakeVerifyDataEvent(Object source, 58 byte[] clientVerifyData, byte[] serverVerifyData) 59 { 60 super(source); 61 this.clientVerifyData = clientVerifyData; 62 this.serverVerifyData = serverVerifyData; 63 } 64 65 /** 66 * Returns the client verify data. 67 * 68 * @return client verify data. 69 */ 70 public byte[] getClientVerifyData() { 71 return clientVerifyData; 72 } 73 74 /** 75 * Returns the server verify data. 76 * 77 * @return server verify data. 78 */ 79 public byte[] getServerVerifyData() { 80 return serverVerifyData; 81 } 82 }