save
This commit is contained in:
@@ -21,12 +21,12 @@ import java.util.List;
|
||||
import static com.sunyard.sydapi.util.PrintUtil.printRetWrap;
|
||||
|
||||
public class Shanghairenhang {
|
||||
private static final byte[] orgData2k = new byte[ 5*1024 ];
|
||||
private static final byte[] orgData2k = new byte[ 100 ];
|
||||
private static final String pcDnEN = "C=CN,O=CFCA OCA1,OU=YCCA,OU=Individual-2,CN=YCCA@黄金交易所@Zhuangj@1";
|
||||
private static final String RSA = "C=cn,O=CFCA TEST CA,OU=NCS2,OU=Enterprises,CN=041@Z402451000010@ShanDong@00000001";
|
||||
|
||||
public static void main(String[] args) throws UnsupportedEncodingException, CertificateException, NoSuchProviderException {
|
||||
System.setProperty("com.sunyard.sydapi4j.debug", "true");
|
||||
//System.setProperty("com.sunyard.sydapi4j.debug", "true");
|
||||
long startTime = System.currentTimeMillis(); //获取开始时间
|
||||
SydApiBuilder builder = new SydApiBuilder().setIp("192.168.0.200");
|
||||
SydApi4j api = (SydApi4j) builder.build();
|
||||
@@ -95,4 +95,20 @@ public class Shanghairenhang {
|
||||
System.out.println(attachedVerify);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getCerts() throws UnsupportedEncodingException {
|
||||
System.setProperty("com.sunyard.sydapi4j.debug", "true");
|
||||
SydApiBuilder builder = new SydApiBuilder().setIp("192.168.1.129");
|
||||
SydApi4j api = (SydApi4j) builder.build();
|
||||
RetWrap allCert = api.getAllCert(0,"");
|
||||
printRetWrap(allCert);
|
||||
String[] certDNs =(String[]) allCert.get("certDNs");
|
||||
ArrayList<String> certlist = new ArrayList<String>();
|
||||
Collections.addAll(certlist, certDNs);
|
||||
System.out.println("aaa:"+certDNs[0]);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user