Package java.security

Examples of java.security.KeyStore.deleteEntry()


            FileInputStream fsIn = new FileInputStream( pathToKeystore );
            KeyStore certStore = KeyStore.getInstance( "JKS" );
            certStore.load( fsIn, keystorePassword.toCharArray());

            if ( certStore.containsAlias( accessKey[0] )) {
                certStore.deleteEntry( accessKey[0] );
                FileOutputStream fsOut = new FileOutputStream( pathToKeystore );
                certStore.store( fsOut, keystorePassword.toCharArray());

                // -> dis-associate the cert's uniqueId with the Cloud API keys
                /*              UserCredentialsDao credentialDao = new UserCredentialsDao();
View Full Code Here


            FileInputStream fsIn = new FileInputStream( pathToKeystore );
            KeyStore certStore = KeyStore.getInstance( "JKS" );
            certStore.load( fsIn, keystorePassword.toCharArray());

            if ( certStore.containsAlias( accessKey[0] )) {
                certStore.deleteEntry( accessKey[0] );
                FileOutputStream fsOut = new FileOutputStream( pathToKeystore );
                certStore.store( fsOut, keystorePassword.toCharArray());

                // -> dis-associate the cert's uniqueId with the Cloud API keys
                /*              UserCredentialsDao credentialDao = new UserCredentialsDao();
View Full Code Here

                    try {
                        String msg;
                        KeyStore ks = PlatformHookWindows.getRootKeystore();
                        if (ks.containsAlias(RemoteControlHttpsServer.ENTRY_ALIAS)) {
                            Main.info(tr("Removing certificate {0} from root keystore.", RemoteControlHttpsServer.ENTRY_ALIAS));
                            ks.deleteEntry(RemoteControlHttpsServer.ENTRY_ALIAS);
                            msg = tr("Certificate has been successfully uninstalled.");
                        } else {
                            msg = tr("Certificate is not installed. Nothing to do.");
                        }
                        Main.info(msg);
View Full Code Here

            message.append("</html>");
            JOptionPane.showMessageDialog(Main.parent, message.toString(), tr("Warning"), JOptionPane.WARNING_MESSAGE);
            for (String alias : insecureCertificates) {
                Main.warn(tr("Removing insecure certificate from {0} keystore: {1}", WINDOWS_ROOT, alias));
                try {
                    ks.deleteEntry(alias);
                } catch (KeyStoreException e) {
                    Main.error(tr("Unable to remove insecure certificate from keystore: {0}", e.getMessage()));
                }
            }
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.