--- /dev/null 2017-10-19 10:05:30.624477892 -0300 +++ new/src/java.base/share/classes/javax/net/ssl/HandshakeVerifyDataEvent.java 2017-10-19 17:47:12.467686930 -0300 @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2017, Red Hat, Inc. and/or its affiliates. + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.net.ssl; + +import java.util.EventObject; + +/** + * This event contains information about the verify data + * sent by both clients and servers in the Finished messages + * of an SSL handshake. This data is used for authenticating the + * handshake and may be used as a binding value for an upper layer. + * See further information in + * + * RFC 5246 - 7.4.9. Finished. + * + * @since 10 + * @author Martin Balao + */ +public final class HandshakeVerifyDataEvent extends EventObject { + + private static final long serialVersionUID = -6511539568892122899L; + + private final byte[] clientVerifyData; + private final byte[] serverVerifyData; + + /** + * Build a HandshakeVerifyDataEvent containing information about + * clients and servers verify data sent in the Finished + * messages of an SSL handshake. + * + * @param source source of the event. + * @param clientVerifyData client verify data. + * @param serverVerifyData server verify data. + */ + public HandshakeVerifyDataEvent(Object source, + byte[] clientVerifyData, byte[] serverVerifyData) + { + super(source); + this.clientVerifyData = clientVerifyData; + this.serverVerifyData = serverVerifyData; + } + + /** + * Returns the client verify data. + * + * @return client verify data. + */ + public byte[] getClientVerifyData() { + return clientVerifyData; + } + + /** + * Returns the server verify data. + * + * @return server verify data. + */ + public byte[] getServerVerifyData() { + return serverVerifyData; + } +}