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