private CAInfo createCA(String name, JsonObject jsonCA, OrgInfo org) throws NetworkConfigurationException {
String url = getJsonValueAsString(jsonCA.get("url"));
Properties httpOptions = extractProperties(jsonCA, "httpOptions");
String enrollId = null;
String enrollSecret = null;
List<JsonObject> registrars = getJsonValueAsList(jsonCA.get("registrar"));
List<UserInfo> regUsers = new LinkedList<>();
if (registrars != null) {
for (JsonObject reg : registrars) {
enrollId = getJsonValueAsString(reg.get("enrollId"));
enrollSecret = getJsonValueAsString(reg.get("enrollSecret"));
regUsers.add(new UserInfo(org.mspId, enrollId, enrollSecret));
}
}
CAInfo caInfo = new CAInfo(name, org.mspId, url, regUsers, httpOptions);
String caName = getJsonValueAsString(jsonCA.get("caName"));
if (caName != null) {
caInfo.setCaName(caName);
}
Properties properties = new Properties();
if (null != httpOptions && "false".equals(httpOptions.getProperty("verify"))) {
properties.setProperty("allowAllHostNames", "true");
}
getTLSCerts(name, jsonCA, properties);
caInfo.setProperties(properties);
return caInfo;
}