Changeset 54591 in vbox for trunk/include
- Timestamp:
- Mar 2, 2015 7:55:29 PM (10 years ago)
- Location:
- trunk/include/VBox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vd-ifs.h
r54403 r54591 4 4 5 5 /* 6 * Copyright (C) 2011-201 2Oracle Corporation6 * Copyright (C) 2011-2015 Oracle Corporation 7 7 * 8 8 * This file is part of VirtualBox Open Source Edition (OSE), as … … 795 795 796 796 /** 797 * Checks whether a given key is existing. 798 * 799 * @return true if the key exists. 800 * @return false if the key does not exist. 801 * @param pCfgIf Pointer to configuration callback table. 802 * @param pszName Name of the key. 803 */ 804 DECLINLINE(bool) VDCFGIsKeyExisting(PVDINTERFACECONFIG pCfgIf, const char *pszName) 805 { 806 size_t cb = 0; 807 int rc = pCfgIf->pfnQuerySize(pCfgIf->Core.pvUser, pszName, &cb); 808 return rc == VERR_CFGM_VALUE_NOT_FOUND ? false : true; 809 } 810 811 /** 797 812 * Query configuration, unsigned 64-bit integer value with default. 798 813 * … … 1431 1446 1432 1447 /** 1433 * Gets the password to open a key store supplied through theonfig interface.1448 * Gets a reference to the password identified by the given ID to open a key store supplied through the config interface. 1434 1449 * 1435 1450 * @returns VBox status code. 1436 1451 * @param pvUser The opaque user data associated with this interface. 1452 * @param pszId The alias/id for the password to retain. 1437 1453 * @param ppszPassword Where to store the password to unlock the key store on success. 1438 1454 */ 1439 DECLR3CALLBACKMEMBER(int, pfnKeyStoreGetPassword, (void *pvUser, const char **ppszPassword)); 1455 DECLR3CALLBACKMEMBER(int, pfnKeyStorePasswordRetain, (void *pvUser, const char *pszId, const char **ppszPassword)); 1456 1457 /** 1458 * Releases a reference of the password previously acquired with VDINTERFACECRYPTO::pfnKeyStorePasswordRetain() 1459 * identified by the given ID. 1460 * 1461 * @returns VBox status code. 1462 * @param pvUser The opaque user data associated with this interface. 1463 * @param pszId The alias/id for the password to release. 1464 */ 1465 DECLR3CALLBACKMEMBER(int, pfnKeyStorePasswordRelease, (void *pvUser, const char *pszId)); 1440 1466 1441 1467 /** … … 1510 1536 1511 1537 /** 1512 * @copydoc VDINTERFACECRYPTO::pfnKeyStoreGetPassword 1513 */ 1514 DECLINLINE(int) vdIfCryptoKeyStoreGetPassword(PVDINTERFACECRYPTO pIfCrypto, const char **ppszPassword) 1515 { 1516 return pIfCrypto->pfnKeyStoreGetPassword(pIfCrypto->Core.pvUser, ppszPassword); 1538 * @copydoc VDINTERFACECRYPTO::pfnKeyStorePasswordRetain 1539 */ 1540 DECLINLINE(int) vdIfCryptoKeyStorePasswordRetain(PVDINTERFACECRYPTO pIfCrypto, const char *pszId, const char **ppszPassword) 1541 { 1542 return pIfCrypto->pfnKeyStorePasswordRetain(pIfCrypto->Core.pvUser, pszId, ppszPassword); 1543 } 1544 1545 /** 1546 * @copydoc VDINTERFACECRYPTO::pfnKeyStorePasswordRelease 1547 */ 1548 DECLINLINE(int) vdIfCryptoKeyStorePasswordRelease(PVDINTERFACECRYPTO pIfCrypto, const char *pszId) 1549 { 1550 return pIfCrypto->pfnKeyStorePasswordRelease(pIfCrypto->Core.pvUser, pszId); 1517 1551 } 1518 1552 -
trunk/include/VBox/vmm/pdmifs.h
r53965 r54591 4 4 5 5 /* 6 * Copyright (C) 2006-201 4Oracle Corporation6 * Copyright (C) 2006-2015 Oracle Corporation 7 7 * 8 8 * This file is part of VirtualBox Open Source Edition (OSE), as … … 1396 1396 */ 1397 1397 DECLR3CALLBACKMEMBER(int, pfnKeyRelease, (PPDMISECKEY pInterface, const char *pszId)); 1398 1399 /** 1400 * Retains a password identified by the ID. The caller will only hold a reference 1401 * to the password and must not modify the buffer in any way. 1402 * 1403 * @returns VBox status code. 1404 * @param pInterface Pointer to this interface. 1405 * @param pszId The alias/id for the password to retrieve. 1406 * @param ppszPassword Where to store the pointer to the password on success. 1407 */ 1408 DECLR3CALLBACKMEMBER(int, pfnPasswordRetain, (PPDMISECKEY pInterface, const char *pszId, 1409 const char **ppszPassword)); 1410 1411 /** 1412 * Releases one reference of the password identified by the given identifier. 1413 * The caller must not access the password after calling this operation. 1414 * 1415 * @returns VBox status code. 1416 * @param pInterface Pointer to this interface. 1417 * @param pszId The alias/id for the password to release. 1418 * 1419 * @note: It is advised to release the password whenever it is not used anymore so the entity 1420 * storing the password can do anything to make retrieving the password from memory more 1421 * difficult like scrambling the memory buffer for instance. 1422 */ 1423 DECLR3CALLBACKMEMBER(int, pfnPasswordRelease, (PPDMISECKEY pInterface, const char *pszId)); 1398 1424 } PDMISECKEY; 1399 1425 /** PDMISECKEY interface ID. */ 1400 #define PDMISECKEY_IID " a7336c4a-2ca0-489d-ad2d-f740f215a1e6"1426 #define PDMISECKEY_IID "3d698355-d995-453d-960f-31566a891df2" 1401 1427 1402 1428 /** Pointer to a secret key helper interface. */
Note:
See TracChangeset
for help on using the changeset viewer.