Code example for KeyStore

Methods: getCertificate

0
		params.setRevocationEnabled(false); // to avoid exception on empty CRL 
		// Validate certificate path 
		CertPathValidator validator = CertPathValidator.getInstance("PKIX"); 
		CertPathValidatorResult result = validator.validate(certPath, params); 
		 */ 
		X509Certificate senderCert=(X509Certificate) store.getCertificate(signerCert);
		return senderCert;
	} 
	protected JSONObject rebuildJSON(JSONObject oldOne) throws JSONException{
	   JSONObject newOne=new JSONObject();
	   Iterator keys=oldOne.keys();
	   String index=null;
	   while(keys.hasNext()){
		   index=(String) keys.next();
		   newOne.putOpt(index, oldOne.opt(index));
	   } 
	   return (newOne.length()>0)? newOne:null;
	} 
}