argc = opt_num_rest();
argv = opt_rest();
+ if (!app_load_modules(NULL))
+ goto end;
+
in = bio_open_default(infile, RB(informat));
if (in == NULL)
goto end;
size_t crv_len = EC_get_builtin_curves(NULL, 0);
size_t n;
- curves = app_malloc((int)(sizeof *curves * crv_len), "list curves");
+ curves = app_malloc((int)sizeof(*curves) * crv_len, "list curves");
if (!EC_get_builtin_curves(curves, crv_len)) {
OPENSSL_free(curves);
goto end;
* are the same as the curves prime192v1 and prime256v1 defined in
* X9.62)
*/
- if (!strcmp(curve_name, "secp192r1")) {
+ if (strcmp(curve_name, "secp192r1") == 0) {
BIO_printf(bio_err, "using curve name prime192v1 "
"instead of secp192r1\n");
nid = NID_X9_62_prime192v1;
- } else if (!strcmp(curve_name, "secp256r1")) {
+ } else if (strcmp(curve_name, "secp256r1") == 0) {
BIO_printf(bio_err, "using curve name prime256v1 "
"instead of secp256r1\n");
nid = NID_X9_62_prime256v1;
BN_free(ec_gen);
BN_free(ec_order);
BN_free(ec_cofactor);
- if (buffer)
- OPENSSL_free(buffer);
+ OPENSSL_free(buffer);
BIO_free(in);
BIO_free_all(out);
EC_GROUP_free(group);