public CertDescription[] makeCertList(String[] aliases) {
		if (keyStore == null) {
			return new CertDescription[] { new CertDescription(null, "", "", "", ""), };
		}

		CertDescription[] result = new CertDescription[aliases.length];
		for (int i = 0; i < aliases.length; i++) {
			final String alias = aliases[i];
			Certificate cert;
			try {
				cert = keyStore.getCertificate(alias);
				X509Certificate x509 = (X509Certificate) cert;

				String purpose = X509PurposeDecoder.decode(x509);
				String principal = x509.getSubjectX500Principal().getName();
				Collection<List<?>> alt = x509.getSubjectAlternativeNames();
				String names = alt == null ? x509.getSubjectX500Principal().toString() : alt.toString();
				String issuer = x509.getIssuerX500Principal().getName();

				result[i] = new CertDescription(alias, principal, purpose, names, issuer);
			} catch (ClassCastException | KeyStoreException | CertificateParsingException e1) {
				result[i] = new CertDescription(alias, "", "", "", "");
			}
		}
		return result;
	}