Doc nits cleanup, round 2
[openssl.git] / doc / crypto / d2i_RSAPublicKey.pod
1 =pod
2
3 =head1 NAME
4
5 d2i_RSAPublicKey, i2d_RSAPublicKey, d2i_RSAPrivateKey, i2d_RSAPrivateKey,
6 d2i_RSA_PUBKEY, i2d_RSA_PUBKEY, d2i_RSA_PUBKEY_bio, d2i_RSA_PUBKEY_fp,
7 i2d_RSA_PUBKEY_bio, i2d_RSA_PUBKEY_fp, i2d_Netscape_RSA,
8 d2i_Netscape_RSA - RSA public and private key encoding functions.
9
10 =head1 SYNOPSIS
11
12  #include <openssl/rsa.h>
13  #include <openssl/x509.h>
14
15  RSA * d2i_RSAPublicKey(RSA **a, const unsigned char **pp, long length);
16
17  int i2d_RSAPublicKey(RSA *a, unsigned char **pp);
18
19  RSA * d2i_RSA_PUBKEY(RSA **a, const unsigned char **pp, long length);
20
21  int i2d_RSA_PUBKEY(RSA *a, unsigned char **pp);
22
23  RSA *d2i_RSA_PUBKEY_bio(BIO *bp, RSA **rsa);
24  RSA *d2i_RSA_PUBKEY_fp(FILE *fp, RSA **rsa);
25
26  int i2d_RSA_PUBKEY_bio(BIO *bp, RSA *rsa);
27  int i2d_RSA_PUBKEY_fp(FILE *fp, RSA *rsa);
28
29  RSA * d2i_RSAPrivateKey(RSA **a, const unsigned char **pp, long length);
30
31  int i2d_RSAPrivateKey(RSA *a, unsigned char **pp);
32
33  int i2d_Netscape_RSA(RSA *a, unsigned char **pp, int (*cb)());
34
35  RSA * d2i_Netscape_RSA(RSA **a, const unsigned char **pp, long length, int (*cb)());
36
37 =head1 DESCRIPTION
38
39 d2i_RSAPublicKey() and i2d_RSAPublicKey() decode and encode a PKCS#1
40 RSAPublicKey structure.
41
42 d2i_RSA_PUBKEY() and i2d_RSA_PUBKEY() decode and encode an RSA public key using
43 a SubjectPublicKeyInfo (certificate public key) structure.
44
45 d2i_RSA_PUBKEY_bio(), d2i_RSA_PUBKEY_fp(), i2d_RSA_PUBKEY_bio() and
46 i2d_RSA_PUBKEY_fp() are similar to d2i_RSA_PUBKEY() and i2d_RSA_PUBKEY()
47 except they decode or encode using a B<BIO> or B<FILE> pointer.
48
49 d2i_RSAPrivateKey(), i2d_RSAPrivateKey() decode and encode a PKCS#1
50 RSAPrivateKey structure.
51
52 d2i_Netscape_RSA(), i2d_Netscape_RSA() decode and encode an RSA private key in
53 NET format.
54
55 The usage of all of these functions is similar to the d2i_X509() and i2d_X509()
56 described in the L<d2i_X509(3)> manual page.
57
58 =head1 NOTES
59
60 The B<RSA> structure passed to the private key encoding functions should have
61 all the PKCS#1 private key components present.
62
63 The data encoded by the private key functions is unencrypted and therefore
64 offers no private key security.
65
66 The NET format functions are present to provide compatibility with certain very
67 old software. This format has some severe security weaknesses and should be
68 avoided if possible.
69
70 =head1 SEE ALSO
71
72 L<d2i_X509(3)>
73
74 =head1 COPYRIGHT
75
76 Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
77
78 Licensed under the OpenSSL license (the "License").  You may not use
79 this file except in compliance with the License.  You can obtain a copy
80 in the file LICENSE in the source distribution or at
81 L<https://www.openssl.org/source/license.html>.
82
83 =cut