package net.northking.cctp.element.internal.protocol.http;

/**
 * KeyStoreType
 *
 * @author fengxiang.zhang
 * @date 2022/4/14
 * @since 1.0
 */
public enum KeyStoreType {
    jks, pkcs12;

    public static KeyStoreType from(String type) {
        for (KeyStoreType e : KeyStoreType.values()) {
            if (e.name().equalsIgnoreCase(type)) {
                return e;
            }
        }
        throw new IllegalArgumentException(String.format("SSL证书类型:%s 未被支持", type));
    }
}
