• Simon Butcher's avatar
    Change the use of setjmp/longjmp in parameter failure callback · 6542f6c5
    Simon Butcher authored
    Change the use of setjmp and longjmp in signalling parameter validation failures
    when using the MBEDTLS_CHECK_PARAMS config.h option. This change allows
    all calls which might result in a call to the parameter validation failure
    handler to always be caught, even without use of the new macros, by placing a
    setjmp() in the outer function which calls the test function, which the handler
    can jump to.
    
    This has several benefits:
        * it allows us to remove the clang compiler warning (-Wclobbered) caused
          by local auto variables being in the same function as the call to setjmp.
        * removes the need to wrap all function calls in the test functions with the
          TEST_ASSERT() macro. Now all parameter validation function calls should be
          caught.
    6542f6c5