3 Replies Latest reply on Feb 8, 2018 10:57 PM by GauravS_31

    sdk-5.2: wiced_tls_init_identity assertion bug

    AxLi_1746341

      Test peap with join_ext command in console debug build test code will always hit assertion.

       

      In peap case, join_ent() calls

      wiced_tls_init_identity( &identity, NULL, 0, NULL, 0 );

       

      So it always hit below assertion:

      wiced_assert( "Bad args", (identity != NULL) && (private_key != NULL) && (certificate_data != NULL) );

       

      And looking at the implementation in wiced_tls_init_identity:

      Below checking looks wrong:

      if ( ( certificate_data != NULL ) || ( certificate_length != 0 ) )

      if ( ( private_key != NULL ) || ( key_length != 0 ) )

       

      e.g. Pass NULL to private_key with non-zero key_length will hit null pointer dereference.