Changeset 1252 for trunk


Ignore:
Timestamp:
03/18/19 13:16:46 (5 years ago)
Author:
bln4
Message:

KeyStore instantiation now specifically uses the SunJSSE provider as all versions of Java from 5.0 onwards should have this included. Testing on David's PC to follow.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/auth/Authenticator.java

    r1244 r1252  
    1414import java.security.KeyStoreException;
    1515import java.security.NoSuchAlgorithmException;
     16import java.security.NoSuchProviderException;
    1617import java.security.PublicKey;
    1718import java.security.SecureRandom;
     
    6869        public static boolean Authenticated = false;
    6970       
    70         private final KeyStore keyStore = KeyStore.getInstance(KeystoreType);
     71        private KeyStore keyStore;//KeyStore.getInstance(KeystoreType);
    7172               
    7273        private static final byte[] TRUE = "yes".getBytes();
     
    8283       
    8384        private Authenticator() throws KeyStoreException, FileNotFoundException, IOException, NoSuchAlgorithmException, CertificateException, ClassNotFoundException, SQLException {
     85               
     86                try {
     87                        keyStore = KeyStore.getInstance(KeystoreType, "SunJSSE");
     88                } catch (NoSuchProviderException e) {
     89                        e.printStackTrace();
     90                        return;
     91                }
     92               
    8493                UserSettings.setupDefaultFolders();
    85                
     94                       
    8695                // initialise keystore and actions
    8796                loadKeystore();
     
    111120                Stream<Text> usernameItemsStream = authFrame.getTextItems().stream().filter(t -> t.getData() != null && t.getData().contains("txtUsername"));
    112121                Stream<Text> passwordItemsStream = authFrame.getTextItems().stream().filter(t -> t.getData() != null && t.getData().contains("txtPassword"));
    113                 usernameItemsStream.forEach(txtUsername -> txtUsername.setText(System.getProperty("user.name", "")));
    114                 passwordItemsStream.forEach(txtPassword -> txtPassword.setText(System.getProperty("user.password", "")));
     122                usernameItemsStream.forEach(txtUsername -> txtUsername.setText(System.getProperty("startinguser.name", "")));
     123                passwordItemsStream.forEach(txtPassword -> { txtPassword.setText(""); txtPassword.invalidateAll(); });
    115124                                               
    116125                MessageBay.warningMessages(org.expeditee.actions.Actions.Init());
Note: See TracChangeset for help on using the changeset viewer.