Code example for X509Certificate

Methods: checkValidity

0
		    } else if (certs.size() > 1) {
		      throw new CertificateException("Intermediate certificate is not allowed");
		    } 
		    if (certs.get(0) instanceof X509Certificate) {
		      X509Certificate cert = (X509Certificate)certs.get(0);
		      cert.checkValidity();
		      return cert;
		    } else { 
		      throw new CertificateException("Certificate is not X509Certificate");
		    } 
		  } 
	   
	   
	  public static KeyStore loadKeyStore(Context context) throws KeyStoreException, NoSuchAlgorithmException, CertificateException, FileNotFoundException, IOException, NoSuchProviderException{
			/* 
			 * Original implementation. 
				I refer the following sites about the default keystore. 
				http://wiki.livedoor.jp/syo1976/d/javassl 
				http://d.hatena.ne.jp/Kazzz/20110319/p1 
			 */ 
			KeyStore certstore;