text: /**************************************************************************/
  /*                                                                        */
  /*       Copyright (c) Microsoft Corporation. All rights reserved.        */
  /*                                                                        */
  /*       This software is licensed under the Microsoft Software License   */
  /*       Terms for Microsoft Azure RTOS. Full text of the license can be  */
  /*       found in the LICENSE file at https://aka.ms/AzureRTOS_EULA       */
  /*       and in the root directory of this software.                      */
  /*                                                                        */
  /**************************************************************************/
  
  
  /**************************************************************************/
  /**************************************************************************/
  /**                                                                       */
  /** NetX Secure Component                                                 */
  /**                                                                       */
  /**    Datagram Transport Layer Security (DTLS)                           */
  /**                                                                       */
  /**************************************************************************/
  /**************************************************************************/
  
  #define NX_SECURE_SOURCE_CODE
  
  #include "nx_secure_dtls.h"
  
  /**************************************************************************/
  /*                                                                        */
  /*  FUNCTION                                               RELEASE        */
  /*                                                                        */
  /*    _nx_secure_dtls_server_x509_client_verify_disable   PORTABLE C      */
  /*                                                           6.0          */
  /*  AUTHOR                                                                */
  /*                                                                        */
  /*    Timothy Stapko, Microsoft Corporation                               */
  /*                                                                        */
  /*  DESCRIPTION                                                           */
  /*                                                                        */
  /*    This function disables X.509 Client certificate verification and    */
  /*    authentication for a DTLS server instance.                          */
  /*                                                                        */
  /*  INPUT                                                                 */
  /*                                                                        */
  /*    server_ptr                            DTLS server control block     */
  /*                                                                        */
  /*  OUTPUT                                                                */
  /*                                                                        */
  /*    status                                Completion status             */
  /*                                                                        */
  /*  CALLS                                                                 */
  /*                                                                        */
  /*    _nx_secure_tls_session_client_verify_disable                        */
  /*                                          Configure individual session  */
  /*                                                                        */
  /*  CALLED BY                                                             */
  /*                                                                        */
  /*    Application Code                                                    */
  /*                                                                        */
  /*  RELEASE HISTORY                                                       */
  /*                                                                        */
  /*    DATE              NAME                      DESCRIPTION             */
  /*                                                                        */
  /*  05-19-2020     Timothy Stapko           Initial Version 6.0           */
  /*                                                                        */
  /**************************************************************************/
  UINT _nx_secure_dtls_server_x509_client_verify_disable(NX_SECURE_DTLS_SERVER *server_ptr)
  {
  #ifdef NX_SECURE_ENABLE_DTLS
  UINT status;
  UINT i;
  NX_SECURE_DTLS_SESSION *current_session;
  NX_SECURE_TLS_SESSION *tls_session;
  UINT num_sessions;
  
  
      /* Figure out number of sessions. */
      num_sessions = server_ptr->nx_dtls_server_sessions_count;
  
      /* Disable check for all sessions. */
      for(i = 0; i < num_sessions; ++i)
      {
          /* Get the current session. */
          current_session = &(server_ptr->nx_dtls_server_sessions[i]);
  
          /* Get the internal TLS session instance. */
          tls_session = &(current_session -> nx_secure_dtls_tls_session);
  
          /* Disable client verification for this session. */
          status = _nx_secure_tls_session_client_verify_disable(tls_session);
  
          if(status != NX_SUCCESS)
          {
              return(status);
          }
      }
  
      return(NX_SUCCESS);
  #else
      NX_PARAMETER_NOT_USED(server_ptr);
  
      return(NX_NOT_SUPPORTED);
  #endif /* NX_SECURE_ENABLE_DTLS */
  }
  
  