From 8cf51f2ab58a9da363bb6df5c5e392d30594ecc2 Mon Sep 17 00:00:00 2001 From: CaiHQ Date: Sat, 13 Aug 2022 10:53:33 +0800 Subject: [PATCH] sync test case --- src/main/java/org/bdware/ypkdeploy/HTTPTool.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/bdware/ypkdeploy/HTTPTool.java b/src/main/java/org/bdware/ypkdeploy/HTTPTool.java index 954d26e..137e5ed 100644 --- a/src/main/java/org/bdware/ypkdeploy/HTTPTool.java +++ b/src/main/java/org/bdware/ypkdeploy/HTTPTool.java @@ -9,7 +9,6 @@ import org.apache.http.entity.mime.MultipartEntityBuilder; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; import org.bdware.client.ResultCallback; -import org.bdware.client.ws.Action; import org.bouncycastle.crypto.CryptoException; import org.bouncycastle.pqc.math.linearalgebra.ByteUtils; import org.zz.gmhelper.SM2KeyPair; @@ -151,7 +150,6 @@ public class HTTPTool { public static void deployUseHttp(DeployConfig config) { String url = "http://%s/Upload?%s&sign=%s"; File file = new File(config.ypkPath); - String path = config.ypkPath; String argWithoutSig = "path=%s&fileName=%s&isPrivate=true&order=%d&count=%d&pubKey=%s"; SM2KeyPair keyPair = SM2KeyPair.fromJson(String.format("{\"publicKey\":\"%s\",\"privateKey\":\"%s\"}", config.publicKey, config.privateKey)); String pubKey = keyPair.getPublicKeyStr(); @@ -181,7 +179,8 @@ public class HTTPTool { CloseableHttpResponse response = client.execute(httpPost); ByteArrayOutputStream bo = new ByteArrayOutputStream(); response.getEntity().writeTo(bo); - System.out.println(TAG + +order + " " + count + " " + bo); + System.out.println(TAG + +order + "/" + count + " " + bo); + client.close(); } } catch (IOException | CryptoException e) { e.printStackTrace();