public KeyStore getCaCertKeystore() {
        try {
            KeyStore returnKeyStore = KeyStore.getInstance(KeyStore.getDefaultType());
            returnKeyStore.load(null, null);
            Enumeration<String> e = CACertService.caCertKeystore.aliases();
            while(e.hasMoreElements()) {
                Certificate cert = CACertService.caCertKeystore.getCertificate(e.nextElement());
                returnKeyStore.setCertificateEntry(((X509Certificate) cert).getSubjectDN().toString(), cert);
            }
            return CACertService.caCertKeystore;
        } catch (KeyStoreException e) {
            return null;
        } catch (CertificateException e) {
            return null;
        } catch (NoSuchAlgorithmException e) {
            return null;
        } catch (IOException e) {
            return null;
        }
    }
public KeyStore getCaCertKeystore ( ) { try { KeyStore returnKeyStore = KeyStore . getInstance ( KeyStore . getDefaultType ( ) ) ; returnKeyStore . load ( null , null ) ; Enumeration < String > e = CACertService . caCertKeystore . aliases ( ) ; while ( e . hasMoreElements ( ) ) { Certificate cert = CACertService . caCertKeystore . getCertificate ( e . nextElement ( ) ) ; returnKeyStore . setCertificateEntry ( ( ( X509Certificate ) cert ) . getSubjectDN ( ) . toString ( ) , cert ) ; } return CACertService . caCertKeystore ; } catch ( KeyStoreException e ) { return null ; } catch ( CertificateException e ) { return null ; } catch ( NoSuchAlgorithmException e ) { return null ; } catch ( IOException e ) { return null ; } }
Get a copy of the currently loaded CA Certificate KeyStore

@return Copy of currently loaded CA Certificate KeyStore