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)
err:
ERR_print_errors_fp(stderr);
- if (abuf != NULL)
- OPENSSL_free(abuf);
- if (bbuf != NULL)
- OPENSSL_free(bbuf);
+ OPENSSL_free(abuf);
+ OPENSSL_free(bbuf);
DH_free(b);
DH_free(a);
BN_GENCB_free(_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;