summaryrefslogtreecommitdiff
path: root/src/usr.bin/openssl/enc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr.bin/openssl/enc.c')
-rw-r--r--src/usr.bin/openssl/enc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/usr.bin/openssl/enc.c b/src/usr.bin/openssl/enc.c
index 1a3b8f21b3..b5aaab9842 100644
--- a/src/usr.bin/openssl/enc.c
+++ b/src/usr.bin/openssl/enc.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: enc.c,v 1.2 2014/09/01 20:54:37 doug Exp $ */ 1/* $OpenBSD: enc.c,v 1.3 2014/10/22 13:54:03 jsing 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 *
@@ -69,7 +69,6 @@
69#include <openssl/evp.h> 69#include <openssl/evp.h>
70#include <openssl/objects.h> 70#include <openssl/objects.h>
71#include <openssl/pem.h> 71#include <openssl/pem.h>
72#include <openssl/rand.h>
73#include <openssl/x509.h> 72#include <openssl/x509.h>
74 73
75int set_hex(char *in, unsigned char *out, int size); 74int set_hex(char *in, unsigned char *out, int size);
@@ -461,8 +460,9 @@ enc_main(int argc, char **argv)
461 "invalid hex salt value\n"); 460 "invalid hex salt value\n");
462 goto end; 461 goto end;
463 } 462 }
464 } else if (RAND_pseudo_bytes(salt, sizeof salt) < 0) 463 } else
465 goto end; 464 arc4random_buf(salt,
465 sizeof(salt));
466 /* 466 /*
467 * If -P option then don't bother 467 * If -P option then don't bother
468 * writing 468 * writing