Files
Viper_VRTE/openssl/__init__.vp
T

33 lines
1.2 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ============================================================
# openssl — Viper 的 OpenSSL 3.x FFI 绑定包
#
# 用户用法:
# import openssl
# v = openssl.OpenSSL_version(openssl.OpenSslVersion) # 版本文本
# openssl.OPENSSL_init_ssl(0, None)
#
# 说明:
# * 全部为 extern FFI(extern def,直连 libcrypto/libssl 导出符号),
# 无 C++ 桥接层;对象均为不透明指针(openssl.types 里 *Ptr typedef)。
# * 头文件按 openssl 官方头分组:crypto/err/rand/sha/md5/hmac/objects/
# evp/bio/pem/x509/ssl。
# * 返回指针的函数返回 *Ptr,拿到对象后按需调用对应 *_free/SSL_free 等释放。
# * 密码回调类参数一律 bytes 占位,不使用时传 t.CPtr(0)/None。
# * 链接库:libcrypto + libssl(Windows 上 mingw 对应 -lcrypto -lssl)。
# ============================================================
import t
from openssl.types import *
from openssl.crypto import *
from openssl.err import *
from openssl.rand import *
from openssl.sha import *
from openssl.md5 import *
from openssl.hmac import *
from openssl.objects import *
from openssl.evp import *
from openssl.bio import *
from openssl.pem import *
from openssl.x509 import *
from openssl.ssl import *