Skip to content

Commit a86209e

Browse files
authored
Merge pull request #1476 from dpogue/openssl-warning-fix
Silence OpenSSL RC4 deprecation warnings
2 parents 6c15dab + 02117ff commit a86209e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Sources/Plasma/NucleusLib/pnUtils/pnUtCrypt.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,11 @@ static void Rc4Codec (
9595
) {
9696
// RC4 uses the same algorithm to both encrypt and decrypt
9797
uint8_t * temp = (uint8_t *)malloc(bytes);
98+
99+
IGNORE_WARNINGS_BEGIN("deprecated-declarations")
98100
RC4((RC4_KEY *)key->handle, bytes, (const unsigned char *)data, temp);
101+
IGNORE_WARNINGS_END
102+
99103
memcpy(data, temp, bytes);
100104

101105
free(temp);
@@ -119,8 +123,11 @@ CryptKey * CryptKeyCreate (
119123
CryptKey * key = nullptr;
120124
switch (algorithm) {
121125
case kCryptRc4: {
126+
IGNORE_WARNINGS_BEGIN("deprecated-declarations")
122127
RC4_KEY * rc4 = new RC4_KEY;
123128
RC4_set_key(rc4, bytes, (const unsigned char *)data);
129+
IGNORE_WARNINGS_END
130+
124131
key = new CryptKey;
125132
key->algorithm = kCryptRc4;
126133
key->handle = rc4;

0 commit comments

Comments
 (0)