Skip to content

Commit

Permalink
Fix: install libssl bug.
Browse files Browse the repository at this point in the history
Because -DX_VCPKG_APPLOCAL_DEPS_INSTALL:BOOL=ON install dependencies.
So the pragram must include the functions of the dependencies libraries.
  • Loading branch information
KangLin committed Feb 23, 2024
1 parent aa7b64d commit 673aa91
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### Version: v2.0.2
+ Fix: install libssl.dll

### Version: v2.0.1
+ Update: fix show progressBar
+ Use CDownLoad to down the image of contribute in CDlgAbout
Expand Down
5 changes: 5 additions & 0 deletions ChangeLog_zh_CN.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
### 版本: v2.0.2
+ 修复安装依赖库 libssl 。
因为 -DX_VCPKG_APPLOCAL_DEPS_INSTALL:BOOL=ON
安装依赖库。所以需要在程序中引用。

### 版本: v2.0.1
+ 修复更新中的下载进度条错误
+ 关于对话框中使用 CDownLoad 下载捐赠图片
Expand Down
10 changes: 10 additions & 0 deletions Src/EvpAES.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "EvpAES.h"
#include <openssl/evp.h>
#include <openssl/aes.h>
#include <openssl/ssl.h>

#define KEY_SIZE_16B 16
#define KEY_SIZE_24B 24
Expand Down Expand Up @@ -359,3 +360,12 @@ bool EvpAES::encrypt(const QByteArray &in, QByteArray &out,
return true;
}
}

//TODO: only install the dependencies libraries(libssl)
int EvpAES::testSSL()
{
SSL_CTX *ssl_ctx = SSL_CTX_new(TLS_client_method());
if(ssl_ctx)
SSL_CTX_free(ssl_ctx);
return 0;
}
3 changes: 3 additions & 0 deletions Src/EvpAES.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ class EvpAES
bool encrypt(const QByteArray& in, QByteArray& out,
const QByteArray& key, const QByteArray& ivec,
const EVP_CIPHER *cipher, bool enc = true);

//TODO: only install the dependencies libraries(libssl)
int testSSL();

private:
EVP_CIPHER_CTX *ctx;
Expand Down

0 comments on commit 673aa91

Please sign in to comment.