|
|
@@ -143,7 +143,6 @@ public class AutoUpdateCertificatesVerifier implements Verifier { |
|
|
|
int statusCode = response.getStatusLine().getStatusCode(); |
|
|
|
String body = EntityUtils.toString(response.getEntity()); |
|
|
|
if (statusCode == 200) { |
|
|
|
log.info(" autoUpdateCert success。"+body); |
|
|
|
List<X509Certificate> newCertList = deserializeToCerts(apiV3Key, body); |
|
|
|
if (newCertList.isEmpty()) { |
|
|
|
log.warn("Cert list is empty"); |
|
|
@@ -158,7 +157,7 @@ public class AutoUpdateCertificatesVerifier implements Verifier { |
|
|
|
/** |
|
|
|
* 反序列化证书并解密 |
|
|
|
*/ |
|
|
|
private List<X509Certificate> deserializeToCerts(byte[] apiV3Key, String body) throws GeneralSecurityException, IOException { |
|
|
|
private static List<X509Certificate> deserializeToCerts(byte[] apiV3Key, String body) throws GeneralSecurityException, IOException { |
|
|
|
AesUtils aesUtils = new AesUtils(apiV3Key); |
|
|
|
final JsonObject json = GsonParser.parse(body); |
|
|
|
final JsonArray dataNode = json.getAsJsonArray("data"); |
|
|
|