All Downloads are FREE. Search and download functionalities are using the official Maven repository.

usn.net.ssl.util.StarttlsHandler Maven / Gradle / Ivy

Go to download

A utility to add certs to the trust store from a connection attempt, originially written by Oracle

There is a newer version: 1.0.16
Show newest version
package usn.net.ssl.util;

import java.net.Socket;

/**
 * An interface to be implemented by application protocol specific STARTTLS
 * handlers, to be used by {@link Starttls} class.
 */
public interface StarttlsHandler {

    /**
     * Do the application protocol specific actions to initiate a protocol
     * specific STARTTLS session, starting from a new connection.
     *
     * @param host the host to connect to
     * @param port the port to connect to
     * @return true if getting a certificate via STARTTLS is
     * believed to be successful, false otherwise
     * @throws java.lang.Exception
     */
    boolean run(String host, int port, Socket tunnel) throws Exception;
} // interface StarttlsHandler




© 2015 - 2024 Weber Informatics LLC | Privacy Policy