pub struct TLSDescriptorConfig {
pub typ: AgentType,
pub tls_version: TLSVersion,
pub client_authentication: bool,
pub server_authentication: bool,
pub try_reuse: bool,
pub _cipher_string_tls13: String,
pub _cipher_string_tls12: String,
pub groups: Option<String>,
pub sigalgs: Option<String>,
}Fields§
§typ: AgentTypeWhether the agent which holds this descriptor is a server.
tls_version: TLSVersion§client_authentication: boolIf agent is a server: Make client auth. a requirement. If agent is a client: Send a static certificate.
Default: false
server_authentication: boolIf agent is a server: No effect, servers always send certificates in TLS. If agent is a client: Make server auth. a requirement.
Default: true
try_reuse: boolWhether we want to try to reuse a previous agent. This is needed for TLS session resumption as openssl agents rotate ticket keys if they are recreated.
_cipher_string_tls13: StringList of available TLS ciphers - public for default() to be used Not supposed to be used outside the public methods to manage 1.2/1.3/both
_cipher_string_tls12: String§groups: Option<String>List of available TLS groups/curves
If None, use the default PUT groups
sigalgs: Option<String>List of acceptable signature algorithms (OpenSSL sigalgs_list format,
e.g. “RSA-PSS+SHA256:RSA-PSS+SHA384”).
If None, use the default PUT signature algorithms.
Implementations§
Source§impl TLSDescriptorConfig
impl TLSDescriptorConfig
pub fn new_client( name: AgentName, tls_version: TLSVersion, ) -> AgentDescriptor<Self>
pub fn new_server( name: AgentName, tls_version: TLSVersion, ) -> AgentDescriptor<Self>
pub fn set_cipher_string_12(&mut self, cipher_string: String)
pub fn set_cipher_string_13(&mut self, cipher_string: String)
Sourcepub fn set_cipher_string(&mut self, cipher_string: String)
pub fn set_cipher_string(&mut self, cipher_string: String)
Sets both 1.2 and 1.3 cipher strings. If you need to specify two different cipher strings,
use set_cipher_string_12 and set_cipher_string_13 separately.
When using tlsversion::both both strings will be concatenated (and deduped).
Be careful if you set only one of them when using both.
fn concat_cipher_strings(&self) -> String
pub fn get_cipher_string_12(&self) -> String
pub fn get_cipher_string_13(&self) -> String
pub fn get_cipher_string_both(&self) -> String
Trait Implementations§
Source§impl Clone for TLSDescriptorConfig
impl Clone for TLSDescriptorConfig
Source§fn clone(&self) -> TLSDescriptorConfig
fn clone(&self) -> TLSDescriptorConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TLSDescriptorConfig
impl Debug for TLSDescriptorConfig
Source§impl Default for TLSDescriptorConfig
impl Default for TLSDescriptorConfig
Source§impl<'de> Deserialize<'de> for TLSDescriptorConfig
impl<'de> Deserialize<'de> for TLSDescriptorConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Hash for TLSDescriptorConfig
impl Hash for TLSDescriptorConfig
Source§impl PartialEq for TLSDescriptorConfig
impl PartialEq for TLSDescriptorConfig
Source§impl ProtocolDescriptorConfig for TLSDescriptorConfig
impl ProtocolDescriptorConfig for TLSDescriptorConfig
Source§fn is_reusable_with(&self, other: &Self) -> bool
fn is_reusable_with(&self, other: &Self) -> bool
Source§impl Serialize for TLSDescriptorConfig
impl Serialize for TLSDescriptorConfig
impl Eq for TLSDescriptorConfig
impl StructuralPartialEq for TLSDescriptorConfig
Auto Trait Implementations§
impl Freeze for TLSDescriptorConfig
impl RefUnwindSafe for TLSDescriptorConfig
impl Send for TLSDescriptorConfig
impl Sync for TLSDescriptorConfig
impl Unpin for TLSDescriptorConfig
impl UnwindSafe for TLSDescriptorConfig
Blanket Implementations§
§impl<Head, T> Append<T> for Head
impl<Head, T> Append<T> for Head
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneAny for T
impl<T> CloneAny for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<I, S> MutatedTransform<I, S> for Iwhere
I: Clone,
S: HasCorpus<I>,
impl<I, S> MutatedTransform<I, S> for Iwhere
I: Clone,
S: HasCorpus<I>,
§fn try_transform_from(base: &mut Testcase<I>, state: &S) -> Result<I, Error>
fn try_transform_from(base: &mut Testcase<I>, state: &S) -> Result<I, Error>
§fn try_transform_into(
self,
_state: &S,
) -> Result<(I, <I as MutatedTransform<I, S>>::Post), Error>
fn try_transform_into( self, _state: &S, ) -> Result<(I, <I as MutatedTransform<I, S>>::Post), Error>
§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling [Attribute] value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi [Quirk] value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the [Condition] value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);