Share via


Setting Security Levels on the Client Object

The RTC Client API version 1.2 allows encryption levels to be set on the Client object or on the Session object separately. The encryption levels set on the client object are used for all session created after the levels are set. The encryptions levels set on the Session object are used to set the encryption on a per-session basis. The RTC Client 1.2 application can enable encryption for any of the security types specified in the RTC_SECURITY_TYPE enumeration.

The mechanism for specifying the security levels on the client object is the IRTCClient2::put_PreferredSecurityLevel method. This method specifies both the security type (RTC_SECURITY_TYPE) and the security level (RTC_SECURITY_LEVEL). For each security type, three security levels are supported:

  • No encryption (RTCSECL_UNSUPPORTED)
  • Encrypt only if the remote application requires encryption (RTCSECL_SUPPORTED. The session is always allowed when this encryption level is specified.
  • Encryption required (RTCSECL_REQUIRED). If the remote application does not support encryption, then the session is not allowed.

If the application does not specify the security level for a particular security type, the Client API will default to the RTCSECL_SUPPORTED security level. The IRTCClient2::get_PreferredSecurityLevel method allows the application to retrieve the security level for any security type. Once the security levels are set, the RTC Client API will use them for all subsequent sessions established; however, the application has the option to change the security levels at any time during operation.

The security levels can also be set on a per-session basis. For information on setting the security levels for a session, see Setting Security Levels on the Session Object.