Ignore:
Timestamp:
03/17/19 22:29:23 (5 years ago)
Author:
davidb
Message:

After change to have resources-public and resources-private, some changes needed to support running Expeditee for a single user; other main change is to allow FrameDirs to specify relative directory paths, to help with when Expeditee is run on the cloud -- similar work still needs to occurr for ImageDir and AudioDir; some other minor changes also made.

File:
1 edited

Legend:

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

    r1243 r1244  
    180180        }
    181181       
    182         final SecretKey getSecretKey(final String label, final String password) throws NoSuchAlgorithmException, KeyStoreException {           
    183                 final KeyStore.ProtectionParameter entryPassword = new KeyStore.PasswordProtection(password.toCharArray());
    184                 KeyStore.SecretKeyEntry entry = null;
     182        final SecretKey getSecretKey(final String label, final String password) throws NoSuchAlgorithmException, KeyStoreException {   
     183               
     184                char[] password_ca = password.toCharArray();
     185                final KeyStore.ProtectionParameter entryPassword = new KeyStore.PasswordProtection(password_ca);
     186               
     187                SecretKey secret_key;
    185188                try {
    186                         entry = (SecretKeyEntry) keyStore.getEntry(label, entryPassword);
     189                        SecretKeyEntry entry = (SecretKeyEntry) keyStore.getEntry(label, entryPassword);
     190                        secret_key = entry.getSecretKey();
     191                       
    187192                } catch (final UnrecoverableEntryException e) {
    188                         entry = null;
    189                 }
    190                 if (entry == null) { return null; }
    191                 else { return entry.getSecretKey(); }
     193                        secret_key = null;
     194                }
     195               
     196                return secret_key;
    192197        }
    193198       
Note: See TracChangeset for help on using the changeset viewer.