summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/usr.bin/openssl/dgst.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/usr.bin/openssl/dgst.c b/src/usr.bin/openssl/dgst.c
index 655b2083d0..c9ac057d01 100644
--- a/src/usr.bin/openssl/dgst.c
+++ b/src/usr.bin/openssl/dgst.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dgst.c,v 1.2 2015/07/20 17:10:45 doug Exp $ */ 1/* $OpenBSD: dgst.c,v 1.3 2015/07/20 18:23:52 rpointel Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -393,9 +393,14 @@ mac_end:
393 393
394 if (sigfile && sigkey) { 394 if (sigfile && sigkey) {
395 BIO *sigbio; 395 BIO *sigbio;
396 sigbio = BIO_new_file(sigfile, "rb");
397 siglen = EVP_PKEY_size(sigkey); 396 siglen = EVP_PKEY_size(sigkey);
398 sigbuf = malloc(siglen); 397 sigbuf = malloc(siglen);
398 if (sigbuf == NULL) {
399 BIO_printf(bio_err, "out of memory\n");
400 ERR_print_errors(bio_err);
401 goto end;
402 }
403 sigbio = BIO_new_file(sigfile, "rb");
399 if (!sigbio) { 404 if (!sigbio) {
400 BIO_printf(bio_err, "Error opening signature file %s\n", 405 BIO_printf(bio_err, "Error opening signature file %s\n",
401 sigfile); 406 sigfile);