1EVP_PKEY_PRINT_PRIVATE(3ossl) OpenSSL EVP_PKEY_PRINT_PRIVATE(3ossl)
2
3
4
6 EVP_PKEY_print_public, EVP_PKEY_print_private, EVP_PKEY_print_params,
7 EVP_PKEY_print_public_fp, EVP_PKEY_print_private_fp,
8 EVP_PKEY_print_params_fp - public key algorithm printing routines
9
11 #include <openssl/evp.h>
12
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);
25
27 The functions EVP_PKEY_print_public(), EVP_PKEY_print_private() and
28 EVP_PKEY_print_params() print out the public, private or parameter
29 components of key pkey respectively. The key is sent to BIO out in
30 human readable form. The parameter indent indicates how far the
31 printout should be indented.
32
33 The pctx parameter allows the print output to be finely tuned by using
34 ASN1 printing options. If pctx is set to NULL then default values will
35 be used.
36
37 The functions EVP_PKEY_print_public_fp(), EVP_PKEY_print_private_fp()
38 and EVP_PKEY_print_params_fp() do the same as the BIO based functions
39 but use FILE fp instead.
40
42 Currently no public key algorithms include any options in the pctx
43 parameter.
44
45 If the key does not include all the components indicated by the
46 function then only those contained in the key will be printed. For
47 example passing a public key to EVP_PKEY_print_private() will only
48 print the public components.
49
51 These functions all return 1 for success and 0 or a negative value for
52 failure. In particular a return value of -2 indicates the operation is
53 not supported by the public key algorithm.
54
56 EVP_PKEY_CTX_new(3), EVP_PKEY_keygen(3)
57
59 The functions EVP_PKEY_print_public(), EVP_PKEY_print_private(), and
60 EVP_PKEY_print_params() were added in OpenSSL 1.0.0.
61
62 The functions EVP_PKEY_print_public_fp(), EVP_PKEY_print_private_fp(),
63 and EVP_PKEY_print_params_fp() were added in OpenSSL 3.0.
64
66 Copyright 2006-2021 The OpenSSL Project Authors. All Rights Reserved.
67
68 Licensed under the Apache License 2.0 (the "License"). You may not use
69 this file except in compliance with the License. You can obtain a copy
70 in the file LICENSE in the source distribution or at
71 <https://www.openssl.org/source/license.html>.
72
73
74
753.0.9 2023-07-27 EVP_PKEY_PRINT_PRIVATE(3ossl)