summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjiegec <noc@jiegec.ac.cn>2021-03-08 19:19:17 +0800
committerjiegec <noc@jiegec.ac.cn>2021-03-08 19:19:17 +0800
commit44230aff797be3f555752c5d35518616ecba610b (patch)
tree027ead5ce5e9046cad1cd03118419333f54d2ca2
parent7103b6adf3c52649970d66d3d424bbea2aa40368 (diff)
downloadrust-openssl-44230aff797be3f555752c5d35518616ecba610b.zip
Add NID definition for sm3
-rw-r--r--openssl-sys/src/obj_mac.rs2
-rw-r--r--openssl/src/nid.rs2
2 files changed, 4 insertions, 0 deletions
diff --git a/openssl-sys/src/obj_mac.rs b/openssl-sys/src/obj_mac.rs
index d78416da..dbe494a1 100644
--- a/openssl-sys/src/obj_mac.rs
+++ b/openssl-sys/src/obj_mac.rs
@@ -255,6 +255,8 @@ pub const NID_md5: c_int = 4;
pub const NID_md5_sha1: c_int = 114;
pub const NID_hmacWithMD5: c_int = 797;
pub const NID_hmacWithSHA1: c_int = 163;
+pub const NID_sm3: c_int = 1143;
+pub const NID_sm3WithRSAEncryption: c_int = 1144;
pub const NID_hmacWithSHA224: c_int = 798;
pub const NID_hmacWithSHA256: c_int = 799;
pub const NID_hmacWithSHA384: c_int = 800;
diff --git a/openssl/src/nid.rs b/openssl/src/nid.rs
index 8545666c..ab3112d5 100644
--- a/openssl/src/nid.rs
+++ b/openssl/src/nid.rs
@@ -367,6 +367,8 @@ impl Nid {
pub const MD5_SHA1: Nid = Nid(ffi::NID_md5_sha1);
pub const HMACWITHMD5: Nid = Nid(ffi::NID_hmacWithMD5);
pub const HMACWITHSHA1: Nid = Nid(ffi::NID_hmacWithSHA1);
+ pub const SM3: Nid = Nid(ffi::NID_sm3);
+ pub const SM3WITHRSAENCRYPTION: Nid = Nid(ffi::NID_sm3WithRSAEncryption);
pub const HMACWITHSHA224: Nid = Nid(ffi::NID_hmacWithSHA224);
pub const HMACWITHSHA256: Nid = Nid(ffi::NID_hmacWithSHA256);
pub const HMACWITHSHA384: Nid = Nid(ffi::NID_hmacWithSHA384);