mirror of https://github.com/procxx/kepka.git
Fixed build against OpenSSL 1.1.
Patch backported from https://github.com/grishka/libtgvoip/pull/31 pull request. Original patch by: Nicholas Guriev <guriev-ns@ya.ru> Closes #43.
This commit is contained in:
parent
3c309a5f3b
commit
03eb0169b3
|
@ -103,9 +103,12 @@ bool VoIPController::didInitWin32TimeScale = false;
|
|||
#define SHA256_LENGTH 32
|
||||
|
||||
#ifndef TGVOIP_USE_CUSTOM_CRYPTO
|
||||
extern "C" {
|
||||
#include <openssl/sha.h>
|
||||
#include <openssl/aes.h>
|
||||
#include <openssl/modes.h>
|
||||
#include <openssl/rand.h>
|
||||
}
|
||||
|
||||
void tgvoip_openssl_aes_ige_encrypt(uint8_t* in, uint8_t* out, size_t length, uint8_t* key, uint8_t* iv){
|
||||
AES_KEY akey;
|
||||
|
@ -134,7 +137,7 @@ void tgvoip_openssl_sha256(uint8_t* msg, size_t len, uint8_t* output){
|
|||
void tgvoip_openssl_aes_ctr_encrypt(uint8_t* inout, size_t length, uint8_t* key, uint8_t* iv, uint8_t* ecount, uint32_t* num){
|
||||
AES_KEY akey;
|
||||
AES_set_encrypt_key(key, 32*8, &akey);
|
||||
AES_ctr128_encrypt(inout, inout, length, &akey, iv, ecount, num);
|
||||
CRYPTO_ctr128_encrypt(inout, inout, length, &akey, iv, ecount, num, (block128_f) AES_encrypt);
|
||||
}
|
||||
|
||||
voip_crypto_functions_t VoIPController::crypto={
|
||||
|
|
Loading…
Reference in New Issue