Struct TlsSocketOptions

Source
pub struct TlsSocketOptions<'a> { /* private fields */ }
Expand description

TLS socket options.

This is used by TlsSocket when used as a EasySocket.

Implementations§

Source§

impl<'a> TlsSocketOptions<'a>

Source

pub fn new<S>(seed: u64, server_name: S) -> Self
where S: Into<String>,

Create a new socket options

§Arguments
  • seed: The seed to use for the RNG
  • server_name: The server name to use
§Returns
  • A new socket options object
§Notes

By default

  • RSA signatures are enabled
  • The max fragment length is not reset
  • The certificate and CA are not set.
Source

pub fn new_with_seed_from_time<S>(server_name: S) -> Self
where S: Into<String>,

Create a new socket options with a seed based on the current time

§Returns
  • A new socket options object
§Notes

Like TlsSocketOptions::new, but the seed is based on the current time. Uses sys::sceRtcGetCurrentTick to get the current time.

Source

pub fn disable_rsa_signatures(&mut self)

Disable RSA signatures

By default, RSA signatures are enabled.

Source

pub fn set_cert(&mut self, cert: Option<Certificate<'a>>)

Set the certificate

§Arguments
  • cert: The certificate
Source

pub fn seed(&self) -> u64

Get the seed

Source

pub fn set_seed(&mut self, seed: u64)

Set the seed

§Arguments
  • seed: The seed
Source

pub fn server_name(&self) -> &str

Get the server name

Source

pub fn cert(&self) -> Option<&Certificate<'a>>

Get the certificate

Source

pub fn rsa_signatures_enabled(&self) -> bool

Return whether RSA signatures are enabled

Source

pub fn reset_max_fragment_length(&self) -> bool

Return whether the max fragment length should be reset

Source

pub fn set_reset_max_fragment_length(&mut self, reset_max_fragment_length: bool)

Set whether the max fragment length should be reset

By default, the max fragment length is not reset.

Source

pub fn ca(&self) -> Option<&Certificate<'a>>

Get the CA

Source

pub fn set_ca(&mut self, ca: Option<Certificate<'a>>)

Set the CA (certificate authority)

§Arguments
  • ca: The CA
Source

pub fn set_enable_rsa_signatures(&mut self, enable_rsa_signatures: bool)

Set whether RSA signatures should be enabled

§Arguments
  • enable_rsa_signatures: Whether RSA signatures should be enabled
Source

pub fn set_server_name<S>(&mut self, server_name: S)
where S: Into<String>,

Set the server name

§Arguments
  • server_name: The server name

Trait Implementations§

Source§

impl<'a> Clone for TlsSocketOptions<'a>

Source§

fn clone(&self) -> TlsSocketOptions<'a>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Debug for TlsSocketOptions<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> Default for TlsSocketOptions<'a>

Source§

fn default() -> TlsSocketOptions<'a>

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for TlsSocketOptions<'a>

§

impl<'a> RefUnwindSafe for TlsSocketOptions<'a>

§

impl<'a> Send for TlsSocketOptions<'a>

§

impl<'a> Sync for TlsSocketOptions<'a>

§

impl<'a> Unpin for TlsSocketOptions<'a>

§

impl<'a> UnwindSafe for TlsSocketOptions<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V