out = BIO_new(BIO_s_file());
if (out == NULL)
EXIT(1);
- BIO_set_fp(out, stdout, BIO_NOCLOSE);
+ BIO_set_fp(out, stdout, BIO_NOCLOSE | BIO_FP_TEXT);
_cb = BN_GENCB_new();
if (!_cb)
static int run_rfc5114_tests(void)
{
int i;
- for (i = 0; i < (int)(sizeof(rfctd) / sizeof(rfc5114_td)); i++) {
+ for (i = 0; i < (int)OSSL_NELEM(rfctd); i++) {
DH *dhA, *dhB;
unsigned char *Z1 = NULL, *Z2 = NULL;
const rfc5114_td *td = rfctd + i;
* Work out shared secrets using both sides and compare with expected
* values.
*/
- if (!DH_compute_key(Z1, dhB->pub_key, dhA))
+ if (DH_compute_key(Z1, dhB->pub_key, dhA) == -1)
goto bad_err;
- if (!DH_compute_key(Z2, dhA->pub_key, dhB))
+ if (DH_compute_key(Z2, dhA->pub_key, dhB) == -1)
goto bad_err;
if (memcmp(Z1, td->Z, td->Z_len))