#undef PROG
#define PROG dgst_main
-int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
+int
+do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
EVP_PKEY *key, unsigned char *sigin, int siglen,
const char *sig_name, const char *md_name,
const char *file, BIO *bmd);
goto mac_end;
}
r = 1;
- mac_end:
+mac_end:
if (mac_ctx)
EVP_PKEY_CTX_free(mac_ctx);
if (r == 0)
perror(argv[i]);
err++;
continue;
- } else
+ } else {
r = do_fp(out, buf, inp, separator, out_bin,
sigkey, sigbuf, siglen, sig_name, md_name,
argv[i], bmd);
+ }
if (r)
err = r;
(void)BIO_reset(bmd);
sk_OPENSSL_STRING_free(sigopts);
if (macopts)
sk_OPENSSL_STRING_free(macopts);
- if (sigbuf) free(sigbuf);
- if (bmd != NULL)
- BIO_free(bmd);
+ if (sigbuf)
+ free(sigbuf);
+ if (bmd != NULL)
+ BIO_free(bmd);
apps_shutdown();
OPENSSL_EXIT(err);
}
}
}
- if (binout) BIO_write(out, buf, len);
- else if (sep == 2) {
+ if (binout)
+ BIO_write(out, buf, len);
+ else if (sep == 2) {
for (i = 0; i < (int)len; i++)
BIO_printf(out, "%02x", buf[i]);
BIO_printf(out, " *%s\n", file);
BIO_printf(bio_err, "Generating DSA parameters, %d bit long prime\n", num);
if (!dsa || !DSA_generate_parameters_ex(dsa, num,
- NULL, 0, NULL, NULL, &cb)) {
- if (dsa) DSA_free(dsa);
- ERR_print_errors(bio_err);
+ NULL, 0, NULL, NULL, &cb)) {
+ if (dsa)
+ DSA_free(dsa);
+ ERR_print_errors(bio_err);
goto end;
}