summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/crypto/getentropy_osx.c
diff options
context:
space:
mode:
authorbeck <>2014-07-13 08:24:20 +0000
committerbeck <>2014-07-13 08:24:20 +0000
commitebcfa9213de55892e384e1b884c4751637991f5f (patch)
treecc700dd34961148aad099ecbd212e3b44328c09f /src/lib/libcrypto/crypto/getentropy_osx.c
parenta6ba1a5d2fcf97f553aee1fbc4215ea2f01ff04c (diff)
downloadopenbsd-ebcfa9213de55892e384e1b884c4751637991f5f.tar.gz
openbsd-ebcfa9213de55892e384e1b884c4751637991f5f.tar.bz2
openbsd-ebcfa9213de55892e384e1b884c4751637991f5f.zip
Take away the use of the address of main as a source of entropy. Causes
distractions to people testing and seeing link errors in some setups. This will come back in another form ok deraadt@
Diffstat (limited to 'src/lib/libcrypto/crypto/getentropy_osx.c')
-rw-r--r--src/lib/libcrypto/crypto/getentropy_osx.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/libcrypto/crypto/getentropy_osx.c b/src/lib/libcrypto/crypto/getentropy_osx.c
index c7e09c78a5..3c4852e709 100644
--- a/src/lib/libcrypto/crypto/getentropy_osx.c
+++ b/src/lib/libcrypto/crypto/getentropy_osx.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: getentropy_osx.c,v 1.4 2014/07/12 20:41:47 wouter Exp $ */ 1/* $OpenBSD: getentropy_osx.c,v 1.5 2014/07/13 08:24:20 beck Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2014 Theo de Raadt <deraadt@openbsd.org> 4 * Copyright (c) 2014 Theo de Raadt <deraadt@openbsd.org>
@@ -74,7 +74,9 @@
74 74
75int getentropy(void *buf, size_t len); 75int getentropy(void *buf, size_t len);
76 76
77#if 0
77extern int main(int, char *argv[]); 78extern int main(int, char *argv[]);
79#endif
78static int gotdata(char *buf, size_t len); 80static int gotdata(char *buf, size_t len);
79static int getentropy_urandom(void *buf, size_t len); 81static int getentropy_urandom(void *buf, size_t len);
80static int getentropy_fallback(void *buf, size_t len); 82static int getentropy_fallback(void *buf, size_t len);
@@ -292,7 +294,9 @@ getentropy_fallback(void *buf, size_t len)
292 HX(sigprocmask(SIG_BLOCK, NULL, &sigset) == -1, 294 HX(sigprocmask(SIG_BLOCK, NULL, &sigset) == -1,
293 sigset); 295 sigset);
294 296
297#if 0
295 HF(main); /* an addr in program */ 298 HF(main); /* an addr in program */
299#endif
296 HF(getentropy); /* an addr in this library */ 300 HF(getentropy); /* an addr in this library */
297 HF(printf); /* an addr in libc */ 301 HF(printf); /* an addr in libc */
298 p = (char *)&p; 302 p = (char *)&p;