1e71b7053SJung-uk Kim=pod
2e71b7053SJung-uk Kim
3e71b7053SJung-uk Kim=head1 NAME
4e71b7053SJung-uk Kim
5*b077aed3SPierre ProncheryEVP_PKEY_print_public, EVP_PKEY_print_private, EVP_PKEY_print_params,
6*b077aed3SPierre ProncheryEVP_PKEY_print_public_fp, EVP_PKEY_print_private_fp,
7*b077aed3SPierre ProncheryEVP_PKEY_print_params_fp - public key algorithm printing routines
8e71b7053SJung-uk Kim
9e71b7053SJung-uk Kim=head1 SYNOPSIS
10e71b7053SJung-uk Kim
11e71b7053SJung-uk Kim #include <openssl/evp.h>
12e71b7053SJung-uk Kim
13e71b7053SJung-uk Kim int EVP_PKEY_print_public(BIO *out, const EVP_PKEY *pkey,
14e71b7053SJung-uk Kim                           int indent, ASN1_PCTX *pctx);
15*b077aed3SPierre Pronchery int EVP_PKEY_print_public_fp(FILE *fp, const EVP_PKEY *pkey,
16*b077aed3SPierre Pronchery                              int indent, ASN1_PCTX *pctx);
17e71b7053SJung-uk Kim int EVP_PKEY_print_private(BIO *out, const EVP_PKEY *pkey,
18e71b7053SJung-uk Kim                            int indent, ASN1_PCTX *pctx);
19*b077aed3SPierre Pronchery int EVP_PKEY_print_private_fp(FILE *fp, const EVP_PKEY *pkey,
20*b077aed3SPierre Pronchery                               int indent, ASN1_PCTX *pctx);
21e71b7053SJung-uk Kim int EVP_PKEY_print_params(BIO *out, const EVP_PKEY *pkey,
22e71b7053SJung-uk Kim                           int indent, ASN1_PCTX *pctx);
23*b077aed3SPierre Pronchery int EVP_PKEY_print_params_fp(FILE *fp, const EVP_PKEY *pkey,
24*b077aed3SPierre Pronchery                              int indent, ASN1_PCTX *pctx);
25e71b7053SJung-uk Kim
26e71b7053SJung-uk Kim=head1 DESCRIPTION
27e71b7053SJung-uk Kim
28e71b7053SJung-uk KimThe functions EVP_PKEY_print_public(), EVP_PKEY_print_private() and
29e71b7053SJung-uk KimEVP_PKEY_print_params() print out the public, private or parameter components
30*b077aed3SPierre Proncheryof key I<pkey> respectively. The key is sent to B<BIO> I<out> in human readable
31*b077aed3SPierre Proncheryform. The parameter I<indent> indicates how far the printout should be indented.
32e71b7053SJung-uk Kim
33*b077aed3SPierre ProncheryThe I<pctx> parameter allows the print output to be finely tuned by using
34*b077aed3SPierre ProncheryASN1 printing options. If I<pctx> is set to NULL then default values will
35e71b7053SJung-uk Kimbe used.
36e71b7053SJung-uk Kim
37*b077aed3SPierre ProncheryThe functions EVP_PKEY_print_public_fp(), EVP_PKEY_print_private_fp() and
38*b077aed3SPierre ProncheryEVP_PKEY_print_params_fp() do the same as the B<BIO> based functions
39*b077aed3SPierre Proncherybut use B<FILE> I<fp> instead.
40*b077aed3SPierre Pronchery
41e71b7053SJung-uk Kim=head1 NOTES
42e71b7053SJung-uk Kim
43*b077aed3SPierre ProncheryCurrently no public key algorithms include any options in the I<pctx> parameter.
44e71b7053SJung-uk Kim
45e71b7053SJung-uk KimIf the key does not include all the components indicated by the function then
46e71b7053SJung-uk Kimonly those contained in the key will be printed. For example passing a public
47e71b7053SJung-uk Kimkey to EVP_PKEY_print_private() will only print the public components.
48e71b7053SJung-uk Kim
49e71b7053SJung-uk Kim=head1 RETURN VALUES
50e71b7053SJung-uk Kim
51e71b7053SJung-uk KimThese functions all return 1 for success and 0 or a negative value for failure.
52e71b7053SJung-uk KimIn particular a return value of -2 indicates the operation is not supported by
53e71b7053SJung-uk Kimthe public key algorithm.
54e71b7053SJung-uk Kim
55e71b7053SJung-uk Kim=head1 SEE ALSO
56e71b7053SJung-uk Kim
57e71b7053SJung-uk KimL<EVP_PKEY_CTX_new(3)>,
58e71b7053SJung-uk KimL<EVP_PKEY_keygen(3)>
59e71b7053SJung-uk Kim
60e71b7053SJung-uk Kim=head1 HISTORY
61e71b7053SJung-uk Kim
62*b077aed3SPierre ProncheryThe functions EVP_PKEY_print_public(), EVP_PKEY_print_private(),
63*b077aed3SPierre Proncheryand EVP_PKEY_print_params() were added in OpenSSL 1.0.0.
64*b077aed3SPierre Pronchery
65*b077aed3SPierre ProncheryThe functions EVP_PKEY_print_public_fp(), EVP_PKEY_print_private_fp(),
66*b077aed3SPierre Proncheryand EVP_PKEY_print_params_fp() were added in OpenSSL 3.0.
67e71b7053SJung-uk Kim
68e71b7053SJung-uk Kim=head1 COPYRIGHT
69e71b7053SJung-uk Kim
70*b077aed3SPierre ProncheryCopyright 2006-2021 The OpenSSL Project Authors. All Rights Reserved.
71e71b7053SJung-uk Kim
72*b077aed3SPierre ProncheryLicensed under the Apache License 2.0 (the "License").  You may not use
73e71b7053SJung-uk Kimthis file except in compliance with the License.  You can obtain a copy
74e71b7053SJung-uk Kimin the file LICENSE in the source distribution or at
75e71b7053SJung-uk KimL<https://www.openssl.org/source/license.html>.
76e71b7053SJung-uk Kim
77e71b7053SJung-uk Kim=cut
78