public Certificate getTrustAnchor(String alias) throws IOException, GeneralSecurityException { if (alias == null) { throw new IllegalArgumentException("Alias must be specified"); //$NON-NLS-1$ } try { KeyStore store = getKeyStore(); synchronized (store) { return store.getCertificate(alias); } } catch (KeyStoreException ke) { throw (CertificateException) new CertificateException(ke.getMessage()).initCause(ke); } }
public Certificate getTrustAnchor(String alias) throws IOException, GeneralSecurityException { if (alias == null) { throw new IllegalArgumentException("Alias must be specified"); //$NON-NLS-1$ } try { KeyStore store = getKeyStore(); synchronized (store) { return store.getCertificate(alias); } } catch (KeyStoreException ke) { throw (CertificateException) new CertificateException(ke.getMessage()).initCause(ke); } }
public Certificate getTrustAnchor(String alias) throws IOException, GeneralSecurityException { if (alias == null) { throw new IllegalArgumentException("Alias must be specified"); //$NON-NLS-1$ } try { KeyStore store = getKeyStore(); synchronized (store) { return store.getCertificate(alias); } } catch (KeyStoreException ke) { throw (CertificateException) new CertificateException(ke.getMessage()).initCause(ke); } }
public Certificate getTrustAnchor(String alias) throws IOException, GeneralSecurityException { if (alias == null) { throw new IllegalArgumentException("Alias must be specified"); //$NON-NLS-1$ } try { KeyStore store = getKeyStore(); synchronized (store) { return store.getCertificate(alias); } } catch (KeyStoreException ke) { throw (CertificateException) new CertificateException(ke.getMessage()).initCause(ke); } }
public Certificate getTrustAnchor(String alias) throws IOException, GeneralSecurityException { if (alias == null) { throw new IllegalArgumentException("Alias must be specified"); //$NON-NLS-1$ } try { KeyStore store = getKeyStore(); synchronized (store) { return store.getCertificate(alias); } } catch (KeyStoreException ke) { throw (CertificateException) new CertificateException(ke.getMessage()).initCause(ke); } }
public Certificate getTrustAnchor(String alias) throws IOException, GeneralSecurityException { if (alias == null) { throw new IllegalArgumentException("Alias must be specified"); //$NON-NLS-1$ } try { KeyStore store = getKeyStore(); synchronized (store) { return store.getCertificate(alias); } } catch (KeyStoreException ke) { throw (CertificateException) new CertificateException(ke.getMessage()).initCause(ke); } }
public Certificate getTrustAnchor(String alias) throws IOException, GeneralSecurityException { if (alias == null) { throw new IllegalArgumentException("Alias must be specified"); //$NON-NLS-1$ } try { KeyStore store = getKeyStore(); synchronized (store) { return store.getCertificate(alias); } } catch (KeyStoreException ke) { throw (CertificateException) new CertificateException(ke.getMessage()).initCause(ke); } }
public Certificate getTrustAnchor(String alias) throws IOException, GeneralSecurityException { if (alias == null) { throw new IllegalArgumentException("Alias must be specified"); //$NON-NLS-1$ } try { KeyStore store = getKeyStore(); synchronized (store) { return store.getCertificate(alias); } } catch (KeyStoreException ke) { throw (CertificateException) new CertificateException(ke.getMessage()).initCause(ke); } }
public String[] getAliases() throws IOException, GeneralSecurityException { List<String> returnList = new ArrayList<>(); try { KeyStore store = getKeyStore(); synchronized (store) { for (Enumeration<String> aliases = store.aliases(); aliases.hasMoreElements();) { String currentAlias = aliases.nextElement(); if (store.isCertificateEntry(currentAlias)) { returnList.add(currentAlias); } } } } catch (KeyStoreException ke) { throw (CertificateException) new CertificateException(ke.getMessage()).initCause(ke); } return returnList.toArray(new String[] {}); }
public String[] getAliases() throws IOException, GeneralSecurityException { List<String> returnList = new ArrayList<String>(); try { KeyStore store = getKeyStore(); synchronized (store) { for (Enumeration<String> aliases = store.aliases(); aliases.hasMoreElements();) { String currentAlias = aliases.nextElement(); if (store.isCertificateEntry(currentAlias)) { returnList.add(currentAlias); } } } } catch (KeyStoreException ke) { throw (CertificateException) new CertificateException(ke.getMessage()).initCause(ke); } return returnList.toArray(new String[] {}); }
public String[] getAliases() throws IOException, GeneralSecurityException { List<String> returnList = new ArrayList<>(); try { KeyStore store = getKeyStore(); synchronized (store) { for (Enumeration<String> aliases = store.aliases(); aliases.hasMoreElements();) { String currentAlias = aliases.nextElement(); if (store.isCertificateEntry(currentAlias)) { returnList.add(currentAlias); } } } } catch (KeyStoreException ke) { throw (CertificateException) new CertificateException(ke.getMessage()).initCause(ke); } return returnList.toArray(new String[] {}); }
public String[] getAliases() throws IOException, GeneralSecurityException { List<String> returnList = new ArrayList<String>(); try { KeyStore store = getKeyStore(); synchronized (store) { for (Enumeration<String> aliases = store.aliases(); aliases.hasMoreElements();) { String currentAlias = aliases.nextElement(); if (store.isCertificateEntry(currentAlias)) { returnList.add(currentAlias); } } } } catch (KeyStoreException ke) { throw (CertificateException) new CertificateException(ke.getMessage()).initCause(ke); } return returnList.toArray(new String[] {}); }
public String[] getAliases() throws IOException, GeneralSecurityException { List<String> returnList = new ArrayList<String>(); try { KeyStore store = getKeyStore(); synchronized (store) { for (Enumeration<String> aliases = store.aliases(); aliases.hasMoreElements();) { String currentAlias = aliases.nextElement(); if (store.isCertificateEntry(currentAlias)) { returnList.add(currentAlias); } } } } catch (KeyStoreException ke) { throw (CertificateException) new CertificateException(ke.getMessage()).initCause(ke); } return returnList.toArray(new String[] {}); }
public String[] getAliases() throws IOException, GeneralSecurityException { List<String> returnList = new ArrayList<String>(); try { KeyStore store = getKeyStore(); synchronized (store) { for (Enumeration<String> aliases = store.aliases(); aliases.hasMoreElements();) { String currentAlias = aliases.nextElement(); if (store.isCertificateEntry(currentAlias)) { returnList.add(currentAlias); } } } } catch (KeyStoreException ke) { throw (CertificateException) new CertificateException(ke.getMessage()).initCause(ke); } return returnList.toArray(new String[] {}); }
public String[] getAliases() throws IOException, GeneralSecurityException { List<String> returnList = new ArrayList<String>(); try { KeyStore store = getKeyStore(); synchronized (store) { for (Enumeration<String> aliases = store.aliases(); aliases.hasMoreElements();) { String currentAlias = aliases.nextElement(); if (store.isCertificateEntry(currentAlias)) { returnList.add(currentAlias); } } } } catch (KeyStoreException ke) { throw (CertificateException) new CertificateException(ke.getMessage()).initCause(ke); } return returnList.toArray(new String[] {}); }
public String[] getAliases() throws IOException, GeneralSecurityException { List<String> returnList = new ArrayList<String>(); try { KeyStore store = getKeyStore(); synchronized (store) { for (Enumeration<String> aliases = store.aliases(); aliases.hasMoreElements();) { String currentAlias = aliases.nextElement(); if (store.isCertificateEntry(currentAlias)) { returnList.add(currentAlias); } } } } catch (KeyStoreException ke) { throw (CertificateException) new CertificateException(ke.getMessage()).initCause(ke); } return returnList.toArray(new String[] {}); }
protected void doRemoveTrustAnchor(Certificate cert) throws IOException, GeneralSecurityException { if (isReadOnly()) throw new IOException(SignedContentMessages.Default_Trust_Read_Only); if (cert == null) { throw new IllegalArgumentException("Certificate must be specified"); //$NON-NLS-1$ } try { KeyStore store = getKeyStore(); synchronized (store) { String alias = store.getCertificateAlias(cert); if (alias == null) { throw new CertificateException(SignedContentMessages.Default_Trust_Cert_Not_Found); } removeTrustAnchor(alias); } } catch (KeyStoreException ke) { throw (CertificateException) new CertificateException(ke.getMessage()).initCause(ke); } }
protected void doRemoveTrustAnchor(Certificate cert) throws IOException, GeneralSecurityException { if (isReadOnly()) throw new IOException(SignedContentMessages.Default_Trust_Read_Only); if (cert == null) { throw new IllegalArgumentException("Certificate must be specified"); //$NON-NLS-1$ } try { KeyStore store = getKeyStore(); synchronized (store) { String alias = store.getCertificateAlias(cert); if (alias == null) { throw new CertificateException(SignedContentMessages.Default_Trust_Cert_Not_Found); } removeTrustAnchor(alias); } } catch (KeyStoreException ke) { throw (CertificateException) new CertificateException(ke.getMessage()).initCause(ke); } }
protected void doRemoveTrustAnchor(Certificate cert) throws IOException, GeneralSecurityException { if (isReadOnly()) throw new IOException(SignedContentMessages.Default_Trust_Read_Only); if (cert == null) { throw new IllegalArgumentException("Certificate must be specified"); //$NON-NLS-1$ } try { KeyStore store = getKeyStore(); synchronized (store) { String alias = store.getCertificateAlias(cert); if (alias == null) { throw new CertificateException(SignedContentMessages.Default_Trust_Cert_Not_Found); } removeTrustAnchor(alias); } } catch (KeyStoreException ke) { throw (CertificateException) new CertificateException(ke.getMessage()).initCause(ke); } }
protected void doRemoveTrustAnchor(Certificate cert) throws IOException, GeneralSecurityException { if (isReadOnly()) throw new IOException(SignedContentMessages.Default_Trust_Read_Only); if (cert == null) { throw new IllegalArgumentException("Certificate must be specified"); //$NON-NLS-1$ } try { KeyStore store = getKeyStore(); synchronized (store) { String alias = store.getCertificateAlias(cert); if (alias == null) { throw new CertificateException(SignedContentMessages.Default_Trust_Cert_Not_Found); } removeTrustAnchor(alias); } } catch (KeyStoreException ke) { throw (CertificateException) new CertificateException(ke.getMessage()).initCause(ke); } }