Skip to content

Commit f51e6e3

Browse files
deploy openssl/openssl@0daaf33 to master
1 parent 4f9c3b0 commit f51e6e3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

master/man3/RAND_load_file/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
int RAND_write_file(const char *filename);
1717

1818
const char *RAND_file_name(char *buf, size_t num);
19-
</code></pre></div><h2 id=description>DESCRIPTION<a class=headerlink href=#description title="Permanent link">&para;</a></h2><p>RAND_load_file() reads a number of bytes from file <strong>filename</strong> and adds them to the PRNG. If <strong>max_bytes</strong> is nonnegative, up to <strong>max_bytes</strong> are read; if <strong>max_bytes</strong> is -1, the complete file is read. Do not load the same file multiple times unless its contents have been updated by RAND_write_file() between reads. Also, note that <strong>filename</strong> should be adequately protected so that an attacker cannot replace or examine the contents. If <strong>filename</strong> is not a regular file, then user is considered to be responsible for any side effects, e.g. non-anticipated blocking or capture of controlling terminal.</p><p>RAND_write_file() writes a number of random bytes (currently 128) to file <strong>filename</strong> which can be used to initialize the PRNG by calling RAND_load_file() in a later session.</p><p>RAND_file_name() generates a default path for the random seed file. <strong>buf</strong> points to a buffer of size <strong>num</strong> in which to store the filename.</p><p>On all systems, if the environment variable <strong>RANDFILE</strong> is set, its value will be used as the seed filename. Otherwise, the file is called <code>.rnd</code>, found in platform dependent locations:</p><ul><li><p>On Windows (in order of preference)</p><div class=highlight><pre><span></span><code>%HOME%, %USERPROFILE%, %SYSTEMROOT%, C:\
19+
</code></pre></div><h2 id=description>DESCRIPTION<a class=headerlink href=#description title="Permanent link">&para;</a></h2><p>RAND_load_file() reads a number of bytes from file <strong>filename</strong> and adds them to the PRNG. If <strong>max_bytes</strong> is nonnegative, up to <strong>max_bytes</strong> are read; if <strong>max_bytes</strong> is -1, the complete file is read (unless the file is not a regular file, in that case a fixed number of bytes, 256 in the current implementation, is attempted to be read). RAND_load_file() can read less than the complete file or the requested number of bytes if it doesn&#39;t fit in the return value type. Do not load the same file multiple times unless its contents have been updated by RAND_write_file() between reads. Also, note that <strong>filename</strong> should be adequately protected so that an attacker cannot replace or examine the contents. If <strong>filename</strong> is not a regular file, then user is considered to be responsible for any side effects, e.g. non-anticipated blocking or capture of controlling terminal.</p><p>RAND_write_file() writes a number of random bytes (currently 128) to file <strong>filename</strong> which can be used to initialize the PRNG by calling RAND_load_file() in a later session.</p><p>RAND_file_name() generates a default path for the random seed file. <strong>buf</strong> points to a buffer of size <strong>num</strong> in which to store the filename.</p><p>On all systems, if the environment variable <strong>RANDFILE</strong> is set, its value will be used as the seed filename. Otherwise, the file is called <code>.rnd</code>, found in platform dependent locations:</p><ul><li><p>On Windows (in order of preference)</p><div class=highlight><pre><span></span><code>%HOME%, %USERPROFILE%, %SYSTEMROOT%, C:\
2020
</code></pre></div></li><li><p>On VMS</p><div class=highlight><pre><span></span><code>SYS$LOGIN:
2121
</code></pre></div></li><li><p>On all other systems</p><div class=highlight><pre><span></span><code>$HOME
2222
</code></pre></div></li></ul><p>If <code>$HOME</code> (on non-Windows and non-VMS system) is not set either, or <strong>num</strong> is too small for the pathname, an error occurs.</p><h2 id=return-values>RETURN VALUES<a class=headerlink href=#return-values title="Permanent link">&para;</a></h2><p>RAND_load_file() returns the number of bytes read or -1 on error.</p><p>RAND_write_file() returns the number of bytes written, or -1 if the bytes written were generated without appropriate seeding.</p><p>RAND_file_name() returns a pointer to <strong>buf</strong> on success, and NULL on error.</p><h2 id=see-also>SEE ALSO<a class=headerlink href=#see-also title="Permanent link">&para;</a></h2><p><a href=../RAND_add/ >RAND_add(3)</a>, <a href=../RAND_bytes/ >RAND_bytes(3)</a>, <a href=../../man7/RAND/ >RAND(7)</a></p><h2 id=copyright>COPYRIGHT<a class=headerlink href=#copyright title="Permanent link">&para;</a></h2><p>Copyright 2000-2020 The OpenSSL Project Authors. All Rights Reserved.</p><p>Licensed under the Apache License 2.0 (the &quot;License&quot;). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <a href=https://www.openssl.org/source/license.html>https://www.openssl.org/source/license.html</a>.</p></article></div><script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script></div></main><footer class=md-footer><div class="md-footer-meta md-typeset"><div class="md-footer-meta__inner md-grid"><div class=md-copyright> Made with <a href=https://squidfunk.github.io/mkdocs-material/ target=_blank rel=noopener> Material for MkDocs </a></div></div></div></footer></div><div class=md-dialog data-md-component=dialog><div class="md-dialog__inner md-typeset"></div></div><script id=__config type=application/json>{"base": "../..", "features": ["navigation.indexes", "navigation.instant", "navigation.path", "navigation.prune", "navigation.tabs", "navigation.tabs.sticky", "navigation.tracking", "search.suggest", "toc.follow"], "search": "../../assets/javascripts/workers/search.b8dbb3d2.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": {"default": "master", "provider": "mike"}}</script><script src=../../assets/javascripts/bundle.ad660dcc.min.js></script></body></html>

master/search/search_index.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)