Skip to content

Commit c957ad0

Browse files
committed
Constants for rust-openssl
1 parent f8906ad commit c957ad0

4 files changed

Lines changed: 23 additions & 0 deletions

File tree

boring/src/nid.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,6 +1057,15 @@ impl Nid {
10571057
pub const AUTH_ECDSA: Nid = Nid(ffi::NID_auth_ecdsa);
10581058
pub const AUTH_PSK: Nid = Nid(ffi::NID_auth_psk);
10591059
pub const AUTH_ANY: Nid = Nid(ffi::NID_auth_any);
1060+
pub const BRAINPOOL_P256R1: Nid = Nid(ffi::NID_brainpoolP256r1);
1061+
pub const BRAINPOOL_P256T1: Nid = Nid(ffi::NID_brainpoolP256t1);
1062+
pub const BRAINPOOL_P320R1: Nid = Nid(ffi::NID_brainpoolP320r1);
1063+
pub const BRAINPOOL_P320T1: Nid = Nid(ffi::NID_brainpoolP320t1);
1064+
pub const BRAINPOOL_P384R1: Nid = Nid(ffi::NID_brainpoolP384r1);
1065+
pub const BRAINPOOL_P384T1: Nid = Nid(ffi::NID_brainpoolP384t1);
1066+
pub const BRAINPOOL_P512R1: Nid = Nid(ffi::NID_brainpoolP512r1);
1067+
pub const BRAINPOOL_P512T1: Nid = Nid(ffi::NID_brainpoolP512t1);
1068+
pub const CHACHA20_POLY1305: Nid = Nid(ffi::NID_chacha20_poly1305);
10601069
}
10611070

10621071
#[cfg(test)]

boring/src/pkey.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,20 @@ pub struct Id(c_int);
7474

7575
impl Id {
7676
pub const RSA: Id = Id(ffi::EVP_PKEY_RSA);
77+
/// RSA-PSS key type
78+
#[doc(alias = "RSA_PSS")]
7779
pub const RSAPSS: Id = Id(ffi::EVP_PKEY_RSA_PSS);
80+
/// rust-openssl alias
81+
#[doc(hidden)]
82+
pub const RSA_PSS: Id = Self::RSAPSS;
7883
pub const DSA: Id = Id(ffi::EVP_PKEY_DSA);
7984
pub const DH: Id = Id(ffi::EVP_PKEY_DH);
8085
pub const EC: Id = Id(ffi::EVP_PKEY_EC);
8186
pub const ED25519: Id = Id(ffi::EVP_PKEY_ED25519);
8287
pub const ED448: Id = Id(ffi::EVP_PKEY_ED448);
8388
pub const X25519: Id = Id(ffi::EVP_PKEY_X25519);
8489
pub const X448: Id = Id(ffi::EVP_PKEY_X448);
90+
pub const HKDF: Id = Id(ffi::EVP_PKEY_HKDF);
8591

8692
/// Creates a `Id` from an integer representation.
8793
#[must_use]

boring/src/srtp.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ impl SrtpProfileId {
4848
SrtpProfileId(ffi::SRTP_AES128_F8_SHA1_32 as _);
4949
pub const SRTP_NULL_SHA1_80: SrtpProfileId = SrtpProfileId(ffi::SRTP_NULL_SHA1_80 as _);
5050
pub const SRTP_NULL_SHA1_32: SrtpProfileId = SrtpProfileId(ffi::SRTP_NULL_SHA1_32 as _);
51+
pub const SRTP_AEAD_AES_128_GCM: SrtpProfileId = SrtpProfileId(ffi::SRTP_AEAD_AES_128_GCM as _);
52+
pub const SRTP_AEAD_AES_256_GCM: SrtpProfileId = SrtpProfileId(ffi::SRTP_AEAD_AES_256_GCM as _);
5153

5254
/// Creates a `SrtpProfileId` from an integer representation.
5355
#[must_use]

boring/src/ssl/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -633,6 +633,12 @@ impl SslVersion {
633633

634634
/// TLSv1.3
635635
pub const TLS1_3: SslVersion = SslVersion(ffi::TLS1_3_VERSION as _);
636+
637+
/// DTLSv1.0
638+
pub const DTLS1: SslVersion = SslVersion(ffi::DTLS1_VERSION as _);
639+
640+
/// DTLSv1.2
641+
pub const DTLS1_2: SslVersion = SslVersion(ffi::DTLS1_2_VERSION as _);
636642
}
637643

638644
impl TryFrom<u16> for SslVersion {

0 commit comments

Comments
 (0)