@@ -111,18 +111,27 @@ public SecDispatcher.ValidationResponse validateConfiguration(Map<String, String
111111 HashMap <SecDispatcher .ValidationResponse .Level , List <String >> report = new HashMap <>();
112112 boolean valid = false ;
113113 try {
114- String mp = getMasterPassword ();
115- if (mp == null ) {
114+ String mpe = getMasterMasterPasswordFromSettingsSecurityXml ();
115+ if (mpe == null ) {
116116 report .computeIfAbsent (SecDispatcher .ValidationResponse .Level .ERROR , k -> new ArrayList <>())
117- .add ("Master Password not found" );
117+ .add ("Legacy configuration not found or does not contain encrypted master password " );
118118 } else {
119119 report .computeIfAbsent (SecDispatcher .ValidationResponse .Level .INFO , k -> new ArrayList <>())
120- .add ("Master Password found and decrypted" );
121- valid = true ;
120+ .add ("Legacy configuration found and contain encrypted master password" );
121+
122+ String mp = getMasterPassword ();
123+ if (mp == null ) {
124+ report .computeIfAbsent (SecDispatcher .ValidationResponse .Level .ERROR , k -> new ArrayList <>())
125+ .add ("Master Password not found" );
126+ } else {
127+ report .computeIfAbsent (SecDispatcher .ValidationResponse .Level .INFO , k -> new ArrayList <>())
128+ .add ("Master Password successfully decrypted" );
129+ valid = true ;
130+ }
122131 }
123132 } catch (PlexusCipherException e ) {
124133 report .computeIfAbsent (SecDispatcher .ValidationResponse .Level .ERROR , k -> new ArrayList <>())
125- .add ("Master Password could not be decrypted " );
134+ .add ("Master Password decryption failed " );
126135 }
127136 return new SecDispatcher .ValidationResponse (getClass ().getSimpleName (), valid , report , List .of ());
128137 }
0 commit comments