diff options
Diffstat (limited to 'src/lib/libcrypto/des/enc_writ.c')
-rw-r--r-- | src/lib/libcrypto/des/enc_writ.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/libcrypto/des/enc_writ.c b/src/lib/libcrypto/des/enc_writ.c index a7049ff44e..0130c2c6d9 100644 --- a/src/lib/libcrypto/des/enc_writ.c +++ b/src/lib/libcrypto/des/enc_writ.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: enc_writ.c,v 1.12 2014/07/11 08:44:48 jsing Exp $ */ | 1 | /* $OpenBSD: enc_writ.c,v 1.13 2014/10/22 13:02:04 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 | * |
@@ -58,12 +58,11 @@ | |||
58 | 58 | ||
59 | #include <errno.h> | 59 | #include <errno.h> |
60 | #include <stdio.h> | 60 | #include <stdio.h> |
61 | #include <stdlib.h> | ||
61 | #include <time.h> | 62 | #include <time.h> |
62 | 63 | ||
63 | #include <openssl/opensslconf.h> | 64 | #include <openssl/opensslconf.h> |
64 | 65 | ||
65 | #include <openssl/rand.h> | ||
66 | |||
67 | #include "des_locl.h" | 66 | #include "des_locl.h" |
68 | 67 | ||
69 | /* | 68 | /* |
@@ -136,7 +135,7 @@ int DES_enc_write(int fd, const void *_buf, int len, | |||
136 | { | 135 | { |
137 | cp=shortbuf; | 136 | cp=shortbuf; |
138 | memcpy(shortbuf,buf,len); | 137 | memcpy(shortbuf,buf,len); |
139 | RAND_pseudo_bytes(shortbuf+len, 8-len); | 138 | arc4random_buf(shortbuf+len, 8-len); |
140 | rnum=8; | 139 | rnum=8; |
141 | } | 140 | } |
142 | else | 141 | else |