summaryrefslogtreecommitdiffstats
path: root/crypto/openssl/crypto/des/enc_writ.c
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2000-04-13 06:33:22 +0000
committerkris <kris@FreeBSD.org>2000-04-13 06:33:22 +0000
commit54c77f990d8a5f46f1d18b67cddb279f49176146 (patch)
tree85b9c007d5ac1d91a3895eef3fd18d6114b62cc4 /crypto/openssl/crypto/des/enc_writ.c
parent7e4e44947b1aa16034c99654c268dc92300be719 (diff)
downloadFreeBSD-src-54c77f990d8a5f46f1d18b67cddb279f49176146.zip
FreeBSD-src-54c77f990d8a5f46f1d18b67cddb279f49176146.tar.gz
Initial import of OpenSSL 0.9.5a
Diffstat (limited to 'crypto/openssl/crypto/des/enc_writ.c')
-rw-r--r--crypto/openssl/crypto/des/enc_writ.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/crypto/openssl/crypto/des/enc_writ.c b/crypto/openssl/crypto/des/enc_writ.c
index ba3f082..4d34527 100644
--- a/crypto/openssl/crypto/des/enc_writ.c
+++ b/crypto/openssl/crypto/des/enc_writ.c
@@ -130,12 +130,12 @@ int des_enc_write(int fd, const void *_buf, int len,
{
cp=shortbuf;
memcpy(shortbuf,buf,len);
- RAND_bytes(shortbuf+len, 8-len);
+ RAND_pseudo_bytes(shortbuf+len, 8-len);
rnum=8;
}
else
{
- cp=(unsigned char*)buf;
+ cp=buf;
rnum=((len+7)/8*8); /* round up to nearest eight */
}
@@ -152,13 +152,16 @@ int des_enc_write(int fd, const void *_buf, int len,
for (j=0; j<outnum; j+=i)
{
/* eay 26/08/92 I was not doing writing from where we
- * got upto. */
- i=write(fd,&(outbuf[j]),outnum-j);
+ * got up to. */
+ i=write(fd,(void *)&(outbuf[j]),outnum-j);
if (i == -1)
{
+#ifdef EINTR
if (errno == EINTR)
i=0;
- else /* This is really a bad error - very bad
+ else
+#endif
+ /* This is really a bad error - very bad
* It will stuff-up both ends. */
return(-1);
}
OpenPOWER on IntegriCloud