Ignore:
Timestamp:
01/31/19 16:34:06 (5 years ago)
Author:
bln4
Message:

org.expeditee.auth.EncryptedExpReader ->
org.expeditee.auth.EncryptedExpWriter ->
Actions ->
AttributeUtils ->
Frame ->
FrameIO ->
UserSettings ->

Changed how reading and writing encrypted files worked. A Frame attribute is now consulted to determine what to use as key for encryption. The 'profile' attribute setting is used to signal that the users personal aes key is used. Further enhancement will mean that other labels will be able to be used.


Actions ->

MailMode action now consults the database to reaquire the mail.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/gui/FrameIO.java

    r1219 r1227  
    4343import org.expeditee.auth.Authenticator;
    4444import org.expeditee.auth.EncryptedExpReader;
    45 import org.expeditee.auth.EncryptedProfileExpWriter;
     45import org.expeditee.auth.EncryptedExpWriter;
    4646import org.expeditee.auth.gui.MailBay;
    4747import org.expeditee.io.Conversion;
     
    9292                STATISTICS_DIR = PARENT_FOLDER + "statistics" + File.separator;
    9393                LOGS_DIR = PARENT_FOLDER + "logs" + File.separator;
     94                SHARED_BY_ME_FRAMESETS = PARENT_FOLDER + "framesets-shared-by-me" + File.separator;
     95                SHARED_WITH_ME_FRAMESETS = PARENT_FOLDER + "framesets-shared-with-me" + File.separator;
    9496        }
    9597
     
    125127
    126128        public static String STATISTICS_DIR;
     129       
     130        public static String SHARED_BY_ME_FRAMESETS;
     131       
     132        public static String SHARED_WITH_ME_FRAMESETS;
    127133
    128134        public static String LOGS_DIR;
     
    475481                        if (fullPath.endsWith(ExpReader.EXTENTION)) {
    476482                                if (EncryptedExpReader.isEncryptedExpediteeFile(fullPath)) {
    477                                         final boolean isProfile = frameName.startsWith(UserSettings.UserName.get());
    478                                         reader = new EncryptedExpReader(frameName, isProfile);
     483                                        //final boolean isProfile = frameName.startsWith(UserSettings.UserName.get());
     484                                        //reader = new EncryptedExpReader(frameName, isProfile);
     485                                        reader = new EncryptedExpReader(frameName);
    479486                                } else {
    480487                                        reader = new ExpReader(frameName);
     
    10061013                        // if its a new frame or an existing Exp frame...
    10071014                        if (fullPath == null || fullPath.endsWith(ExpReader.EXTENTION)) {
    1008                                 //Frame currentFrame = DisplayController.getCurrentFrame();
    10091015                                if (UserSettings.Authenticated.get() &&
    1010                                                 toSave.getName().startsWith(UserSettings.UserName.get()) &&
    1011                                                 toSave.getNumber() != Authenticator.PUBLIC_KEY_FRAME) {
    1012                                         writer = new EncryptedProfileExpWriter();
     1016                                                toSave.getNumber() != Authenticator.PUBLIC_KEY_FRAME &&
     1017                                                toSave.getEncryptionLabel() != null) {
     1018                                        writer = new EncryptedExpWriter(toSave.getEncryptionLabel());
    10131019                                        savedVersion = EncryptedExpReader.getVersion(fullPath);
    10141020                                } else {
Note: See TracChangeset for help on using the changeset viewer.