VirtualBox

Changeset 42977 in vbox for trunk/src


Ignore:
Timestamp:
Aug 24, 2012 2:00:25 PM (12 years ago)
Author:
vboxsync
Message:

VBoxCertUtil: Fixed running on Windows XP guests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/tools/VBoxCertUtil.cpp

    r42974 r42977  
    248248            RTMsgInfo("Opening store %#x:'%s'", dwDst, pszStoreNm);
    249249
     250        /*
     251         * Make sure CERT_STORE_OPEN_EXISTING_FLAG is not set. This causes Windows XP
     252         * to return ACCESS_DENIED when installing TrustedPublisher certificates via
     253         * CertAddCertificateContextToStore() if the TrustedPublisher store never has
     254         * been used (through certmgr.exe and friends) yet.
     255         *
     256         * According to MSDN, if neither CERT_STORE_OPEN_EXISTING_FLAG nor
     257         * CERT_STORE_CREATE_NEW_FLAG is set, the store will be either opened or
     258         * created accordingly.
     259         */
     260        dwDst &= ~CERT_STORE_OPEN_EXISTING_FLAG;
     261
    250262        hStore = CertOpenStore(CERT_STORE_PROV_SYSTEM_W,
    251263                               PKCS_7_ASN_ENCODING | X509_ASN_ENCODING,
    252264                               NULL /* hCryptProv = default */,
    253                                dwDst | CERT_STORE_OPEN_EXISTING_FLAG,
     265                               dwDst,
    254266                               pwszStoreNm);
    255267        if (hStore == NULL)
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