VirtualBox

Changeset 74712 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Oct 9, 2018 10:02:18 AM (6 years ago)
Author:
vboxsync
Message:

IPRT/crypto: 2nd attempt at dealing with system openssl where RC4_INT is defined as something other than "unsigned int" (which isn't available in include/iprt/crypto/rc4.h, so there's no other option than relaxing the compile time assertion) in these cases.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/crypto/rc4-openssl.cpp

    r74295 r74712  
    4242RTDECL(void) RTCrRc4SetKey(PRTCRRC4KEY pKey, size_t cbData, void const *pvData)
    4343{
    44     AssertCompile(sizeof(pKey->au64Padding) == sizeof(pKey->Ossl));
     44
     45    AssertCompile(sizeof(RC4_INT) == 4 ? sizeof(pKey->au64Padding) == sizeof(pKey->Ossl) : sizeof(pKey->au64Padding) >= sizeof(pKey->Ossl));
    4546    Assert((int)cbData == (ssize_t)cbData);
    4647    AssertPtr(pKey);
     
    5253RTDECL(void) RTCrRc4(PRTCRRC4KEY pKey, size_t cbData, void const *pvDataIn, void *pvDataOut)
    5354{
    54     AssertCompile(sizeof(pKey->au64Padding) == sizeof(pKey->Ossl));
     55    AssertCompile(sizeof(RC4_INT) == 4 ? sizeof(pKey->au64Padding) == sizeof(pKey->Ossl) : sizeof(pKey->au64Padding) >= sizeof(pKey->Ossl));
    5556    Assert((int)cbData == (ssize_t)cbData);
    5657    AssertPtr(pKey);
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