5 EVP_PKEY_print_public, EVP_PKEY_print_private, EVP_PKEY_print_params,
6 EVP_PKEY_print_public_fp, EVP_PKEY_print_private_fp,
7 EVP_PKEY_print_params_fp - public key algorithm printing routines
11 #include <openssl/evp.h>
13 int EVP_PKEY_print_public(BIO *out, const EVP_PKEY *pkey,
14 int indent, ASN1_PCTX *pctx);
15 int EVP_PKEY_print_public_fp(FILE *fp, const EVP_PKEY *pkey,
16 int indent, ASN1_PCTX *pctx);
17 int EVP_PKEY_print_private(BIO *out, const EVP_PKEY *pkey,
18 int indent, ASN1_PCTX *pctx);
19 int EVP_PKEY_print_private_fp(FILE *fp, const EVP_PKEY *pkey,
20 int indent, ASN1_PCTX *pctx);
21 int EVP_PKEY_print_params(BIO *out, const EVP_PKEY *pkey,
22 int indent, ASN1_PCTX *pctx);
23 int EVP_PKEY_print_params_fp(FILE *fp, const EVP_PKEY *pkey,
24 int indent, ASN1_PCTX *pctx);
28 The functions EVP_PKEY_print_public(), EVP_PKEY_print_private() and
29 EVP_PKEY_print_params() print out the public, private or parameter components
30 of key I<pkey> respectively. The key is sent to B<BIO> I<out> in human readable
31 form. The parameter I<indent> indicates how far the printout should be indented.
33 The I<pctx> parameter allows the print output to be finely tuned by using
34 ASN1 printing options. If I<pctx> is set to NULL then default values will
37 The functions EVP_PKEY_print_public_fp(), EVP_PKEY_print_private_fp() and
38 EVP_PKEY_print_params_fp() do the same as the B<BIO> based functions
39 but use B<FILE> I<fp> instead.
43 Currently no public key algorithms include any options in the I<pctx> parameter.
45 If the key does not include all the components indicated by the function then
46 only those contained in the key will be printed. For example passing a public
47 key to EVP_PKEY_print_private() will only print the public components.
51 These functions all return 1 for success and 0 or a negative value for failure.
52 In particular a return value of -2 indicates the operation is not supported by
53 the public key algorithm.
57 L<EVP_PKEY_CTX_new(3)>,
62 The functions EVP_PKEY_print_public(), EVP_PKEY_print_private(),
63 and EVP_PKEY_print_params() were added in OpenSSL 1.0.0.
65 The functions EVP_PKEY_print_public_fp(), EVP_PKEY_print_private_fp(),
66 and EVP_PKEY_print_params_fp() were added in OpenSSL 3.0.
70 Copyright 2006-2021 The OpenSSL Project Authors. All Rights Reserved.
72 Licensed under the Apache License 2.0 (the "License"). You may not use
73 this file except in compliance with the License. You can obtain a copy
74 in the file LICENSE in the source distribution or at
75 L<https://www.openssl.org/source/license.html>.