128 lines
5.1 KiB
HTML
128 lines
5.1 KiB
HTML
|
<?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>DH_set_method</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>DH_set_default_method, DH_get_default_method,
|
||
|
DH_set_method, DH_new_method, DH_OpenSSL - select DH method</p>
|
||
|
<p>
|
||
|
</p>
|
||
|
<hr />
|
||
|
<h1><a name="synopsis">SYNOPSIS</a></h1>
|
||
|
<pre>
|
||
|
#include <openssl/dh.h></pre>
|
||
|
<p>Deprecated since OpenSSL 3.0, can be hidden entirely by defining
|
||
|
<strong>OPENSSL_API_COMPAT</strong> with a suitable version value, see
|
||
|
<em>openssl_user_macros(7)</em>:</p>
|
||
|
<pre>
|
||
|
void DH_set_default_method(const DH_METHOD *meth);</pre>
|
||
|
<pre>
|
||
|
const DH_METHOD *DH_get_default_method(void);</pre>
|
||
|
<pre>
|
||
|
int DH_set_method(DH *dh, const DH_METHOD *meth);</pre>
|
||
|
<pre>
|
||
|
DH *DH_new_method(ENGINE *engine);</pre>
|
||
|
<pre>
|
||
|
const DH_METHOD *DH_OpenSSL(void);</pre>
|
||
|
<p>
|
||
|
</p>
|
||
|
<hr />
|
||
|
<h1><a name="description">DESCRIPTION</a></h1>
|
||
|
<p>All of the functions described on this page are deprecated.
|
||
|
Applications should instead use the provider APIs.</p>
|
||
|
<p>A <strong>DH_METHOD</strong> specifies the functions that OpenSSL uses for Diffie-Hellman
|
||
|
operations. By modifying the method, alternative implementations
|
||
|
such as hardware accelerators may be used. IMPORTANT: See the NOTES section for
|
||
|
important information about how these DH API functions are affected by the use
|
||
|
of <strong>ENGINE</strong> API calls.</p>
|
||
|
<p>Initially, the default DH_METHOD is the OpenSSL internal implementation, as
|
||
|
returned by <code>DH_OpenSSL()</code>.</p>
|
||
|
<p><code>DH_set_default_method()</code> makes <strong>meth</strong> the default method for all DH
|
||
|
structures created later.
|
||
|
<strong>NB</strong>: This is true only whilst no ENGINE has been set
|
||
|
as a default for DH, so this function is no longer recommended.
|
||
|
This function is not thread-safe and should not be called at the same time
|
||
|
as other OpenSSL functions.</p>
|
||
|
<p><code>DH_get_default_method()</code> returns a pointer to the current default DH_METHOD.
|
||
|
However, the meaningfulness of this result is dependent on whether the ENGINE
|
||
|
API is being used, so this function is no longer recommended.</p>
|
||
|
<p><code>DH_set_method()</code> selects <strong>meth</strong> to perform all operations using the key <strong>dh</strong>.
|
||
|
This will replace the DH_METHOD used by the DH key and if the previous method
|
||
|
was supplied by an ENGINE, the handle to that ENGINE will be released during the
|
||
|
change. It is possible to have DH keys that only work with certain DH_METHOD
|
||
|
implementations (eg. from an ENGINE module that supports embedded
|
||
|
hardware-protected keys), and in such cases attempting to change the DH_METHOD
|
||
|
for the key can have unexpected results.</p>
|
||
|
<p><code>DH_new_method()</code> allocates and initializes a DH structure so that <strong>engine</strong> will
|
||
|
be used for the DH operations. If <strong>engine</strong> is NULL, the default ENGINE for DH
|
||
|
operations is used, and if no default ENGINE is set, the DH_METHOD controlled by
|
||
|
<code>DH_set_default_method()</code> is used.</p>
|
||
|
<p>A new DH_METHOD object may be constructed using <code>DH_meth_new()</code> (see
|
||
|
<em>DH_meth_new(3)</em>).</p>
|
||
|
<p>
|
||
|
</p>
|
||
|
<hr />
|
||
|
<h1><a name="return_values">RETURN VALUES</a></h1>
|
||
|
<p><code>DH_OpenSSL()</code> and <code>DH_get_default_method()</code> return pointers to the respective
|
||
|
<strong>DH_METHOD</strong>s.</p>
|
||
|
<p><code>DH_set_default_method()</code> returns no value.</p>
|
||
|
<p><code>DH_set_method()</code> returns nonzero if the provided <strong>meth</strong> was successfully set as
|
||
|
the method for <strong>dh</strong> (including unloading the ENGINE handle if the previous
|
||
|
method was supplied by an ENGINE).</p>
|
||
|
<p><code>DH_new_method()</code> returns NULL and sets an error code that can be obtained by
|
||
|
<em>ERR_get_error(3)</em> if the allocation fails. Otherwise it
|
||
|
returns a pointer to the newly allocated structure.</p>
|
||
|
<p>
|
||
|
</p>
|
||
|
<hr />
|
||
|
<h1><a name="see_also">SEE ALSO</a></h1>
|
||
|
<p><em>DH_new(3)</em>, <em>DH_new(3)</em>, <em>DH_meth_new(3)</em></p>
|
||
|
<p>
|
||
|
</p>
|
||
|
<hr />
|
||
|
<h1><a name="history">HISTORY</a></h1>
|
||
|
<p>All of these functions were deprecated in OpenSSL 3.0.</p>
|
||
|
<p>
|
||
|
</p>
|
||
|
<hr />
|
||
|
<h1><a name="copyright">COPYRIGHT</a></h1>
|
||
|
<p>Copyright 2000-2016 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>
|