Skip to main content

Configuration

Struct Configuration 

Source
pub struct Configuration {
    pub sp_id: u8,
    pub version: SslTlsVersion,
    pub cipher_specs: String<256>,
    pub cert_valid_level: u8,
    pub ca_cert_id: u8,
    pub client_cert_id: u8,
    pub client_private_key_id: u8,
    pub psk: String<64>,
    pub psk_identity: Option<String<64>>,
    pub storage_id: StorageId,
    pub resume: Resume,
    pub lifetime: u32,
}

Fields§

§sp_id: u8

Security profile identifier.

§version: SslTlsVersion

SSL / TLS version.

§cipher_specs: String<256>

Example: =“0x8C;0x8D;0XAE;0xAF”

Warning: If the remote server supports none of the cipher suites configured in the ‹cipherSpecs> list, the handshake fails.

TODO: use CipherSuite enum

§cert_valid_level: u8

Bit field: 8 bits wide (00. . FF): Server certificate validation.

Configuration bits:

• All 0 (default): certificate not validated • Bit 0 set to 1: certificate validation done against a specific or a list of imported trusted root certificates and against validity period • Bit 1: unused • Bit 2 set to 1: server URL verified against certificate common name field (on top of bit 0) • Bit 3-7 are reserved for future use

For instance, to activate certification activate certification verification including validity period check, =0x01.

§ca_cert_id: u8

Integer: 0.19: Client certificate ID,

The client certificate serves to authenticate the client when mutual authentication is requested. The client certificate must be imported with Write Data in NVM: AT+SQNSNVW (on page 71) command.

When this parameter is omitted (default), no certificate is referenced.

§client_cert_id: u8

Integer: 0..19: Client certificate ID,

The client certificate serves to authenticate the client when mutual authentication is requested. The client certificate must be imported with Write Data in NVM: AT+SQNSNVW (on page 71) command.

When this parameter is omitted (default), no certificate is referenced.

§client_private_key_id: u8

Integer: 0..19: Client private key ID.

The client’s private key is used to authenticate when mutual authentication is requested. The Client’s private key should be imported with the Write Data in NVM: AT+SQNSNVW (on page 71) command.

When the parameter is omitted (default), no key is referenced.

Note: Password protected keys are not supported.

§psk: String<64>

String. Pre-shared key used for connection (when a TLS_PSK_* cipher suite is used). The value must be specified as a string of hexadecimal numbers (e.g. “734c61425224655f…”)

The factory default value is an empty string, meaning no pre-shared key defined.

§psk_identity: Option<String<64>>

Pre-shared key identity used for connection (when a TLS_PSK_* cipher suite is used).

The factory default value is an empty string, meaning empty key identity defined

§storage_id: StorageId

Private key storage id used to identify whether key stored on NVM or HCE.

§resume: Resume

Session resumption feature enable.

§lifetime: u32

Maximum TLS client session duration in seconds.

0 - No limit. The server can set its own expiration value, advertised in the session ticket lifetime expiration mechanism

0 - Maximum duration of a given TLS session. This parameter takes precedence over the server own value

Trait Implementations§

Source§

impl AtatResp for Configuration

Source§

impl Clone for Configuration

Source§

fn clone(&self) -> Configuration

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<'de> Deserialize<'de> for Configuration

Source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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, 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.