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

io.vertx.up.uca.micro.ssl.TrustPipe Maven / Gradle / Ivy

There is a newer version: 0.9.0
Show newest version
package io.vertx.up.uca.micro.ssl;

import io.vertx.core.Handler;
import io.vertx.core.json.JsonObject;
import io.vertx.core.net.ClientOptionsBase;
import io.vertx.up.eon.em.CertType;
import io.vertx.up.uca.micro.ssl.client.JksTrust;
import io.vertx.up.uca.micro.ssl.client.PemTrust;
import io.vertx.up.uca.micro.ssl.client.PfxTrust;
import io.vertx.up.util.Ut;

public interface TrustPipe {

    static TrustPipe get(final CertType type) {
        // 1. OpenSSL
        TrustPipe pipe = null;
        switch (type) {
            case PKCS12:
                pipe = Ut.singleton(PfxTrust.class);
                break;
            case JKS:
                pipe = Ut.singleton(JksTrust.class);
                break;
            case PEM:
                pipe = Ut.singleton(PemTrust.class);
                break;
        }
        return pipe;
    }

    Handler parse(I options);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy