On 05/02/18 18:13, Salz, Rich wrote:

> Use ossl_assert, not assert.  Do not forget to handle the error
> condition as asserts are not compiled into production code.

It's slightly more nuanced than that. There are occasions where assert
is ok, e.g.

switch(my_expression)
{
case 1:
        /* do something */
        break;
case 2:
        /* do something else */
        break;
default:
        assert("Shouldn't get here" == NULL);
        return -1;
}

In general we should prefer ossl_assert over assert. Never use
OPENSSL_assert() in libcrypto or libssl.

Matt
_______________________________________________
openssl-project mailing list
openssl-project@openssl.org
https://mta.openssl.org/mailman/listinfo/openssl-project

Reply via email to