Code example for X509Certificate

Methods: getSubjectDN

0
		//We should do some checking here 
		if(signer==null||Cert==null) Log.d(TAG, "Invalid key or certificate");
		senderKey=(signer!=null)? signer:null;
		senderCert=(Cert!=null)? Cert:null;
		//How to get the signer identity from the certificate? 
		if(Cert !=null) issuer=(Cert.getSubjectDN().getName()==null)? "testing writer":Cert.getSubjectDN().getName();
		else issuer="testing writer";
	} 
	public String getIssuerName(){ return issuer; }
	 
//Part 1: data handling functions 
	/** 
	 * Insert data 
	 * @param id the id of this data 
	 * @param format MIME type of the inserted data 
	 * @param value The data. For text data, it should be String. For image data, it should be a bitmap 
	 * @param overwrite whether to overwrite previous record 
	 * @throws Exception if the insertion is not successful 
	 */ 
	public void insertData(String id, String format, Object value, boolean overwrite) throws Exception{
		if(id.length()<=0||format.length()<=0||value== null) throw new Exception("wrong input");