Skip to content

Commit 67cac00

Browse files
authored
Merge pull request sfackler#2046 from alex/evp-pkey-ids
Expose two additional Pkey IDs
2 parents 78219ec + f1f5169 commit 67cac00

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

openssl-sys/src/evp.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,12 @@ pub const PKCS5_SALT_LEN: c_int = 8;
77
pub const PKCS12_DEFAULT_ITER: c_int = 2048;
88

99
pub const EVP_PKEY_RSA: c_int = NID_rsaEncryption;
10+
#[cfg(any(openssl111, boringssl))]
11+
pub const EVP_PKEY_RSA_PSS: c_int = NID_rsassaPss;
1012
pub const EVP_PKEY_DSA: c_int = NID_dsa;
1113
pub const EVP_PKEY_DH: c_int = NID_dhKeyAgreement;
14+
#[cfg(ossl110)]
15+
pub const EVP_PKEY_DHX: c_int = NID_dhpublicnumber;
1216
pub const EVP_PKEY_EC: c_int = NID_X9_62_id_ecPublicKey;
1317
#[cfg(ossl111)]
1418
pub const EVP_PKEY_SM2: c_int = NID_sm2;

openssl-sys/src/obj_mac.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ pub const NID_sha512WithRSAEncryption: c_int = 670;
135135
pub const NID_sha224WithRSAEncryption: c_int = 671;
136136
pub const NID_pkcs3: c_int = 27;
137137
pub const NID_dhKeyAgreement: c_int = 28;
138+
#[cfg(ossl110)]
139+
pub const NID_dhpublicnumber: c_int = 920;
138140
pub const NID_pkcs5: c_int = 187;
139141
pub const NID_pbeWithMD2AndDES_CBC: c_int = 9;
140142
pub const NID_pbeWithMD5AndDES_CBC: c_int = 10;

openssl/src/pkey.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,16 @@ pub struct Id(c_int);
7878

7979
impl Id {
8080
pub const RSA: Id = Id(ffi::EVP_PKEY_RSA);
81+
#[cfg(any(openssl111, boringssl))]
82+
pub const RSA_PSS: Id = Id(ffi::EVP_PKEY_RSA_PSS);
8183
#[cfg(not(boringssl))]
8284
pub const HMAC: Id = Id(ffi::EVP_PKEY_HMAC);
8385
#[cfg(not(boringssl))]
8486
pub const CMAC: Id = Id(ffi::EVP_PKEY_CMAC);
8587
pub const DSA: Id = Id(ffi::EVP_PKEY_DSA);
8688
pub const DH: Id = Id(ffi::EVP_PKEY_DH);
89+
#[cfg(ossl110)]
90+
pub const DHX: Id = Id(ffi::EVP_PKEY_DHX);
8791
pub const EC: Id = Id(ffi::EVP_PKEY_EC);
8892
#[cfg(ossl111)]
8993
pub const SM2: Id = Id(ffi::EVP_PKEY_SM2);

0 commit comments

Comments
 (0)