io.vertx.up.uca.micro.ssl.CertPipe Maven / Gradle / Ivy
package io.vertx.up.uca.micro.ssl;
import io.vertx.core.Handler;
import io.vertx.core.json.JsonObject;
import io.vertx.core.net.TCPSSLOptions;
import io.vertx.up.eon.em.CertType;
import io.vertx.up.uca.micro.ssl.server.JksCert;
import io.vertx.up.uca.micro.ssl.server.PemCert;
import io.vertx.up.uca.micro.ssl.server.PfxCert;
import io.vertx.up.util.Ut;
/**
* Different ssl pipe
*
* @param
*/
public interface CertPipe {
static CertPipe get(final CertType type) {
// 1. OpenSSL
CertPipe pipe = null;
switch (type) {
case PKCS12:
pipe = Ut.singleton(PfxCert.class);
break;
case JKS:
pipe = Ut.singleton(JksCert.class);
break;
case PEM:
pipe = Ut.singleton(PemCert.class);
break;
}
return pipe;
}
/**
* Different pipe to parse JsonObject to generate Options
*
* @param options
* @return
*/
Handler parse(I options);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy