Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(803)

Side by Side Diff: openssl/crypto/rand/rand_egd.c

Issue 9254031: Upgrade chrome's OpenSSL to same version Android ships with. (Closed) Base URL: http://src.chromium.org/svn/trunk/deps/third_party/openssl/
Patch Set: '' Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « openssl/crypto/rand/rand.h ('k') | openssl/crypto/rand/rand_eng.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* crypto/rand/rand_egd.c */ 1 /* crypto/rand/rand_egd.c */
2 /* Written by Ulf Moeller and Lutz Jaenicke for the OpenSSL project. */ 2 /* Written by Ulf Moeller and Lutz Jaenicke for the OpenSSL project. */
3 /* ==================================================================== 3 /* ====================================================================
4 * Copyright (c) 1998-2000 The OpenSSL Project. All rights reserved. 4 * Copyright (c) 1998-2000 The OpenSSL Project. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 * if the PRNG has still not received the required seeding. 88 * if the PRNG has still not received the required seeding.
89 * num the number of bytes read from the EGD socket. This number is either 89 * num the number of bytes read from the EGD socket. This number is either
90 * the number of bytes requested or smaller, if the EGD pool is 90 * the number of bytes requested or smaller, if the EGD pool is
91 * drained and the daemon signals that the pool is empty. 91 * drained and the daemon signals that the pool is empty.
92 * 92 *
93 * RAND_egd(path) will query 255 bytes and use the bytes retreived to seed 93 * RAND_egd(path) will query 255 bytes and use the bytes retreived to seed
94 * the PRNG. 94 * the PRNG.
95 * RAND_egd() is a wrapper for RAND_egd_bytes() with numbytes=255. 95 * RAND_egd() is a wrapper for RAND_egd_bytes() with numbytes=255.
96 */ 96 */
97 97
98 #if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SY S_MSDOS) || defined(OPENSSL_SYS_VXWORKS) || defined(OPENSSL_SYS_NETWARE) || defi ned(OPENSSL_SYS_VOS) 98 #if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SY S_MSDOS) || defined(OPENSSL_SYS_VXWORKS) || defined(OPENSSL_SYS_NETWARE) || defi ned(OPENSSL_SYS_VOS) || defined(OPENSSL_SYS_BEOS)
99 int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes) 99 int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes)
100 { 100 {
101 return(-1); 101 return(-1);
102 } 102 }
103 int RAND_egd(const char *path) 103 int RAND_egd(const char *path)
104 { 104 {
105 return(-1); 105 return(-1);
106 } 106 }
107 107
108 int RAND_egd_bytes(const char *path,int bytes) 108 int RAND_egd_bytes(const char *path,int bytes)
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 } 294 }
295 295
296 296
297 int RAND_egd(const char *path) 297 int RAND_egd(const char *path)
298 { 298 {
299 return (RAND_egd_bytes(path, 255)); 299 return (RAND_egd_bytes(path, 255));
300 } 300 }
301 301
302 302
303 #endif 303 #endif
OLDNEW
« no previous file with comments | « openssl/crypto/rand/rand.h ('k') | openssl/crypto/rand/rand_eng.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698