feat(ViperOpenSSLProject): 以模板新建 OpenSSL FFI 测试工程(版本+摘要 demo,链接目标待定)
This commit is contained in:
1 parent
ab068df348
commit
dee1e19c62
5 files changed
+164
No files matched your search
@@ -0,0 +1,48 @@
|
||||
# ViperOpenSSLProject
|
||||
|
||||
基于 [ViperTemplateProject](../ViperTemplateProject) 模板创建的 **OpenSSL 3.x FFI 测试工程**,
|
||||
用来验证 `includes/openssl` FFI 层(摘要/哈希、EVP、证书 PKI、SSL/TLS)的链接与调用。
|
||||
|
||||
## 说明
|
||||
|
||||
- FFI 层源码在 `../includes/openssl/`(`import openssl` 使用)。
|
||||
- 当前 App/main.vp 为「版本 + SHA256/MD5 摘要」演示。
|
||||
- 尚未决定链接目标(msys2 预装 3.6.2 动态库 或 openssl_358_C 自编译静态库),
|
||||
本工程 `project.vpj` **暂未配置 openssl 链接参数**,需要时再补。
|
||||
|
||||
## 目录结构
|
||||
|
||||
```
|
||||
ViperOpenSSLProject/
|
||||
├── .gitignore
|
||||
├── LICENSE
|
||||
├── README.md
|
||||
├── project.vpj # 编译/链接配置(openssl 链接目标待定)
|
||||
└── App/
|
||||
└── main.vp # 版本 + 摘要演示
|
||||
```
|
||||
|
||||
## 链接参考(后续选择其一填入 project.vpj)
|
||||
|
||||
### 方式 A:msys2 预装 3.6.2 动态库(推荐先试)
|
||||
在 `project.vpj` 的 `linker.flags` 中加入:
|
||||
|
||||
```
|
||||
"-L D:/msys64/mingw64/lib",
|
||||
"-lcrypto",
|
||||
"-lssl"
|
||||
```
|
||||
|
||||
运行 app.exe 前需把 `D:/msys64/mingw64/bin` 加入 PATH(`libcrypto-3-x64.dll` / `libssl-3-x64.dll`)。
|
||||
|
||||
### 方式 B:openssl_358_C 源码自编译静态库
|
||||
先用 perl Configure + mingw 编译 `../includes/openssl/openssl_358_C`,再把
|
||||
生成的 `libcrypto.a` / `libssl.a` 填入 `linker.static_libs`。
|
||||
|
||||
## 编译运行
|
||||
|
||||
```powershell
|
||||
cd D:\Users\TermiNexus\Desktop\TransPyC\ViperOpenSSLProject
|
||||
python ..\Projectrans.py --project .\project.vpj --clean-cache=false
|
||||
.\output\app.exe # 注意:openssl 链接参数配好前编译/链接会失败
|
||||
```
|
||||
Reference in new issue
Block a user