RAND_bytes updates
[openssl.git] / crypto / des / enc_writ.c
index b4eecc38120318e4da19da210a85a29fecbca26a..55cc7fcb41011865748f9145e73aebee25b8bec1 100644 (file)
@@ -132,7 +132,8 @@ int DES_enc_write(int fd, const void *_buf, int len,
     if (len < 8) {
         cp = shortbuf;
         memcpy(shortbuf, buf, len);
-        RAND_pseudo_bytes(shortbuf + len, 8 - len);
+        if (RAND_bytes(shortbuf + len, 8 - len) <= 0)
+            return -1;
         rnum = 8;
     } else {
         cp = buf;