From 23cec1f4b4801c643853bf2eb07d7eae5f4fe7cb Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Wed, 21 Jun 2017 13:55:02 +0100 Subject: [PATCH] Add documentation for the SSL_export_keying_material() function Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/3735) --- doc/man3/SSL_export_keying_material.pod | 61 +++++++++++++++++++++++++ include/openssl/tls1.h | 8 ++-- ssl/ssl_lib.c | 6 +-- 3 files changed, 68 insertions(+), 7 deletions(-) create mode 100644 doc/man3/SSL_export_keying_material.pod diff --git a/doc/man3/SSL_export_keying_material.pod b/doc/man3/SSL_export_keying_material.pod new file mode 100644 index 0000000000..ccb99ec9a8 --- /dev/null +++ b/doc/man3/SSL_export_keying_material.pod @@ -0,0 +1,61 @@ +=pod + +=head1 NAME + +SSL_export_keying_material - obtain keying material for application use + +=head1 SYNOPSIS + + #include + + int SSL_export_keying_material(SSL *s, unsigned char *out, size_t olen, + const char *label, size_t llen, + const unsigned char *context, + size_t contextlen, int use_context); + +=head1 DESCRIPTION + +During the creation of a TLS or DTLS connection shared keying material is +established between the two endpoints. The function SSL_export_keying_material() +enables an application to use some of this keying material for its own purposes +in accordance with RFC5705. + +An application may need to securely establish the context within which this +keying material will be used. For example this may include identifiers for the +application session, application algorithms or parameters, or the lifetime of +the context. The context value is left to the application but must be the same +on both sides of the communication. + +For a given SSL connection B, B bytes of data will be written to +B. The application specific context should be supplied in the location +pointed to by B and should be B bytes long. Provision of +a context is optional. If the context should be omitted entirely then +B should be set to 0. Otherwise it should be any other value. If +B is 0 then the values of B and B are ignored. +Note that a zero length context is treated differently to no context at all, and +will result in different keying material being returned. + +An application specific label should be provided in the location pointed to by +B