/*
- * Copyright 2000-2017 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
int RAND_egd(const char *path)
{
- return (-1);
+ return -1;
}
int RAND_egd_bytes(const char *path, int bytes)
{
- return (-1);
+ return -1;
}
# else
-# include <openssl/opensslconf.h>
# include OPENSSL_UNISTD
# include <stddef.h>
# include <sys/types.h>
memset(&addr, 0, sizeof(addr));
addr.sun_family = AF_UNIX;
if (strlen(path) >= sizeof(addr.sun_path))
- return (-1);
+ return -1;
strcpy(addr.sun_path, path);
i = offsetof(struct sockaddr_un, sun_path) + strlen(path);
fd = socket(AF_UNIX, SOCK_STREAM, 0);
if (fd == -1 || (fp = fdopen(fd, "r+")) == NULL)
- return (-1);
+ return -1;
+ setbuf(fp, NULL);
/* Try to connect */
for ( ; ; ) {
goto err;
ret = numbytes;
if (mybuffer)
- RAND_seed(tempbuf, i);
+ RAND_add(tempbuf, i, i);
err:
if (fp != NULL)
int RAND_egd(const char *path)
{
- return (RAND_egd_bytes(path, 255));
+ return RAND_egd_bytes(path, 255);
}
# endif