diff options
author | Richard Levitte <levitte@openssl.org> | 2019-10-15 14:50:35 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2019-11-07 11:50:39 +0100 |
commit | 46e2dd05ef1456e3e8fc3d12bd839bae01576c19 (patch) | |
tree | 34349335133b5c1692863ce82627647867dbe426 /doc | |
parent | 54a0d4ceb28d53f5b00a27fc5ca8ff8f0ddf9036 (diff) |
Add EVP functionality to create domain params and keys by user data
This is the EVP operation that corresponds to creating direct RSA, DH
and DSA keys and set their numbers, to then assign them to an EVP_PKEY,
but done entirely using an algorithm agnostic EVP interface.
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/10187)
Diffstat (limited to 'doc')
-rw-r--r-- | doc/man3/EVP_PKEY_fromdata.pod | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/doc/man3/EVP_PKEY_fromdata.pod b/doc/man3/EVP_PKEY_fromdata.pod new file mode 100644 index 0000000000..0e3dc5c29f --- /dev/null +++ b/doc/man3/EVP_PKEY_fromdata.pod @@ -0,0 +1,69 @@ +=pod + +=head1 NAME + +EVP_PKEY_param_fromdata_init, EVP_PKEY_key_fromdata_init, EVP_PKEY_fromdata, +EVP_PKEY_param_fromdata_settable, EVP_PKEY_key_fromdata_settable +- functions to create domain parameters and keys from user data + +=head1 SYNOPSIS + + #include <openssl/evp.h> + + int EVP_PKEY_param_fromdata_init(EVP_PKEY_CTX *ctx); + int EVP_PKEY_key_fromdata_init(EVP_PKEY_CTX *ctx); + int EVP_PKEY_fromdata(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey, OSSL_PARAM params[]); + const OSSL_PARAM *EVP_PKEY_param_fromdata_settable(EVP_PKEY_CTX *ctx); + const OSSL_PARAM *EVP_PKEY_key_fromdata_settable(EVP_PKEY_CTX *ctx); + +=head1 DESCRIPTION + +EVP_PKEY_param_fromdata_init() initializes a public key algorithm context +for creating domain parameters from user data. + +EVP_PKEY_key_fromdata_init() initializes a public key algorithm context for +creating a key from user data. + +EVP_PKEY_fromdata() creates domain parameters or a key, given data from +I<params> and a context that's been initialized with +EVP_PKEY_param_fromdata_init() or EVP_PKEY_key_fromdata_init(). The result is +written to I<*ppkey>. + +EVP_PKEY_param_fromdata_settable() and EVP_PKEY_key_fromdata_settable() +get a constant B<OSSL_PARAM> array that describes the settable parameters +that can be used with EVP_PKEY_fromdata(). +See L<OSSL_PARAM(3)> for the use of B<OSSL_PARAM> as parameter descriptor. + +=head1 NOTES + +These functions only work with key management methods coming from a +provider. + +=for comment We may choose to make this available for legacy methods too... + +=head1 RETURN VALUES + +EVP_PKEY_key_fromdata_init(), EVP_PKEY_param_fromdata_init() and +EVP_PKEY_fromdata() return 1 for success and 0 or a negative value for +failure. In particular a return value of -2 indicates the operation is +not supported by the public key algorithm. + +=head1 SEE ALSO + +L<EVP_PKEY_CTX_new(3)>, L<provider(7)> + +=head1 HISTORY + +These functions were added in OpenSSL 3.0. + +=head1 COPYRIGHT + +Copyright 2019 The OpenSSL Project Authors. All Rights Reserved. + +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 +L<https://www.openssl.org/source/license.html>. + +=cut + |