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

com.firefly.net.tcp.secure.openssl.FileCertificateOpenSSLSecureSessionFactory Maven / Gradle / Ivy

There is a newer version: 5.0.0-dev6
Show newest version
package com.firefly.net.tcp.secure.openssl;

import java.io.File;
import java.util.List;

/**
 * @author Pengtao Qiu
 */
public class FileCertificateOpenSSLSecureSessionFactory extends AbstractOpenSSLSecureSessionFactory {
    private final String certificatePath;
    private final String privateKeyPath;

    public FileCertificateOpenSSLSecureSessionFactory(String certificatePath, String privateKeyPath) {
        this(DEFAULT_SUPPORTED_PROTOCOLS, certificatePath, privateKeyPath);
    }

    public FileCertificateOpenSSLSecureSessionFactory(List supportedProtocols, String certificatePath, String privateKeyPath) {
        super(supportedProtocols);
        this.certificatePath = certificatePath;
        this.privateKeyPath = privateKeyPath;
    }

    @Override
    public File getCertificate() {
        return new File(certificatePath);
    }

    @Override
    public File getPrivateKey() {
        return new File(privateKeyPath);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy