VirtualBox

Changeset 42208 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jul 18, 2012 1:22:38 PM (13 years ago)
Author:
vboxsync
Message:

Main: properly initialize fSettingsCipherKeySet; don't ignore errors during encryption

Location:
trunk/src/VBox/Main/src-server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/MediumImpl.cpp

    r42125 r42208  
    37733773        && !itPln->second.isEmpty())
    37743774    {
    3775         /* Encrypt the plain secret. If that does not work (i.e. no settings key specified),
    3776          * just use the encrypted secret (if there is any). */
     3775        /* Encrypt the plain secret. If that does not work (i.e. no or wrong settings key
     3776         * specified), just use the encrypted secret (if there is any). */
    37773777        int rc = m->pVirtualBox->encryptSetting(itPln->second, &strCiphertext);
    3778         NOREF(rc);
    3779         fHaveInitiatorSecretEncrypted = true;
     3778        if (RT_SUCCESS(rc))
     3779            fHaveInitiatorSecretEncrypted = true;
    37803780    }
    37813781    for (settings::StringsMap::const_iterator it = m->mapProperties.begin();
     
    37933793                data.properties[name] = value;
    37943794        }
    3795         if (fHaveInitiatorSecretEncrypted)
    3796             data.properties["InitiatorSecretEncrypted"] = strCiphertext;
    3797     }
     3795    }
     3796    if (fHaveInitiatorSecretEncrypted)
     3797        data.properties["InitiatorSecretEncrypted"] = strCiphertext;
    37983798
    37993799    /* only for base media */
  • trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp

    r42178 r42208  
    205205          threadAsyncEvent(NIL_RTTHREAD),
    206206          pAsyncEventQ(NULL),
    207           pAutostartDb(NULL)
     207          pAutostartDb(NULL),
     208          fSettingsCipherKeySet(false)
    208209    {
    209210    }
     
    21692170    }
    21702171
    2171     /* fill with random data to have a minimal length */
     2172    /* fill with random data to have a minimal length (salt) */
    21722173    if (i < aCiphertextSize)
    21732174    {
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette