161 lines
6.1 KiB
HTML
Executable File
161 lines
6.1 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>openssl-core.h</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="#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>openssl/core.h - OpenSSL Core types</p>
|
|
<p>
|
|
</p>
|
|
<hr />
|
|
<h1><a name="synopsis">SYNOPSIS</a></h1>
|
|
<pre>
|
|
#include <openssl/core.h></pre>
|
|
<p>
|
|
</p>
|
|
<hr />
|
|
<h1><a name="description">DESCRIPTION</a></h1>
|
|
<p>The <em class="file"><openssl/core.h</em> >> header defines a number of public types that
|
|
are used to communicate between the OpenSSL libraries and
|
|
implementation providers.
|
|
These types are designed to minimise the need for intimate knowledge
|
|
of internal structures between the OpenSSL libraries and the providers.</p>
|
|
<p>The types are:</p>
|
|
<dl>
|
|
<dt><strong><a name="ossl_dispatch" class="item"><strong>OSSL_DISPATCH</strong></a></strong></dt>
|
|
|
|
<dd>
|
|
<p>This type is a tuple of function identity and function pointer.
|
|
Arrays of this type are passed between the OpenSSL libraries and the
|
|
providers to describe what functionality one side provides to the
|
|
other.
|
|
Arrays of this type must be terminated with a tuple having function
|
|
identity zero and function pointer NULL.</p>
|
|
<p>The available function identities and corresponding function
|
|
signatures are defined in <em>openssl-core_numbers.h(7)</em>.</p>
|
|
<p>Any function identity not recognised by the recipient of this type
|
|
will be ignored.
|
|
This ensures that providers built with one OpenSSL version in mind
|
|
will work together with any other OpenSSL version that supports this
|
|
mechanism.</p>
|
|
</dd>
|
|
<dt><strong><a name="ossl_item" class="item"><strong>OSSL_ITEM</strong></a></strong></dt>
|
|
|
|
<dd>
|
|
<p>This type is a tuple of integer and pointer.
|
|
It's a generic type used as a generic descriptor, its exact meaning
|
|
being defined by how it's used.
|
|
Arrays of this type are passed between the OpenSSL libraries and the
|
|
providers, and must be terminated with a tuple where the integer is
|
|
zero and the pointer NULL.</p>
|
|
</dd>
|
|
<dt><strong><a name="ossl_algorithm" class="item"><strong>OSSL_ALGORITHM</strong></a></strong></dt>
|
|
|
|
<dd>
|
|
<p>This type is a tuple of an algorithm name (string), a property
|
|
definition (string) and a dispatch table (array of <strong>OSSL_DISPATCH</strong>).
|
|
Arrays of this type are passed on demand from the providers to the
|
|
OpenSSL libraries to describe what algorithms the providers provide
|
|
implementations of, and with what properties.
|
|
Arrays of this type must be terminated with a tuple having function
|
|
identity zero and function pointer NULL.</p>
|
|
<p>The algorithm names and property definitions are defined by the
|
|
providers.</p>
|
|
</dd>
|
|
<dt><strong><a name="ossl_param" class="item"><strong>OSSL_PARAM</strong></a></strong></dt>
|
|
|
|
<dd>
|
|
<p>This type is a structure that allows passing arbitrary object data
|
|
between two parties that have no or very little shared knowledge about
|
|
their respective internal structures for that object.
|
|
It's normally passed in arrays, where the array is terminated with an
|
|
element where all fields are zero (for non-pointers) or NULL (for
|
|
pointers).</p>
|
|
<p>These arrays can be used to set parameters for some object, to request
|
|
parameters, and to describe parameters.</p>
|
|
<p><strong>OSSL_PARAM</strong> is further described in <a href="#ossl_param">OSSL_PARAM(3)</a></p>
|
|
</dd>
|
|
<dt><strong><a name="ossl_callback" class="item"><strong>OSSL_CALLBACK</strong></a></strong></dt>
|
|
|
|
<dd>
|
|
<p>This is a function type for a generic feedback callback function:</p>
|
|
<pre>
|
|
typedef int (OSSL_CALLBACK)(const OSSL_PARAM params[], void *arg);</pre>
|
|
<p>A function that takes a pointer of this type should also take a
|
|
pointer to caller data. When calling this callback, the function is
|
|
expected to build an <strong>OSSL_PARAM</strong> array of data it wants or is
|
|
expected to pass back, and pass that as <em>params</em>, as well as
|
|
the caller data pointer it received, as <em>arg</em>.</p>
|
|
</dd>
|
|
<dt><strong><a name="ossl_passphrase_callback" class="item"><strong>OSSL_PASSPHRASE_CALLBACK</strong></a></strong></dt>
|
|
|
|
<dd>
|
|
<p>This is a function type for a generic pass phrase callback function:</p>
|
|
<pre>
|
|
typedef int (OSSL_PASSPHRASE_CALLBACK)(char *pass, size_t pass_size,
|
|
size_t *pass_len,
|
|
const OSSL_PARAM params[],
|
|
void *arg);</pre>
|
|
<p>This callback can be used to prompt the user for a passphrase. When
|
|
calling it, a buffer to store the pass phrase needs to be given with
|
|
<em>pass</em>, and its size with <em>pass_size</em>. The length of the prompted
|
|
pass phrase will be given back in <em>*pass_len</em>.</p>
|
|
<p>Additional parameters can be passed with the <strong>OSSL_PARAM</strong> array
|
|
<em>params</em>.</p>
|
|
<p>A function that takes a pointer of this type should also take a
|
|
pointer to caller data, which should be passed as <em>arg</em> to this
|
|
callback.</p>
|
|
</dd>
|
|
</dl>
|
|
<p>
|
|
</p>
|
|
<hr />
|
|
<h1><a name="see_also">SEE ALSO</a></h1>
|
|
<p><em>openssl-core_numbers.h(7)</em></p>
|
|
<p>
|
|
</p>
|
|
<hr />
|
|
<h1><a name="history">HISTORY</a></h1>
|
|
<p>The types described here were added in OpenSSL 3.0.</p>
|
|
<p>
|
|
</p>
|
|
<hr />
|
|
<h1><a name="copyright">COPYRIGHT</a></h1>
|
|
<p>Copyright 2019 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>
|