VirtualBox

Changeset 73807 in vbox for trunk/src/VBox/Runtime


Ignore:
Timestamp:
Aug 22, 2018 8:02:29 AM (6 years ago)
Author:
vboxsync
Message:

tstRTCrPkix-1: Forgot to update the digest with the text we wanted to sign (been signing empty messages till now). bugref:9152

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/testcase/tstRTCrPkix-1.cpp

    r73749 r73807  
    342342            static struct { void const *pv; size_t cb; } const s_aTexts[] =
    343343            {
     344                {  RT_STR_TUPLE("") },
    344345                {  RT_STR_TUPLE("IPRT") },
    345346                {  RT_STR_TUPLE("abcdef") },
     
    355356                if (RT_SUCCESS(rc))
    356357                {
     358                    RTTESTI_CHECK_RC(RTCrDigestUpdate(hDigest, s_aTexts[iText].pv, s_aTexts[iText].cb), VINF_SUCCESS);
     359
    357360                    rc = RTCrPkixSignatureSign(hSign, hDigest, abSignature, &cbSignature);
    358361                    if (RT_SUCCESS(rc))
     
    367370                        RTTestIFailed("RTCrPkixSignatureSign failed with %Rrc for %u bits MD with %u bits key (%s)",
    368371                                      rc, s_aSignatures[iSig].cBits, g_aKeyPairs[i].cBits, s_aSignatures[iSig].pszObjId);
     372                    RTCrDigestRelease(hDigest);
    369373                }
    370374                else
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