VirtualBox

Changeset 102353 in vbox


Ignore:
Timestamp:
Nov 28, 2023 7:36:46 AM (12 months ago)
Author:
vboxsync
Message:

Main/tstUnattendedScript: Override RTCrShaCryptGenerateSalt() from IPRT to generate predictable salts to compare the script outputs. bugref:10551

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/testcase/tstUnattendedScript.cpp

    r102224 r102353  
    3434#include <VBox/com/VirtualBox.h>
    3535#include <VBox/com/errorprint.h>
     36
     37#include <iprt/crypto/shacrypt.h>
    3638
    3739#include <iprt/file.h>
     
    663665}
    664666
     667/* Override RTCrShaCryptGenerateSalt() from IPRT to generate predictable salts to compare the script outputs. */
     668RTR3DECL(int) RTCrShaCryptGenerateSalt(char szSalt[RT_SHACRYPT_MAX_SALT_LEN + 1], size_t cchSalt)
     669{
     670    RT_NOREF(cchSalt);
     671    RTStrPrintf(szSalt, RT_SHACRYPT_MAX_SALT_LEN, "testcase123");
     672    return VINF_SUCCESS;
     673}
     674
    665675
    666676/*********************************************************************************************************************************
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