VirtualBox

Changeset 74712 in vbox


Ignore:
Timestamp:
Oct 9, 2018 10:02:18 AM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
125633
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.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/crypto/rc4.h

    r74711 r74712  
    4040typedef union RTCRRC4KEY
    4141{
    42     uint64_t    au64Padding[(2 + 256) * sizeof(RC4_INT) / 8];
     42    uint64_t    au64Padding[(2 + 256) / 2];
    4343#ifdef HEADER_RC4_H
    4444    RC4_KEY     Ossl;
  • 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