Lines Matching defs:file
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
83 * -1 read the complete file; otherwise read the specified amount.
85 int RAND_load_file(const char *file, long bytes)
106 if ((in = openssl_fopen(file, "rb")) == NULL) {
108 "Filename=%s", file);
115 "Filename=%s", file);
139 * Don't buffer, because even if |file| is regular file, we have
175 ERR_raise_data(ERR_LIB_RAND, RAND_R_RESEED_ERROR, "Filename=%s", file);
182 int RAND_write_file(const char *file)
190 if (stat(file, &sb) >= 0 && !S_ISREG(sb.st_mode)) {
192 "Filename=%s", file);
208 * chmod(..., 0600) is too late to protect the file, permissions
211 int fd = open(file, O_WRONLY | O_CREAT | O_BINARY, 0600);
218 "Filename=%s", file);
228 * the rand file for each call into this routine, then deleted all
233 * the top-level version of the rand file. Note that there may still be
234 * conditions where the top-level rand file is locked. If so, this code
235 * will then create a new version of the rand file. Without the delete
236 * and rename code, this can result in ascending file versions that stop
239 * concurrent use of the rand file, or synchronize usage at the
241 * rand file in a concurrent use situation.
243 out = openssl_fopen(file, "rb+");
247 out = openssl_fopen(file, "wb");
250 "Filename=%s", file);
258 chmod(file, 0600);