Skip to content

Commit 9840b53

Browse files
committed
add pkey Id SM2
1 parent 7c0f0a7 commit 9840b53

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

openssl-sys/src/evp.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ pub const EVP_PKEY_RSA: c_int = NID_rsaEncryption;
1010
pub const EVP_PKEY_DSA: c_int = NID_dsa;
1111
pub const EVP_PKEY_DH: c_int = NID_dhKeyAgreement;
1212
pub const EVP_PKEY_EC: c_int = NID_X9_62_id_ecPublicKey;
13+
#[cfg(ossl111)]
14+
pub const EVP_PKEY_SM2: c_int = NID_sm2;
1315
#[cfg(any(ossl111, libressl370))]
1416
pub const EVP_PKEY_X25519: c_int = NID_X25519;
1517
#[cfg(any(ossl111, libressl370))]

openssl/src/pkey.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ impl Id {
8585
pub const DSA: Id = Id(ffi::EVP_PKEY_DSA);
8686
pub const DH: Id = Id(ffi::EVP_PKEY_DH);
8787
pub const EC: Id = Id(ffi::EVP_PKEY_EC);
88+
#[cfg(ossl111)]
89+
pub const SM2: Id = Id(ffi::EVP_PKEY_SM2);
8890

8991
#[cfg(any(ossl110, boringssl))]
9092
pub const HKDF: Id = Id(ffi::EVP_PKEY_HKDF);

0 commit comments

Comments
 (0)