public static Type getTypeFromText(final String t) {
            for (Type type : Type.values()) {
                if (Objects.equals(type.getText(), t)) {
                    return type;
                }
            }
            return null;
        }
Get CommonName from SubjectDN.
If regex capture is failed, return inputted SubjectDN.
@param subject: SubjectDN
@return cn or subject
src/main/java/core/packetproxy/model/ClientCertificate.java