9 Star 0 Fork 52

src-openEuler/python-cryptography

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-provide-openssl-apis-related-to-SM-for-python.patch 1.52 KB
一键复制 编辑 原始数据 按行查看 历史
桐小哥 提交于 2024-02-01 10:44 . upgrade version to 42.0.2
From 52325495900f1bd9e1f228f24c81c0746520dc85 Mon Sep 17 00:00:00 2001
From: hanxinke <hanxinke@huawei.com>
Date: Tue, 3 Aug 2021 10:45:22 +0800
Subject: [PATCH] provide openssl apis related to SM for python
Signed-off-by: hanxinke <hanxinke@huawei.com>
---
src/_cffi_src/openssl/evp.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/_cffi_src/openssl/evp.py b/src/_cffi_src/openssl/evp.py
index 54f5388..c304684 100644
--- a/src/_cffi_src/openssl/evp.py
+++ b/src/_cffi_src/openssl/evp.py
@@ -32,6 +32,7 @@ static const int EVP_CTRL_AEAD_SET_TAG;
static const int Cryptography_HAS_SCRYPT;
static const int Cryptography_HAS_EVP_PKEY_DHX;
+static const int EVP_PKEY_SM2;
static const long Cryptography_HAS_300_FIPS;
static const long Cryptography_HAS_300_EVP_CIPHER;
"""
@@ -69,6 +70,9 @@ int EVP_VerifyUpdate(EVP_MD_CTX *, const void *, size_t);
int EVP_VerifyFinal(EVP_MD_CTX *, const unsigned char *, unsigned int,
EVP_PKEY *);
+int EVP_DigestVerifyUpdate(EVP_MD_CTX *, const void *, size_t);
+int EVP_DigestVerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sig,
+ size_t siglen);
int EVP_PKEY_set1_RSA(EVP_PKEY *, RSA *);
int EVP_PKEY_set1_DSA(EVP_PKEY *, DSA *);
@@ -84,6 +88,9 @@ int EVP_PKEY_assign_RSA(EVP_PKEY *, RSA *);
int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *, int, int, void *);
+void EVP_MD_CTX_set_pkey_ctx(EVP_MD_CTX *ctx, EVP_PKEY_CTX *pctx);
+const EVP_MD *EVP_sm3(void);
+
int EVP_default_properties_enable_fips(OSSL_LIB_CTX *, int);
"""
--
2.27.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/python-cryptography.git
git@gitee.com:src-openeuler/python-cryptography.git
src-openeuler
python-cryptography
python-cryptography
master

搜索帮助