|  | @ -59,6 +59,7 @@ public class ZysoftApi extends AbstractApiExecuter {
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     private String licence = SystemConfig.getInstance().getGatewayLicence();
 | 
	
		
			
				|  |  |     private String basepath = SystemConfig.getInstance().getGatewayUrl();
 | 
	
		
			
				|  |  |     private String ca_url = SystemConfig.sysPropertiesSets.get("ca_url");
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     private ZysoftApi(byte[] platformPublicKey, byte[] parameterPublicKey, byte[] resultPrivateKey) {
 | 
	
	
		
			
				|  | @ -199,4 +200,71 @@ public class ZysoftApi extends AbstractApiExecuter {
 | 
	
		
			
				|  |  |     {
 | 
	
		
			
				|  |  |         return cryptoParameter(key, param);
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * CA底层Post统一接口
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public String capost(Map<String,String> params, Map<String,String> headers, boolean openCrypto) throws Exception
 | 
	
		
			
				|  |  |     {
 | 
	
		
			
				|  |  |         List<RequestValue> paramsList = null;
 | 
	
		
			
				|  |  |         HeaderValue[] headersList = null;
 | 
	
		
			
				|  |  |         if(params!=null)
 | 
	
		
			
				|  |  |         {
 | 
	
		
			
				|  |  |             paramsList = new ArrayList<>();
 | 
	
		
			
				|  |  |             for(String key :params.keySet())
 | 
	
		
			
				|  |  |             {
 | 
	
		
			
				|  |  |                 RequestValue obj = new RequestValue(key,params.get(key));
 | 
	
		
			
				|  |  |                 paramsList.add(obj);
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         if(headers!=null)
 | 
	
		
			
				|  |  |         {
 | 
	
		
			
				|  |  |             headersList = new HeaderValue[headers.size()];
 | 
	
		
			
				|  |  |             int i = 0;
 | 
	
		
			
				|  |  |             for(String key :headers.keySet())
 | 
	
		
			
				|  |  |             {
 | 
	
		
			
				|  |  |                 headersList[i] = new HeaderValue(key,headers.get(key));
 | 
	
		
			
				|  |  |                 i++;
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         System.out.println("ca_url:"+ca_url);
 | 
	
		
			
				|  |  |         String response = doHttpPost(ca_url,licence,openCrypto,paramsList,headersList);
 | 
	
		
			
				|  |  |         response = response.replace("\r","").replace("\n","").replace("\t","").replace("\f","");
 | 
	
		
			
				|  |  |         //System.out.print("response:"+response+"\r\n");
 | 
	
		
			
				|  |  |         return response;
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * CA底层Get统一接口
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public String caget(Map<String,String> params, Map<String,String> headers, boolean openCrypto) throws Exception
 | 
	
		
			
				|  |  |     {
 | 
	
		
			
				|  |  |         List<RequestValue> paramsList = null;
 | 
	
		
			
				|  |  |         HeaderValue[] headersList = null;
 | 
	
		
			
				|  |  |         if(params!=null)
 | 
	
		
			
				|  |  |         {
 | 
	
		
			
				|  |  |             paramsList = new ArrayList<>();
 | 
	
		
			
				|  |  |             for(String key :params.keySet())
 | 
	
		
			
				|  |  |             {
 | 
	
		
			
				|  |  |                 RequestValue obj = new RequestValue(key,params.get(key));
 | 
	
		
			
				|  |  |                 paramsList.add(obj);
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         if(headers!=null)
 | 
	
		
			
				|  |  |         {
 | 
	
		
			
				|  |  |             headersList = new HeaderValue[headers.size()];
 | 
	
		
			
				|  |  |             int i = 0;
 | 
	
		
			
				|  |  |             for(String key :headers.keySet())
 | 
	
		
			
				|  |  |             {
 | 
	
		
			
				|  |  |                 headersList[i] = new HeaderValue(key,headers.get(key));
 | 
	
		
			
				|  |  |                 i++;
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         String response = doHttpGet(ca_url, licence, openCrypto, paramsList, headersList);
 | 
	
		
			
				|  |  |         response = response.replace("\r","").replace("\n","").replace("\t","").replace("\f","");
 | 
	
		
			
				|  |  |         System.out.print("response:"+response+"\r\n");
 | 
	
		
			
				|  |  |         return response;
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | }
 |