Skip to content

class_gsm_secure_client

Sara Damiano edited this page Sep 11, 2026 · 2 revisions

title: GsmSecureClient

GsmSecureClient (class)

Module: GsmSecureClient

The secure client class

Note

This is a base class for secure clients, but it is NOT an inner class of the TinyGsmSSL class.

#include <src/TinyGsmSSL.tpp>

Inherited by TinyGsmA7672X::GsmClientSecureA7672X, TinyGsmBG96::GsmClientSecureBG96, TinyGsmESP32::GsmClientSecureESP32, TinyGsmESP8266::GsmClientSecureESP8266, TinyGsmSim7000SSL::GsmClientSecureSim7000SSL, TinyGsmSim7080::GsmClientSecureSim7080, TinyGsmSim7600::GsmClientSecureSim7600, TinyGsmXBee::GsmClientSecureXBee

Client SSL configuration functions

Public Functions

Name
virtual
void
setSSLContextIndex(uint8_t sslCtxIndex)
Set the SSL context index or identifier to use for this connection.
virtual
void
setSSLAuthMode(SSLAuthMode mode)
Set the SSL authorization mode to use for this connection.
virtual
void
setSSLVersion(SSLVersion version)
Set the SSL version to use for this connection.

Client certificate assignment functions

Public Functions

Name
virtual
void
setCACertName(const char * CAcertName)
Set the CA certificate name to use for this connection.
virtual
void
setCACertName(const String & CAcertName)
Set the CA certificate name to use for this connection.
virtual
void
setClientCertName(const char * clientCertName)
Set the client certificate name to use for this connection.
virtual
void
setClientCertName(const String & clientCertName)
Set the client certificate name to use for this connection.
virtual
void
setPrivateKeyName(const char * clientKeyName)
Set the client private key name to use for this connection.
virtual
void
setPrivateKeyName(const String & clientKeyName)
Set the client private key name to use for this connection.

Client PSK assignment functions

Public Functions

Name
virtual
void
setPSKTableName(const char * pskTableName)
Set the PSK table name to use for this connection.
virtual
void
setPSKTableName(const String & pskTableName)
Set the PSK table name to use for this connection.
virtual
void
setPreSharedKey(const char * pskIdent, const char * psKey)
Set the pre-shared key and identity to use for this connection.
virtual
void
setPreSharedKey(const String & pskIdent, const String & psKey)
Set the pre-shared key and identity to use for this connection.

Public Functions Documentation

Client SSL configuration functions

functionsetSSLContextIndex

virtual void setSSLContextIndex(uint8_t sslCtxIndex)

Important

The SSL context index set here must be exactly what the modem will use as the context identifier within AT commands. Use whatever indexing the modem uses. This library will not adjust or validate the index for you. If unspecified, this library will use TINY_GSM_DEFAULT_SSL_CTX.

Note

This is not the same as the position of the client in the modem's socket array (the mux) or the connection identifier. The context index is a separate identifier used by the modem to manage groups of SSL settings.

  • Parameters:
    • sslCtxIndex The SSL context index

functionsetSSLAuthMode

virtual void setSSLAuthMode([SSLAuthMode](../files/_tiny_gsm_s_s_l_8tpp.md#ae4aaaef78c1c56ea03b96c5d9fbc7de6) mode)
  • Parameters:
    • mode The SSL authorization mode

functionsetSSLVersion

virtual void setSSLVersion([SSLVersion](../files/_tiny_gsm_s_s_l_8tpp.md#a4cec5319261492fb0afbc8c3aded7055) version)
  • Parameters:
    • version The SSL version

Client certificate assignment functions

functionsetCACertName

virtual void setCACertName(const char * CAcertName)
  • Parameters:
    • CAcertName The CA certificate name

functionsetCACertName

virtual void setCACertName(const String & CAcertName)
  • Parameters:
    • CAcertName The CA certificate name

functionsetClientCertName

virtual void setClientCertName(const char * clientCertName)
  • Parameters:
    • clientCertName The client certificate name

functionsetClientCertName

virtual void setClientCertName(const String & clientCertName)
  • Parameters:
    • clientCertName The client certificate name

functionsetPrivateKeyName

virtual void setPrivateKeyName(const char * clientKeyName)
  • Parameters:
    • clientKeyName The client private key name

functionsetPrivateKeyName

virtual void setPrivateKeyName(const String & clientKeyName)
  • Parameters:
    • clientKeyName The client private key name

Client PSK assignment functions

functionsetPSKTableName

virtual void setPSKTableName(const char * pskTableName)
  • Parameters:
    • pskTableName The PSK table name

functionsetPSKTableName

virtual void setPSKTableName(const String & pskTableName)
  • Parameters:
    • pskTableName The PSK table name

functionsetPreSharedKey

virtual void setPreSharedKey(const char * pskIdent, const char * psKey)
  • Parameters:
    • pskIdent The pre-shared key identity (also called the identity hint or just hint)
    • psKey The pre-shared key

functionsetPreSharedKey

virtual void setPreSharedKey(const String & pskIdent, const String & psKey)
  • Parameters:
    • pskIdent The pre-shared key identity (also called the identity hint or just hint)
    • psKey The pre-shared key

Generated by Doxygen and m.css with templates from doxybook2 Updated on 2026-09-11

Clone this wiki locally