101 lines
3.2 KiB
HTML
Executable File
101 lines
3.2 KiB
HTML
Executable File
<?xml version="1.0" ?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<title>BN_new</title>
|
|
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
|
<link rev="made" href="mailto:root@localhost" />
|
|
</head>
|
|
|
|
<body style="background-color: white">
|
|
|
|
|
|
<!-- INDEX BEGIN -->
|
|
<div name="index">
|
|
<p><a name="__index__"></a></p>
|
|
|
|
<ul>
|
|
|
|
<li><a href="#name">NAME</a></li>
|
|
<li><a href="#synopsis">SYNOPSIS</a></li>
|
|
<li><a href="#description">DESCRIPTION</a></li>
|
|
<li><a href="#return_values">RETURN VALUES</a></li>
|
|
<li><a href="#see_also">SEE ALSO</a></li>
|
|
<li><a href="#history">HISTORY</a></li>
|
|
<li><a href="#copyright">COPYRIGHT</a></li>
|
|
</ul>
|
|
|
|
<hr name="index" />
|
|
</div>
|
|
<!-- INDEX END -->
|
|
|
|
<p>
|
|
</p>
|
|
<hr />
|
|
<h1><a name="name">NAME</a></h1>
|
|
<p>BN_new, BN_secure_new, BN_clear, BN_free, BN_clear_free - allocate and free BIGNUMs</p>
|
|
<p>
|
|
</p>
|
|
<hr />
|
|
<h1><a name="synopsis">SYNOPSIS</a></h1>
|
|
<pre>
|
|
#include <openssl/bn.h></pre>
|
|
<pre>
|
|
BIGNUM *BN_new(void);</pre>
|
|
<pre>
|
|
BIGNUM *BN_secure_new(void);</pre>
|
|
<pre>
|
|
void BN_clear(BIGNUM *a);</pre>
|
|
<pre>
|
|
void BN_free(BIGNUM *a);</pre>
|
|
<pre>
|
|
void BN_clear_free(BIGNUM *a);</pre>
|
|
<p>
|
|
</p>
|
|
<hr />
|
|
<h1><a name="description">DESCRIPTION</a></h1>
|
|
<p><code>BN_new()</code> allocates and initializes a <strong>BIGNUM</strong> structure.
|
|
<code>BN_secure_new()</code> does the same except that the secure heap
|
|
<em>OPENSSL_secure_malloc(3)</em> is used to store the value.</p>
|
|
<p><code>BN_clear()</code> is used to destroy sensitive data such as keys when they
|
|
are no longer needed. It erases the memory used by <strong>a</strong> and sets it
|
|
to the value 0.
|
|
If <strong>a</strong> is NULL, nothing is done.</p>
|
|
<p><code>BN_free()</code> frees the components of the <strong>BIGNUM</strong>, and if it was created
|
|
by <code>BN_new()</code>, also the structure itself. <code>BN_clear_free()</code> additionally
|
|
overwrites the data before the memory is returned to the system.
|
|
If <strong>a</strong> is NULL, nothing is done.</p>
|
|
<p>
|
|
</p>
|
|
<hr />
|
|
<h1><a name="return_values">RETURN VALUES</a></h1>
|
|
<p><code>BN_new()</code> and <code>BN_secure_new()</code>
|
|
return a pointer to the <strong>BIGNUM</strong> initialised to the value 0.
|
|
If the allocation fails,
|
|
they return <strong>NULL</strong> and set an error code that can be obtained
|
|
by <em>ERR_get_error(3)</em>.</p>
|
|
<p><code>BN_clear()</code>, <code>BN_free()</code> and <code>BN_clear_free()</code> have no return values.</p>
|
|
<p>
|
|
</p>
|
|
<hr />
|
|
<h1><a name="see_also">SEE ALSO</a></h1>
|
|
<p><em>ERR_get_error(3)</em>, <em>OPENSSL_secure_malloc(3)</em></p>
|
|
<p>
|
|
</p>
|
|
<hr />
|
|
<h1><a name="history">HISTORY</a></h1>
|
|
<p><code>BN_init()</code> was removed in OpenSSL 1.1.0; use <code>BN_new()</code> instead.</p>
|
|
<p>
|
|
</p>
|
|
<hr />
|
|
<h1><a name="copyright">COPYRIGHT</a></h1>
|
|
<p>Copyright 2000-2017 The OpenSSL Project Authors. All Rights Reserved.</p>
|
|
<p>Licensed under the Apache License 2.0 (the "License"). 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>
|
|
|
|
</body>
|
|
|
|
</html>
|