summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarry Chen <i@harrychen.xyz>2021-03-08 19:41:47 +0800
committerHarry Chen <i@harrychen.xyz>2021-03-08 19:50:19 +0800
commit7819f3e7d8298e6388e093911ee95bd2c24bf40b (patch)
treede8b1df0d8e71704afbeec9848d92fcb44282a97
parent5c214017e4cba8d2f1ae3df748accfc40b425de9 (diff)
downloadrust-openssl-7819f3e7d8298e6388e093911ee95bd2c24bf40b.zip
Fix NID definitions of SM3
Signed-off-by: Harry Chen <i@harrychen.xyz>
-rw-r--r--openssl-sys/src/obj_mac.rs6
-rw-r--r--openssl/src/nid.rs2
2 files changed, 4 insertions, 4 deletions
diff --git a/openssl-sys/src/obj_mac.rs b/openssl-sys/src/obj_mac.rs
index dbe494a1..49fc4add 100644
--- a/openssl-sys/src/obj_mac.rs
+++ b/openssl-sys/src/obj_mac.rs
@@ -255,8 +255,6 @@ 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;
@@ -922,3 +920,7 @@ pub const NID_X448: c_int = 1035;
pub const NID_ED25519: c_int = 1087;
#[cfg(ossl111)]
pub const NID_ED448: c_int = 1088;
+#[cfg(any(ossl111, libressl291))]
+pub const NID_sm3: c_int = 1143;
+#[cfg(any(ossl111, libressl291))]
+pub const NID_sm3WithRSAEncryption: c_int = 1144;
diff --git a/openssl/src/nid.rs b/openssl/src/nid.rs
index ab3112d5..8545666c 100644
--- a/openssl/src/nid.rs
+++ b/openssl/src/nid.rs
@@ -367,8 +367,6 @@ 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);