summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2014-10-22 14:02:52 +0000
committerjsing <jsing@openbsd.org>2014-10-22 14:02:52 +0000
commit8c09987d76f4d5b0ba0c70d511f5c871bce5e186 (patch)
tree083c677185f60e2af608c301ee7947a3d699f975 /lib
parentUse arc4random_buf() instead of RAND(_pseudo)?_bytes(). (diff)
downloadwireguard-openbsd-8c09987d76f4d5b0ba0c70d511f5c871bce5e186.tar.xz
wireguard-openbsd-8c09987d76f4d5b0ba0c70d511f5c871bce5e186.zip
Place most of the RAND_* functions under #ifndef LIBRESSL_INTERNAL (some
are still needed for the engine). Our code should use arc4random instead.
Diffstat (limited to 'lib')
-rw-r--r--lib/libcrypto/rand/rand.h5
-rw-r--r--lib/libssl/src/crypto/rand/rand.h5
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/libcrypto/rand/rand.h b/lib/libcrypto/rand/rand.h
index 6ed16b9c412..fcb2e9218d0 100644
--- a/lib/libcrypto/rand/rand.h
+++ b/lib/libcrypto/rand/rand.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: rand.h,v 1.21 2014/07/10 22:45:57 jsing Exp $ */
+/* $OpenBSD: rand.h,v 1.22 2014/10/22 14:02:52 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -87,6 +87,8 @@ const RAND_METHOD *RAND_get_rand_method(void);
int RAND_set_rand_engine(ENGINE *engine);
#endif
RAND_METHOD *RAND_SSLeay(void);
+
+#ifndef LIBRESSL_INTERNAL
void RAND_cleanup(void );
int RAND_bytes(unsigned char *buf, int num);
int RAND_pseudo_bytes(unsigned char *buf, int num);
@@ -97,6 +99,7 @@ int RAND_write_file(const char *file);
const char *RAND_file_name(char *file, size_t num);
int RAND_status(void);
int RAND_poll(void);
+#endif
/* BEGIN ERROR CODES */
/* The following lines are auto generated by the script mkerr.pl. Any changes
diff --git a/lib/libssl/src/crypto/rand/rand.h b/lib/libssl/src/crypto/rand/rand.h
index 6ed16b9c412..fcb2e9218d0 100644
--- a/lib/libssl/src/crypto/rand/rand.h
+++ b/lib/libssl/src/crypto/rand/rand.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: rand.h,v 1.21 2014/07/10 22:45:57 jsing Exp $ */
+/* $OpenBSD: rand.h,v 1.22 2014/10/22 14:02:52 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -87,6 +87,8 @@ const RAND_METHOD *RAND_get_rand_method(void);
int RAND_set_rand_engine(ENGINE *engine);
#endif
RAND_METHOD *RAND_SSLeay(void);
+
+#ifndef LIBRESSL_INTERNAL
void RAND_cleanup(void );
int RAND_bytes(unsigned char *buf, int num);
int RAND_pseudo_bytes(unsigned char *buf, int num);
@@ -97,6 +99,7 @@ int RAND_write_file(const char *file);
const char *RAND_file_name(char *file, size_t num);
int RAND_status(void);
int RAND_poll(void);
+#endif
/* BEGIN ERROR CODES */
/* The following lines are auto generated by the script mkerr.pl. Any changes