sync test case

This commit is contained in:
CaiHQ 2022-08-13 10:53:33 +08:00
parent 15e3468f49
commit 8cf51f2ab5

View File

@ -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();