Update pre9
This commit is contained in:
@@ -3,11 +3,13 @@
|
||||
=head1 NAME
|
||||
|
||||
EVP_MD_CTX_new, EVP_MD_CTX_reset, EVP_MD_CTX_free, EVP_MD_CTX_copy_ex,
|
||||
EVP_MD_CTX_ctrl, EVP_DigestInit_ex, EVP_DigestInit, EVP_DigestUpdate,
|
||||
EVP_MD_CTX_ctrl, EVP_MD_CTX_set_flags, EVP_MD_CTX_clear_flags,
|
||||
EVP_MD_CTX_test_flags, EVP_DigestInit_ex, EVP_DigestInit, EVP_DigestUpdate,
|
||||
EVP_DigestFinal_ex, EVP_DigestFinalXOF, EVP_DigestFinal,
|
||||
EVP_MD_CTX_copy, EVP_MD_type, EVP_MD_pkey_type, EVP_MD_size,
|
||||
EVP_MD_block_size, EVP_MD_CTX_md, EVP_MD_CTX_size,
|
||||
EVP_MD_CTX_block_size, EVP_MD_CTX_type, EVP_md_null,
|
||||
EVP_MD_CTX_block_size, EVP_MD_CTX_type, EVP_MD_CTX_md_data,
|
||||
EVP_md_null,
|
||||
EVP_get_digestbyname, EVP_get_digestbynid,
|
||||
EVP_get_digestbyobj - EVP digest routines
|
||||
|
||||
@@ -19,6 +21,9 @@ EVP_get_digestbyobj - EVP digest routines
|
||||
int EVP_MD_CTX_reset(EVP_MD_CTX *ctx);
|
||||
void EVP_MD_CTX_free(EVP_MD_CTX *ctx);
|
||||
void EVP_MD_CTX_ctrl(EVP_MD_CTX *ctx, int cmd, int p1, void* p2);
|
||||
void EVP_MD_CTX_set_flags(EVP_MD_CTX *ctx, int flags);
|
||||
void EVP_MD_CTX_clear_flags(EVP_MD_CTX *ctx, int flags);
|
||||
int EVP_MD_CTX_test_flags(const EVP_MD_CTX *ctx, int flags);
|
||||
|
||||
int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl);
|
||||
int EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *d, size_t cnt);
|
||||
@@ -41,6 +46,7 @@ EVP_get_digestbyobj - EVP digest routines
|
||||
int EVP_MD_CTX_size(const EVP_MD *ctx);
|
||||
int EVP_MD_CTX_block_size(const EVP_MD *ctx);
|
||||
int EVP_MD_CTX_type(const EVP_MD *ctx);
|
||||
void *EVP_MD_CTX_md_data(const EVP_MD_CTX *ctx);
|
||||
|
||||
const EVP_MD *EVP_md_null(void);
|
||||
|
||||
@@ -72,6 +78,10 @@ Cleans up digest context B<ctx> and frees up the space allocated to it.
|
||||
|
||||
Performs digest-specific control actions on context B<ctx>.
|
||||
|
||||
=item EVP_MD_CTX_set_flags(), EVP_MD_CTX_clear_flags(), EVP_MD_CTX_test_flags()
|
||||
|
||||
Sets, clears and tests B<ctx> flags. See L</FLAGS> below for more information.
|
||||
|
||||
=item EVP_DigestInit_ex()
|
||||
|
||||
Sets up digest context B<ctx> to use a digest B<type> from ENGINE B<impl>.
|
||||
@@ -140,6 +150,12 @@ Return the NID of the OBJECT IDENTIFIER representing the given message digest
|
||||
when passed an B<EVP_MD> structure. For example, C<EVP_MD_type(EVP_sha1())>
|
||||
returns B<NID_sha1>. This function is normally used when setting ASN1 OIDs.
|
||||
|
||||
=item EVP_MD_CTX_md_data()
|
||||
|
||||
Return the digest method private data for the passed B<EVP_MD_CTX>.
|
||||
The space is allocated by OpenSSL and has the size originally set with
|
||||
EVP_MD_meth_set_app_datasize().
|
||||
|
||||
=item EVP_MD_CTX_md()
|
||||
|
||||
Returns the B<EVP_MD> structure corresponding to the passed B<EVP_MD_CTX>.
|
||||
@@ -165,6 +181,38 @@ B<ASN1_OBJECT> structure respectively.
|
||||
|
||||
=back
|
||||
|
||||
=head1 FLAGS
|
||||
|
||||
EVP_MD_CTX_set_flags(), EVP_MD_CTX_clear_flags() and EVP_MD_CTX_test_flags()
|
||||
can be used the manipulate and test these B<EVP_MD_CTX> flags:
|
||||
|
||||
=over 4
|
||||
|
||||
=item EVP_MD_CTX_FLAG_ONESHOT
|
||||
|
||||
This flag instructs the digest to optimize for one update only, if possible.
|
||||
|
||||
=for comment EVP_MD_CTX_FLAG_CLEANED is internal, don't mention it
|
||||
|
||||
=for comment EVP_MD_CTX_FLAG_REUSE is internal, don't mention it
|
||||
|
||||
=for comment We currently avoid documenting flags that are only bit holder:
|
||||
EVP_MD_CTX_FLAG_NON_FIPS_ALLOW, EVP_MD_CTX_FLAGS_PAD_*
|
||||
|
||||
=item EVP_MD_CTX_FLAG_NO_INIT
|
||||
|
||||
This flag instructs EVP_DigestInit() and similar not to initialise the
|
||||
implementation specific data.
|
||||
|
||||
=item EVP_MD_CTX_FLAG_FINALISE
|
||||
|
||||
Some functions such as EVP_DigestSign only finalise copies of internal
|
||||
contexts so additional data can be included after the finalisation call.
|
||||
This is inefficient if this functionality is not required, and can be
|
||||
disabled with this flag.
|
||||
|
||||
=back
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
=over 4
|
||||
|
||||
@@ -211,6 +211,18 @@ that there will be no forward secrecy for the resumed session.
|
||||
enables strict mode protocol handling. Equivalent to setting
|
||||
B<SSL_CERT_FLAG_TLS_STRICT>.
|
||||
|
||||
=item B<-anti_replay>, B<-no_anti_replay>
|
||||
|
||||
Switches replay protection, on or off respectively. With replay protection on,
|
||||
OpenSSL will automatically detect if a session ticket has been used more than
|
||||
once, TLSv1.3 has been negotiated, and early data is enabled on the server. A
|
||||
full handshake is forced if a session ticket is used a second or subsequent
|
||||
time. Anti-Replay is on by default unless overridden by a configuration file and
|
||||
is only used by servers. Anti-replay measures are required for compliance with
|
||||
the TLSv1.3 specification. Some applications may be able to mitigate the replay
|
||||
risks in other ways and in such cases the built-in OpenSSL functionality is not
|
||||
required. Switching off anti-replay is equivalent to B<SSL_OP_NO_ANTI_REPLAY>.
|
||||
|
||||
=back
|
||||
|
||||
=head1 SUPPORTED CONFIGURATION FILE COMMANDS
|
||||
@@ -441,6 +453,15 @@ middleboxes that do not understand TLSv1.3 will not drop the connection. This
|
||||
option is set by default. A future version of OpenSSL may not set this by
|
||||
default. Equivalent to B<SSL_OP_ENABLE_MIDDLEBOX_COMPAT>.
|
||||
|
||||
B<AntiReplay>: If set then OpenSSL will automatically detect if a session ticket
|
||||
has been used more than once, TLSv1.3 has been negotiated, and early data is
|
||||
enabled on the server. A full handshake is forced if a session ticket is used a
|
||||
second or subsequent time. This option is set by default and is only used by
|
||||
servers. Anti-replay measures are required to comply with the TLSv1.3
|
||||
specification. Some applications may be able to mitigate the replay risks in
|
||||
other ways and in such cases the built-in OpenSSL functionality is not required.
|
||||
Disabling anti-replay is equivalent to setting B<SSL_OP_NO_ANTI_REPLAY>.
|
||||
|
||||
=item B<VerifyMode>
|
||||
|
||||
The B<value> argument is a comma separated list of flags to set.
|
||||
|
||||
@@ -226,6 +226,17 @@ this option is set or not CCS messages received from the peer will always be
|
||||
ignored in TLSv1.3. This option is set by default. To switch it off use
|
||||
SSL_clear_options(). A future version of OpenSSL may not set this by default.
|
||||
|
||||
=item SSL_OP_NO_ANTI_REPLAY
|
||||
|
||||
By default, when a server is configured for early data (i.e., max_early_data > 0),
|
||||
OpenSSL will switch on replay protection. See L<SSL_read_early_data(3)> for a
|
||||
description of the replay protection feature. Anti-replay measures are required
|
||||
to comply with the TLSv1.3 specification. Some applications may be able to
|
||||
mitigate the replay risks in other ways and in such cases the built in OpenSSL
|
||||
functionality is not required. Those applications can turn this feature off by
|
||||
setting this option. This is a server-side opton only. It is ignored by
|
||||
clients.
|
||||
|
||||
=back
|
||||
|
||||
The following options no longer have any effect but their identifiers are
|
||||
|
||||
@@ -10,7 +10,10 @@ SSL_SESSION_get_max_early_data,
|
||||
SSL_SESSION_set_max_early_data,
|
||||
SSL_write_early_data,
|
||||
SSL_read_early_data,
|
||||
SSL_get_early_data_status
|
||||
SSL_get_early_data_status,
|
||||
SSL_allow_early_data_cb_fn,
|
||||
SSL_CTX_set_allow_early_data_cb,
|
||||
SSL_set_allow_early_data_cb
|
||||
- functions for sending and receiving early data
|
||||
|
||||
=head1 SYNOPSIS
|
||||
@@ -30,6 +33,16 @@ SSL_get_early_data_status
|
||||
|
||||
int SSL_get_early_data_status(const SSL *s);
|
||||
|
||||
|
||||
typedef int (*SSL_allow_early_data_cb_fn)(SSL *s, void *arg);
|
||||
|
||||
void SSL_CTX_set_allow_early_data_cb(SSL_CTX *ctx,
|
||||
SSL_allow_early_data_cb_fn cb,
|
||||
void *arg);
|
||||
void SSL_set_allow_early_data_cb(SSL *s,
|
||||
SSL_allow_early_data_cb_fn cb,
|
||||
void *arg);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
These functions are used to send and receive early data where TLSv1.3 has been
|
||||
@@ -186,6 +199,20 @@ In the event that the current maximum early data setting for the server is
|
||||
different to that originally specified in a session that a client is resuming
|
||||
with then the lower of the two values will apply.
|
||||
|
||||
Some server applications may wish to have more control over whether early data
|
||||
is accepted or not, for example to mitigate replay risks (see L</REPLAY PROTECTION>
|
||||
below) or to decline early_data when the server is heavily loaded. The functions
|
||||
SSL_CTX_set_allow_early_data_cb() and SSL_set_allow_early_data_cb() set a
|
||||
callback which is called at a point in the handshake immediately before a
|
||||
decision is made to accept or reject early data. The callback is provided with a
|
||||
pointer to the user data argument that was provided when the callback was first
|
||||
set. Returning 1 from the callback will allow early data and returning 0 will
|
||||
reject it. Note that the OpenSSL library may reject early data for other reasons
|
||||
in which case this callback will not get called. Notably, the built-in replay
|
||||
protection feature will still be used even if a callback is present unless it
|
||||
has been explicitly disabled using the SSL_OP_NO_ANTI_REPLAY option. See
|
||||
L</REPLAY PROTECTION> below.
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
The whole purpose of early data is to enable a client to start sending data to
|
||||
@@ -252,6 +279,12 @@ The OpenSSL replay protection does not apply to external Pre Shared Keys (PSKs)
|
||||
(e.g. see SSL_CTX_set_psk_find_session_callback(3)). Therefore extreme caution
|
||||
should be applied when combining external PSKs with early data.
|
||||
|
||||
Some applications may mitigate the replay risks in other ways. For those
|
||||
applications it is possible to turn off the built-in replay protection feature
|
||||
using the B<SSL_OP_NO_ANTI_REPLAY> option. See L<SSL_CTX_set_options(3)> for
|
||||
details. Applications can also set a callback to make decisions about accepting
|
||||
early data or not. See SSL_CTX_set_allow_early_data_cb() above for details.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
SSL_write_early_data() returns 1 for success or 0 for failure. In the event of a
|
||||
|
||||
@@ -28,6 +28,8 @@ PKCS7_ISSUER_AND_SERIAL_digest
|
||||
int X509_NAME_digest(const X509_NAME *data, const EVP_MD *type,
|
||||
unsigned char *md, unsigned int *len);
|
||||
|
||||
#include <openssl/pkcs7.h>
|
||||
|
||||
int PKCS7_ISSUER_AND_SERIAL_digest(PKCS7_ISSUER_AND_SERIAL *data,
|
||||
const EVP_MD *type, unsigned char *md,
|
||||
unsigned int *len);
|
||||
|
||||
Reference in New Issue
Block a user