diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libssl/src/apps/dgst.c | 20 | ||||
| -rw-r--r-- | src/lib/libssl/src/apps/dhparam.c | 7 | 
2 files changed, 16 insertions, 11 deletions
| diff --git a/src/lib/libssl/src/apps/dgst.c b/src/lib/libssl/src/apps/dgst.c index 7336023b30..c024229c58 100644 --- a/src/lib/libssl/src/apps/dgst.c +++ b/src/lib/libssl/src/apps/dgst.c | |||
| @@ -74,7 +74,8 @@ | |||
| 74 | #undef PROG | 74 | #undef PROG | 
| 75 | #define PROG dgst_main | 75 | #define PROG dgst_main | 
| 76 | 76 | ||
| 77 | int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout, | 77 | int | 
| 78 | do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout, | ||
| 78 | EVP_PKEY *key, unsigned char *sigin, int siglen, | 79 | EVP_PKEY *key, unsigned char *sigin, int siglen, | 
| 79 | const char *sig_name, const char *md_name, | 80 | const char *sig_name, const char *md_name, | 
| 80 | const char *file, BIO *bmd); | 81 | const char *file, BIO *bmd); | 
| @@ -361,7 +362,7 @@ MAIN(int argc, char **argv) | |||
| 361 | goto mac_end; | 362 | goto mac_end; | 
| 362 | } | 363 | } | 
| 363 | r = 1; | 364 | r = 1; | 
| 364 | mac_end: | 365 | mac_end: | 
| 365 | if (mac_ctx) | 366 | if (mac_ctx) | 
| 366 | EVP_PKEY_CTX_free(mac_ctx); | 367 | EVP_PKEY_CTX_free(mac_ctx); | 
| 367 | if (r == 0) | 368 | if (r == 0) | 
| @@ -475,10 +476,11 @@ MAIN(int argc, char **argv) | |||
| 475 | perror(argv[i]); | 476 | perror(argv[i]); | 
| 476 | err++; | 477 | err++; | 
| 477 | continue; | 478 | continue; | 
| 478 | } else | 479 | } else { | 
| 479 | r = do_fp(out, buf, inp, separator, out_bin, | 480 | r = do_fp(out, buf, inp, separator, out_bin, | 
| 480 | sigkey, sigbuf, siglen, sig_name, md_name, | 481 | sigkey, sigbuf, siglen, sig_name, md_name, | 
| 481 | argv[i], bmd); | 482 | argv[i], bmd); | 
| 483 | } | ||
| 482 | if (r) | 484 | if (r) | 
| 483 | err = r; | 485 | err = r; | 
| 484 | (void)BIO_reset(bmd); | 486 | (void)BIO_reset(bmd); | 
| @@ -500,9 +502,10 @@ end: | |||
| 500 | sk_OPENSSL_STRING_free(sigopts); | 502 | sk_OPENSSL_STRING_free(sigopts); | 
| 501 | if (macopts) | 503 | if (macopts) | 
| 502 | sk_OPENSSL_STRING_free(macopts); | 504 | sk_OPENSSL_STRING_free(macopts); | 
| 503 | if (sigbuf) free(sigbuf); | 505 | if (sigbuf) | 
| 504 | if (bmd != NULL) | 506 | free(sigbuf); | 
| 505 | BIO_free(bmd); | 507 | if (bmd != NULL) | 
| 508 | BIO_free(bmd); | ||
| 506 | apps_shutdown(); | 509 | apps_shutdown(); | 
| 507 | OPENSSL_EXIT(err); | 510 | OPENSSL_EXIT(err); | 
| 508 | } | 511 | } | 
| @@ -559,8 +562,9 @@ do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout, | |||
| 559 | } | 562 | } | 
| 560 | } | 563 | } | 
| 561 | 564 | ||
| 562 | if (binout) BIO_write(out, buf, len); | 565 | if (binout) | 
| 563 | else if (sep == 2) { | 566 | BIO_write(out, buf, len); | 
| 567 | else if (sep == 2) { | ||
| 564 | for (i = 0; i < (int)len; i++) | 568 | for (i = 0; i < (int)len; i++) | 
| 565 | BIO_printf(out, "%02x", buf[i]); | 569 | BIO_printf(out, "%02x", buf[i]); | 
| 566 | BIO_printf(out, " *%s\n", file); | 570 | BIO_printf(out, " *%s\n", file); | 
| diff --git a/src/lib/libssl/src/apps/dhparam.c b/src/lib/libssl/src/apps/dhparam.c index d8fb930cb3..9e1b214458 100644 --- a/src/lib/libssl/src/apps/dhparam.c +++ b/src/lib/libssl/src/apps/dhparam.c | |||
| @@ -300,9 +300,10 @@ bad: | |||
| 300 | 300 | ||
| 301 | BIO_printf(bio_err, "Generating DSA parameters, %d bit long prime\n", num); | 301 | BIO_printf(bio_err, "Generating DSA parameters, %d bit long prime\n", num); | 
| 302 | if (!dsa || !DSA_generate_parameters_ex(dsa, num, | 302 | if (!dsa || !DSA_generate_parameters_ex(dsa, num, | 
| 303 | NULL, 0, NULL, NULL, &cb)) { | 303 | NULL, 0, NULL, NULL, &cb)) { | 
| 304 | if (dsa) DSA_free(dsa); | 304 | if (dsa) | 
| 305 | ERR_print_errors(bio_err); | 305 | DSA_free(dsa); | 
| 306 | ERR_print_errors(bio_err); | ||
| 306 | goto end; | 307 | goto end; | 
| 307 | } | 308 | } | 
| 308 | 309 | ||
