Deleted Added
full compact
pem.3 (206048) pem.3 (215698)
1.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.37
1.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07)
2.\"
3.\" Standard preamble:
4.\" ========================================================================
2.\"
3.\" Standard preamble:
4.\" ========================================================================
5.de Sh \" Subsection heading
6.br
7.if t .Sp
8.ne 5
9.PP
10\fB\\$1\fR
11.PP
12..
13.de Sp \" Vertical space (when we can't use .PP)
14.if t .sp .5v
15.if n .sp
16..
17.de Vb \" Begin verbatim text
18.ft CW
19.nf
20.ne \\$1
21..
22.de Ve \" End verbatim text
23.ft R
24.fi
25..
26.\" Set up some character translations and predefined strings. \*(-- will
27.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
5.de Sp \" Vertical space (when we can't use .PP)
6.if t .sp .5v
7.if n .sp
8..
9.de Vb \" Begin verbatim text
10.ft CW
11.nf
12.ne \\$1
13..
14.de Ve \" End verbatim text
15.ft R
16.fi
17..
18.\" Set up some character translations and predefined strings. \*(-- will
19.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
28.\" double quote, and \*(R" will give a right double quote. | will give a
29.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
30.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
31.\" expand to `' in nroff, nothing in troff, for use with C<>.
32.tr \(*W-|\(bv\*(Tr
20.\" double quote, and \*(R" will give a right double quote. \*(C+ will
21.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
22.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
23.\" nothing in troff, for use with C<>.
24.tr \(*W-
33.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
34.ie n \{\
35. ds -- \(*W-
36. ds PI pi
37. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
38. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
39. ds L" ""
40. ds R" ""
41. ds C` ""
42. ds C' ""
43'br\}
44.el\{\
45. ds -- \|\(em\|
46. ds PI \(*p
47. ds L" ``
48. ds R" ''
49'br\}
50.\"
25.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
26.ie n \{\
27. ds -- \(*W-
28. ds PI pi
29. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
30. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
31. ds L" ""
32. ds R" ""
33. ds C` ""
34. ds C' ""
35'br\}
36.el\{\
37. ds -- \|\(em\|
38. ds PI \(*p
39. ds L" ``
40. ds R" ''
41'br\}
42.\"
43.\" Escape single quotes in literal strings from groff's Unicode transform.
44.ie \n(.g .ds Aq \(aq
45.el .ds Aq '
46.\"
51.\" If the F register is turned on, we'll generate index entries on stderr for
47.\" If the F register is turned on, we'll generate index entries on stderr for
52.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
48.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
53.\" entries marked with X<> in POD. Of course, you'll have to process the
54.\" output yourself in some meaningful fashion.
49.\" entries marked with X<> in POD. Of course, you'll have to process the
50.\" output yourself in some meaningful fashion.
55.if \nF \{\
51.ie \nF \{\
56. de IX
57. tm Index:\\$1\t\\n%\t"\\$2"
58..
59. nr % 0
60. rr F
61.\}
52. de IX
53. tm Index:\\$1\t\\n%\t"\\$2"
54..
55. nr % 0
56. rr F
57.\}
58.el \{\
59. de IX
60..
61.\}
62.\"
62.\"
63.\" For nroff, turn off justification. Always turn off hyphenation; it makes
64.\" way too many mistakes in technical documents.
65.hy 0
66.if n .na
67.\"
68.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
69.\" Fear. Run. Save yourself. No user-serviceable parts.
70. \" fudge factors for nroff and troff
71.if n \{\
72. ds #H 0
73. ds #V .8m
74. ds #F .3m
75. ds #[ \f1

--- 48 unchanged lines hidden (view full) ---

124. ds Th \o'LP'
125. ds ae ae
126. ds Ae AE
127.\}
128.rm #[ #] #H #V #F C
129.\" ========================================================================
130.\"
131.IX Title "pem 3"
63.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
64.\" Fear. Run. Save yourself. No user-serviceable parts.
65. \" fudge factors for nroff and troff
66.if n \{\
67. ds #H 0
68. ds #V .8m
69. ds #F .3m
70. ds #[ \f1

--- 48 unchanged lines hidden (view full) ---

119. ds Th \o'LP'
120. ds ae ae
121. ds Ae AE
122.\}
123.rm #[ #] #H #V #F C
124.\" ========================================================================
125.\"
126.IX Title "pem 3"
132.TH pem 3 "2010-03-24" "0.9.8n" "OpenSSL"
127.TH pem 3 "2010-11-16" "0.9.8p" "OpenSSL"
128.\" For nroff, turn off justification. Always turn off hyphenation; it makes
129.\" way too many mistakes in technical documents.
130.if n .ad l
131.nh
133.SH "NAME"
134PEM, PEM_read_bio_PrivateKey, PEM_read_PrivateKey, PEM_write_bio_PrivateKey, PEM_write_PrivateKey, PEM_write_bio_PKCS8PrivateKey, PEM_write_PKCS8PrivateKey, PEM_write_bio_PKCS8PrivateKey_nid, PEM_write_PKCS8PrivateKey_nid, PEM_read_bio_PUBKEY, PEM_read_PUBKEY, PEM_write_bio_PUBKEY, PEM_write_PUBKEY, PEM_read_bio_RSAPrivateKey, PEM_read_RSAPrivateKey, PEM_write_bio_RSAPrivateKey, PEM_write_RSAPrivateKey, PEM_read_bio_RSAPublicKey, PEM_read_RSAPublicKey, PEM_write_bio_RSAPublicKey, PEM_write_RSAPublicKey, PEM_read_bio_RSA_PUBKEY, PEM_read_RSA_PUBKEY, PEM_write_bio_RSA_PUBKEY, PEM_write_RSA_PUBKEY, PEM_read_bio_DSAPrivateKey, PEM_read_DSAPrivateKey, PEM_write_bio_DSAPrivateKey, PEM_write_DSAPrivateKey, PEM_read_bio_DSA_PUBKEY, PEM_read_DSA_PUBKEY, PEM_write_bio_DSA_PUBKEY, PEM_write_DSA_PUBKEY, PEM_read_bio_DSAparams, PEM_read_DSAparams, PEM_write_bio_DSAparams, PEM_write_DSAparams, PEM_read_bio_DHparams, PEM_read_DHparams, PEM_write_bio_DHparams, PEM_write_DHparams, PEM_read_bio_X509, PEM_read_X509, PEM_write_bio_X509, PEM_write_X509, PEM_read_bio_X509_AUX, PEM_read_X509_AUX, PEM_write_bio_X509_AUX, PEM_write_X509_AUX, PEM_read_bio_X509_REQ, PEM_read_X509_REQ, PEM_write_bio_X509_REQ, PEM_write_X509_REQ, PEM_write_bio_X509_REQ_NEW, PEM_write_X509_REQ_NEW, PEM_read_bio_X509_CRL, PEM_read_X509_CRL, PEM_write_bio_X509_CRL, PEM_write_X509_CRL, PEM_read_bio_PKCS7, PEM_read_PKCS7, PEM_write_bio_PKCS7, PEM_write_PKCS7, PEM_read_bio_NETSCAPE_CERT_SEQUENCE, PEM_read_NETSCAPE_CERT_SEQUENCE, PEM_write_bio_NETSCAPE_CERT_SEQUENCE, PEM_write_NETSCAPE_CERT_SEQUENCE \- PEM routines
135.SH "SYNOPSIS"
136.IX Header "SYNOPSIS"
137.Vb 1
138\& #include <openssl/pem.h>
132.SH "NAME"
133PEM, PEM_read_bio_PrivateKey, PEM_read_PrivateKey, PEM_write_bio_PrivateKey, PEM_write_PrivateKey, PEM_write_bio_PKCS8PrivateKey, PEM_write_PKCS8PrivateKey, PEM_write_bio_PKCS8PrivateKey_nid, PEM_write_PKCS8PrivateKey_nid, PEM_read_bio_PUBKEY, PEM_read_PUBKEY, PEM_write_bio_PUBKEY, PEM_write_PUBKEY, PEM_read_bio_RSAPrivateKey, PEM_read_RSAPrivateKey, PEM_write_bio_RSAPrivateKey, PEM_write_RSAPrivateKey, PEM_read_bio_RSAPublicKey, PEM_read_RSAPublicKey, PEM_write_bio_RSAPublicKey, PEM_write_RSAPublicKey, PEM_read_bio_RSA_PUBKEY, PEM_read_RSA_PUBKEY, PEM_write_bio_RSA_PUBKEY, PEM_write_RSA_PUBKEY, PEM_read_bio_DSAPrivateKey, PEM_read_DSAPrivateKey, PEM_write_bio_DSAPrivateKey, PEM_write_DSAPrivateKey, PEM_read_bio_DSA_PUBKEY, PEM_read_DSA_PUBKEY, PEM_write_bio_DSA_PUBKEY, PEM_write_DSA_PUBKEY, PEM_read_bio_DSAparams, PEM_read_DSAparams, PEM_write_bio_DSAparams, PEM_write_DSAparams, PEM_read_bio_DHparams, PEM_read_DHparams, PEM_write_bio_DHparams, PEM_write_DHparams, PEM_read_bio_X509, PEM_read_X509, PEM_write_bio_X509, PEM_write_X509, PEM_read_bio_X509_AUX, PEM_read_X509_AUX, PEM_write_bio_X509_AUX, PEM_write_X509_AUX, PEM_read_bio_X509_REQ, PEM_read_X509_REQ, PEM_write_bio_X509_REQ, PEM_write_X509_REQ, PEM_write_bio_X509_REQ_NEW, PEM_write_X509_REQ_NEW, PEM_read_bio_X509_CRL, PEM_read_X509_CRL, PEM_write_bio_X509_CRL, PEM_write_X509_CRL, PEM_read_bio_PKCS7, PEM_read_PKCS7, PEM_write_bio_PKCS7, PEM_write_PKCS7, PEM_read_bio_NETSCAPE_CERT_SEQUENCE, PEM_read_NETSCAPE_CERT_SEQUENCE, PEM_write_bio_NETSCAPE_CERT_SEQUENCE, PEM_write_NETSCAPE_CERT_SEQUENCE \- PEM routines
134.SH "SYNOPSIS"
135.IX Header "SYNOPSIS"
136.Vb 1
137\& #include <openssl/pem.h>
139.Ve
140.PP
141.Vb 2
138\&
142\& EVP_PKEY *PEM_read_bio_PrivateKey(BIO *bp, EVP_PKEY **x,
143\& pem_password_cb *cb, void *u);
139\& EVP_PKEY *PEM_read_bio_PrivateKey(BIO *bp, EVP_PKEY **x,
140\& pem_password_cb *cb, void *u);
144.Ve
145.PP
146.Vb 2
141\&
147\& EVP_PKEY *PEM_read_PrivateKey(FILE *fp, EVP_PKEY **x,
148\& pem_password_cb *cb, void *u);
142\& EVP_PKEY *PEM_read_PrivateKey(FILE *fp, EVP_PKEY **x,
143\& pem_password_cb *cb, void *u);
149.Ve
150.PP
151.Vb 3
144\&
152\& int PEM_write_bio_PrivateKey(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc,
153\& unsigned char *kstr, int klen,
154\& pem_password_cb *cb, void *u);
145\& int PEM_write_bio_PrivateKey(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc,
146\& unsigned char *kstr, int klen,
147\& pem_password_cb *cb, void *u);
155.Ve
156.PP
157.Vb 3
148\&
158\& int PEM_write_PrivateKey(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc,
159\& unsigned char *kstr, int klen,
160\& pem_password_cb *cb, void *u);
149\& int PEM_write_PrivateKey(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc,
150\& unsigned char *kstr, int klen,
151\& pem_password_cb *cb, void *u);
161.Ve
162.PP
163.Vb 3
152\&
164\& int PEM_write_bio_PKCS8PrivateKey(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc,
165\& char *kstr, int klen,
166\& pem_password_cb *cb, void *u);
153\& int PEM_write_bio_PKCS8PrivateKey(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc,
154\& char *kstr, int klen,
155\& pem_password_cb *cb, void *u);
167.Ve
168.PP
169.Vb 3
156\&
170\& int PEM_write_PKCS8PrivateKey(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc,
171\& char *kstr, int klen,
172\& pem_password_cb *cb, void *u);
157\& int PEM_write_PKCS8PrivateKey(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc,
158\& char *kstr, int klen,
159\& pem_password_cb *cb, void *u);
173.Ve
174.PP
175.Vb 3
160\&
176\& int PEM_write_bio_PKCS8PrivateKey_nid(BIO *bp, EVP_PKEY *x, int nid,
177\& char *kstr, int klen,
178\& pem_password_cb *cb, void *u);
161\& int PEM_write_bio_PKCS8PrivateKey_nid(BIO *bp, EVP_PKEY *x, int nid,
162\& char *kstr, int klen,
163\& pem_password_cb *cb, void *u);
179.Ve
180.PP
181.Vb 3
164\&
182\& int PEM_write_PKCS8PrivateKey_nid(FILE *fp, EVP_PKEY *x, int nid,
183\& char *kstr, int klen,
184\& pem_password_cb *cb, void *u);
165\& int PEM_write_PKCS8PrivateKey_nid(FILE *fp, EVP_PKEY *x, int nid,
166\& char *kstr, int klen,
167\& pem_password_cb *cb, void *u);
185.Ve
186.PP
187.Vb 2
168\&
188\& EVP_PKEY *PEM_read_bio_PUBKEY(BIO *bp, EVP_PKEY **x,
189\& pem_password_cb *cb, void *u);
169\& EVP_PKEY *PEM_read_bio_PUBKEY(BIO *bp, EVP_PKEY **x,
170\& pem_password_cb *cb, void *u);
190.Ve
191.PP
192.Vb 2
171\&
193\& EVP_PKEY *PEM_read_PUBKEY(FILE *fp, EVP_PKEY **x,
194\& pem_password_cb *cb, void *u);
172\& EVP_PKEY *PEM_read_PUBKEY(FILE *fp, EVP_PKEY **x,
173\& pem_password_cb *cb, void *u);
195.Ve
196.PP
197.Vb 2
174\&
198\& int PEM_write_bio_PUBKEY(BIO *bp, EVP_PKEY *x);
199\& int PEM_write_PUBKEY(FILE *fp, EVP_PKEY *x);
175\& int PEM_write_bio_PUBKEY(BIO *bp, EVP_PKEY *x);
176\& int PEM_write_PUBKEY(FILE *fp, EVP_PKEY *x);
200.Ve
201.PP
202.Vb 2
177\&
203\& RSA *PEM_read_bio_RSAPrivateKey(BIO *bp, RSA **x,
204\& pem_password_cb *cb, void *u);
178\& RSA *PEM_read_bio_RSAPrivateKey(BIO *bp, RSA **x,
179\& pem_password_cb *cb, void *u);
205.Ve
206.PP
207.Vb 2
180\&
208\& RSA *PEM_read_RSAPrivateKey(FILE *fp, RSA **x,
209\& pem_password_cb *cb, void *u);
181\& RSA *PEM_read_RSAPrivateKey(FILE *fp, RSA **x,
182\& pem_password_cb *cb, void *u);
210.Ve
211.PP
212.Vb 3
183\&
213\& int PEM_write_bio_RSAPrivateKey(BIO *bp, RSA *x, const EVP_CIPHER *enc,
214\& unsigned char *kstr, int klen,
215\& pem_password_cb *cb, void *u);
184\& int PEM_write_bio_RSAPrivateKey(BIO *bp, RSA *x, const EVP_CIPHER *enc,
185\& unsigned char *kstr, int klen,
186\& pem_password_cb *cb, void *u);
216.Ve
217.PP
218.Vb 3
187\&
219\& int PEM_write_RSAPrivateKey(FILE *fp, RSA *x, const EVP_CIPHER *enc,
220\& unsigned char *kstr, int klen,
221\& pem_password_cb *cb, void *u);
188\& int PEM_write_RSAPrivateKey(FILE *fp, RSA *x, const EVP_CIPHER *enc,
189\& unsigned char *kstr, int klen,
190\& pem_password_cb *cb, void *u);
222.Ve
223.PP
224.Vb 2
191\&
225\& RSA *PEM_read_bio_RSAPublicKey(BIO *bp, RSA **x,
226\& pem_password_cb *cb, void *u);
192\& RSA *PEM_read_bio_RSAPublicKey(BIO *bp, RSA **x,
193\& pem_password_cb *cb, void *u);
227.Ve
228.PP
229.Vb 2
194\&
230\& RSA *PEM_read_RSAPublicKey(FILE *fp, RSA **x,
231\& pem_password_cb *cb, void *u);
195\& RSA *PEM_read_RSAPublicKey(FILE *fp, RSA **x,
196\& pem_password_cb *cb, void *u);
232.Ve
233.PP
234.Vb 1
197\&
235\& int PEM_write_bio_RSAPublicKey(BIO *bp, RSA *x);
198\& int PEM_write_bio_RSAPublicKey(BIO *bp, RSA *x);
236.Ve
237.PP
238.Vb 1
199\&
239\& int PEM_write_RSAPublicKey(FILE *fp, RSA *x);
200\& int PEM_write_RSAPublicKey(FILE *fp, RSA *x);
240.Ve
241.PP
242.Vb 2
201\&
243\& RSA *PEM_read_bio_RSA_PUBKEY(BIO *bp, RSA **x,
244\& pem_password_cb *cb, void *u);
202\& RSA *PEM_read_bio_RSA_PUBKEY(BIO *bp, RSA **x,
203\& pem_password_cb *cb, void *u);
245.Ve
246.PP
247.Vb 2
204\&
248\& RSA *PEM_read_RSA_PUBKEY(FILE *fp, RSA **x,
249\& pem_password_cb *cb, void *u);
205\& RSA *PEM_read_RSA_PUBKEY(FILE *fp, RSA **x,
206\& pem_password_cb *cb, void *u);
250.Ve
251.PP
252.Vb 1
207\&
253\& int PEM_write_bio_RSA_PUBKEY(BIO *bp, RSA *x);
208\& int PEM_write_bio_RSA_PUBKEY(BIO *bp, RSA *x);
254.Ve
255.PP
256.Vb 1
209\&
257\& int PEM_write_RSA_PUBKEY(FILE *fp, RSA *x);
210\& int PEM_write_RSA_PUBKEY(FILE *fp, RSA *x);
258.Ve
259.PP
260.Vb 2
211\&
261\& DSA *PEM_read_bio_DSAPrivateKey(BIO *bp, DSA **x,
262\& pem_password_cb *cb, void *u);
212\& DSA *PEM_read_bio_DSAPrivateKey(BIO *bp, DSA **x,
213\& pem_password_cb *cb, void *u);
263.Ve
264.PP
265.Vb 2
214\&
266\& DSA *PEM_read_DSAPrivateKey(FILE *fp, DSA **x,
267\& pem_password_cb *cb, void *u);
215\& DSA *PEM_read_DSAPrivateKey(FILE *fp, DSA **x,
216\& pem_password_cb *cb, void *u);
268.Ve
269.PP
270.Vb 3
217\&
271\& int PEM_write_bio_DSAPrivateKey(BIO *bp, DSA *x, const EVP_CIPHER *enc,
272\& unsigned char *kstr, int klen,
273\& pem_password_cb *cb, void *u);
218\& int PEM_write_bio_DSAPrivateKey(BIO *bp, DSA *x, const EVP_CIPHER *enc,
219\& unsigned char *kstr, int klen,
220\& pem_password_cb *cb, void *u);
274.Ve
275.PP
276.Vb 3
221\&
277\& int PEM_write_DSAPrivateKey(FILE *fp, DSA *x, const EVP_CIPHER *enc,
278\& unsigned char *kstr, int klen,
279\& pem_password_cb *cb, void *u);
222\& int PEM_write_DSAPrivateKey(FILE *fp, DSA *x, const EVP_CIPHER *enc,
223\& unsigned char *kstr, int klen,
224\& pem_password_cb *cb, void *u);
280.Ve
281.PP
282.Vb 2
225\&
283\& DSA *PEM_read_bio_DSA_PUBKEY(BIO *bp, DSA **x,
284\& pem_password_cb *cb, void *u);
226\& DSA *PEM_read_bio_DSA_PUBKEY(BIO *bp, DSA **x,
227\& pem_password_cb *cb, void *u);
285.Ve
286.PP
287.Vb 2
228\&
288\& DSA *PEM_read_DSA_PUBKEY(FILE *fp, DSA **x,
289\& pem_password_cb *cb, void *u);
229\& DSA *PEM_read_DSA_PUBKEY(FILE *fp, DSA **x,
230\& pem_password_cb *cb, void *u);
290.Ve
291.PP
292.Vb 1
231\&
293\& int PEM_write_bio_DSA_PUBKEY(BIO *bp, DSA *x);
232\& int PEM_write_bio_DSA_PUBKEY(BIO *bp, DSA *x);
294.Ve
295.PP
296.Vb 1
233\&
297\& int PEM_write_DSA_PUBKEY(FILE *fp, DSA *x);
234\& int PEM_write_DSA_PUBKEY(FILE *fp, DSA *x);
298.Ve
299.PP
300.Vb 1
235\&
301\& DSA *PEM_read_bio_DSAparams(BIO *bp, DSA **x, pem_password_cb *cb, void *u);
236\& DSA *PEM_read_bio_DSAparams(BIO *bp, DSA **x, pem_password_cb *cb, void *u);
302.Ve
303.PP
304.Vb 1
237\&
305\& DSA *PEM_read_DSAparams(FILE *fp, DSA **x, pem_password_cb *cb, void *u);
238\& DSA *PEM_read_DSAparams(FILE *fp, DSA **x, pem_password_cb *cb, void *u);
306.Ve
307.PP
308.Vb 1
239\&
309\& int PEM_write_bio_DSAparams(BIO *bp, DSA *x);
240\& int PEM_write_bio_DSAparams(BIO *bp, DSA *x);
310.Ve
311.PP
312.Vb 1
241\&
313\& int PEM_write_DSAparams(FILE *fp, DSA *x);
242\& int PEM_write_DSAparams(FILE *fp, DSA *x);
314.Ve
315.PP
316.Vb 1
243\&
317\& DH *PEM_read_bio_DHparams(BIO *bp, DH **x, pem_password_cb *cb, void *u);
244\& DH *PEM_read_bio_DHparams(BIO *bp, DH **x, pem_password_cb *cb, void *u);
318.Ve
319.PP
320.Vb 1
245\&
321\& DH *PEM_read_DHparams(FILE *fp, DH **x, pem_password_cb *cb, void *u);
246\& DH *PEM_read_DHparams(FILE *fp, DH **x, pem_password_cb *cb, void *u);
322.Ve
323.PP
324.Vb 1
247\&
325\& int PEM_write_bio_DHparams(BIO *bp, DH *x);
248\& int PEM_write_bio_DHparams(BIO *bp, DH *x);
326.Ve
327.PP
328.Vb 1
249\&
329\& int PEM_write_DHparams(FILE *fp, DH *x);
250\& int PEM_write_DHparams(FILE *fp, DH *x);
330.Ve
331.PP
332.Vb 1
251\&
333\& X509 *PEM_read_bio_X509(BIO *bp, X509 **x, pem_password_cb *cb, void *u);
252\& X509 *PEM_read_bio_X509(BIO *bp, X509 **x, pem_password_cb *cb, void *u);
334.Ve
335.PP
336.Vb 1
253\&
337\& X509 *PEM_read_X509(FILE *fp, X509 **x, pem_password_cb *cb, void *u);
254\& X509 *PEM_read_X509(FILE *fp, X509 **x, pem_password_cb *cb, void *u);
338.Ve
339.PP
340.Vb 1
255\&
341\& int PEM_write_bio_X509(BIO *bp, X509 *x);
256\& int PEM_write_bio_X509(BIO *bp, X509 *x);
342.Ve
343.PP
344.Vb 1
257\&
345\& int PEM_write_X509(FILE *fp, X509 *x);
258\& int PEM_write_X509(FILE *fp, X509 *x);
346.Ve
347.PP
348.Vb 1
259\&
349\& X509 *PEM_read_bio_X509_AUX(BIO *bp, X509 **x, pem_password_cb *cb, void *u);
260\& X509 *PEM_read_bio_X509_AUX(BIO *bp, X509 **x, pem_password_cb *cb, void *u);
350.Ve
351.PP
352.Vb 1
261\&
353\& X509 *PEM_read_X509_AUX(FILE *fp, X509 **x, pem_password_cb *cb, void *u);
262\& X509 *PEM_read_X509_AUX(FILE *fp, X509 **x, pem_password_cb *cb, void *u);
354.Ve
355.PP
356.Vb 1
263\&
357\& int PEM_write_bio_X509_AUX(BIO *bp, X509 *x);
264\& int PEM_write_bio_X509_AUX(BIO *bp, X509 *x);
358.Ve
359.PP
360.Vb 1
265\&
361\& int PEM_write_X509_AUX(FILE *fp, X509 *x);
266\& int PEM_write_X509_AUX(FILE *fp, X509 *x);
362.Ve
363.PP
364.Vb 2
267\&
365\& X509_REQ *PEM_read_bio_X509_REQ(BIO *bp, X509_REQ **x,
366\& pem_password_cb *cb, void *u);
268\& X509_REQ *PEM_read_bio_X509_REQ(BIO *bp, X509_REQ **x,
269\& pem_password_cb *cb, void *u);
367.Ve
368.PP
369.Vb 2
270\&
370\& X509_REQ *PEM_read_X509_REQ(FILE *fp, X509_REQ **x,
371\& pem_password_cb *cb, void *u);
271\& X509_REQ *PEM_read_X509_REQ(FILE *fp, X509_REQ **x,
272\& pem_password_cb *cb, void *u);
372.Ve
373.PP
374.Vb 1
273\&
375\& int PEM_write_bio_X509_REQ(BIO *bp, X509_REQ *x);
274\& int PEM_write_bio_X509_REQ(BIO *bp, X509_REQ *x);
376.Ve
377.PP
378.Vb 1
275\&
379\& int PEM_write_X509_REQ(FILE *fp, X509_REQ *x);
276\& int PEM_write_X509_REQ(FILE *fp, X509_REQ *x);
380.Ve
381.PP
382.Vb 1
277\&
383\& int PEM_write_bio_X509_REQ_NEW(BIO *bp, X509_REQ *x);
278\& int PEM_write_bio_X509_REQ_NEW(BIO *bp, X509_REQ *x);
384.Ve
385.PP
386.Vb 1
279\&
387\& int PEM_write_X509_REQ_NEW(FILE *fp, X509_REQ *x);
280\& int PEM_write_X509_REQ_NEW(FILE *fp, X509_REQ *x);
388.Ve
389.PP
390.Vb 6
281\&
391\& X509_CRL *PEM_read_bio_X509_CRL(BIO *bp, X509_CRL **x,
392\& pem_password_cb *cb, void *u);
393\& X509_CRL *PEM_read_X509_CRL(FILE *fp, X509_CRL **x,
394\& pem_password_cb *cb, void *u);
395\& int PEM_write_bio_X509_CRL(BIO *bp, X509_CRL *x);
396\& int PEM_write_X509_CRL(FILE *fp, X509_CRL *x);
282\& X509_CRL *PEM_read_bio_X509_CRL(BIO *bp, X509_CRL **x,
283\& pem_password_cb *cb, void *u);
284\& X509_CRL *PEM_read_X509_CRL(FILE *fp, X509_CRL **x,
285\& pem_password_cb *cb, void *u);
286\& int PEM_write_bio_X509_CRL(BIO *bp, X509_CRL *x);
287\& int PEM_write_X509_CRL(FILE *fp, X509_CRL *x);
397.Ve
398.PP
399.Vb 1
288\&
400\& PKCS7 *PEM_read_bio_PKCS7(BIO *bp, PKCS7 **x, pem_password_cb *cb, void *u);
289\& PKCS7 *PEM_read_bio_PKCS7(BIO *bp, PKCS7 **x, pem_password_cb *cb, void *u);
401.Ve
402.PP
403.Vb 1
290\&
404\& PKCS7 *PEM_read_PKCS7(FILE *fp, PKCS7 **x, pem_password_cb *cb, void *u);
291\& PKCS7 *PEM_read_PKCS7(FILE *fp, PKCS7 **x, pem_password_cb *cb, void *u);
405.Ve
406.PP
407.Vb 1
292\&
408\& int PEM_write_bio_PKCS7(BIO *bp, PKCS7 *x);
293\& int PEM_write_bio_PKCS7(BIO *bp, PKCS7 *x);
409.Ve
410.PP
411.Vb 1
294\&
412\& int PEM_write_PKCS7(FILE *fp, PKCS7 *x);
295\& int PEM_write_PKCS7(FILE *fp, PKCS7 *x);
413.Ve
414.PP
415.Vb 3
296\&
416\& NETSCAPE_CERT_SEQUENCE *PEM_read_bio_NETSCAPE_CERT_SEQUENCE(BIO *bp,
417\& NETSCAPE_CERT_SEQUENCE **x,
418\& pem_password_cb *cb, void *u);
297\& NETSCAPE_CERT_SEQUENCE *PEM_read_bio_NETSCAPE_CERT_SEQUENCE(BIO *bp,
298\& NETSCAPE_CERT_SEQUENCE **x,
299\& pem_password_cb *cb, void *u);
419.Ve
420.PP
421.Vb 3
300\&
422\& NETSCAPE_CERT_SEQUENCE *PEM_read_NETSCAPE_CERT_SEQUENCE(FILE *fp,
423\& NETSCAPE_CERT_SEQUENCE **x,
424\& pem_password_cb *cb, void *u);
301\& NETSCAPE_CERT_SEQUENCE *PEM_read_NETSCAPE_CERT_SEQUENCE(FILE *fp,
302\& NETSCAPE_CERT_SEQUENCE **x,
303\& pem_password_cb *cb, void *u);
425.Ve
426.PP
427.Vb 1
304\&
428\& int PEM_write_bio_NETSCAPE_CERT_SEQUENCE(BIO *bp, NETSCAPE_CERT_SEQUENCE *x);
305\& int PEM_write_bio_NETSCAPE_CERT_SEQUENCE(BIO *bp, NETSCAPE_CERT_SEQUENCE *x);
429.Ve
430.PP
431.Vb 1
306\&
432\& int PEM_write_NETSCAPE_CERT_SEQUENCE(FILE *fp, NETSCAPE_CERT_SEQUENCE *x);
433.Ve
434.SH "DESCRIPTION"
435.IX Header "DESCRIPTION"
436The \s-1PEM\s0 functions read or write structures in \s-1PEM\s0 format. In
437this sense \s-1PEM\s0 format is simply base64 encoded data surrounded
438by header lines.
439.PP

--- 58 unchanged lines hidden (view full) ---

498structure. The parameters are encoded using a PKCS#3 DHparameter
499structure.
500.PP
501The \fBX509\fR functions process an X509 certificate using an X509
502structure. They will also process a trusted X509 certificate but
503any trust settings are discarded.
504.PP
505The \fBX509_AUX\fR functions process a trusted X509 certificate using
307\& int PEM_write_NETSCAPE_CERT_SEQUENCE(FILE *fp, NETSCAPE_CERT_SEQUENCE *x);
308.Ve
309.SH "DESCRIPTION"
310.IX Header "DESCRIPTION"
311The \s-1PEM\s0 functions read or write structures in \s-1PEM\s0 format. In
312this sense \s-1PEM\s0 format is simply base64 encoded data surrounded
313by header lines.
314.PP

--- 58 unchanged lines hidden (view full) ---

373structure. The parameters are encoded using a PKCS#3 DHparameter
374structure.
375.PP
376The \fBX509\fR functions process an X509 certificate using an X509
377structure. They will also process a trusted X509 certificate but
378any trust settings are discarded.
379.PP
380The \fBX509_AUX\fR functions process a trusted X509 certificate using
506an X509 structure.
381an X509 structure.
507.PP
508The \fBX509_REQ\fR and \fBX509_REQ_NEW\fR functions process a PKCS#10
509certificate request using an X509_REQ structure. The \fBX509_REQ\fR
510write functions use \fB\s-1CERTIFICATE\s0 \s-1REQUEST\s0\fR in the header whereas
511the \fBX509_REQ_NEW\fR functions use \fB\s-1NEW\s0 \s-1CERTIFICATE\s0 \s-1REQUEST\s0\fR
512(as required by some CAs). The \fBX509_REQ\fR read functions will
513handle either form so there are no \fBX509_REQ_NEW\fR read functions.
514.PP

--- 146 unchanged lines hidden (view full) ---

661.PP
662Skeleton pass phrase callback:
663.PP
664.Vb 6
665\& int pass_cb(char *buf, int size, int rwflag, void *u);
666\& {
667\& int len;
668\& char *tmp;
382.PP
383The \fBX509_REQ\fR and \fBX509_REQ_NEW\fR functions process a PKCS#10
384certificate request using an X509_REQ structure. The \fBX509_REQ\fR
385write functions use \fB\s-1CERTIFICATE\s0 \s-1REQUEST\s0\fR in the header whereas
386the \fBX509_REQ_NEW\fR functions use \fB\s-1NEW\s0 \s-1CERTIFICATE\s0 \s-1REQUEST\s0\fR
387(as required by some CAs). The \fBX509_REQ\fR read functions will
388handle either form so there are no \fBX509_REQ_NEW\fR read functions.
389.PP

--- 146 unchanged lines hidden (view full) ---

536.PP
537Skeleton pass phrase callback:
538.PP
539.Vb 6
540\& int pass_cb(char *buf, int size, int rwflag, void *u);
541\& {
542\& int len;
543\& char *tmp;
669\& /* We'd probably do something else if 'rwflag' is 1 */
544\& /* We\*(Aqd probably do something else if \*(Aqrwflag\*(Aq is 1 */
670\& printf("Enter pass phrase for \e"%s\e"\en", u);
545\& printf("Enter pass phrase for \e"%s\e"\en", u);
671.Ve
672.PP
673.Vb 3
674\& /* get pass phrase, length 'len' into 'tmp' */
546\&
547\& /* get pass phrase, length \*(Aqlen\*(Aq into \*(Aqtmp\*(Aq */
675\& tmp = "hello";
676\& len = strlen(tmp);
548\& tmp = "hello";
549\& len = strlen(tmp);
677.Ve
678.PP
679.Vb 6
550\&
680\& if (len <= 0) return 0;
681\& /* if too long, truncate */
682\& if (len > size) len = size;
683\& memcpy(buf, tmp, len);
684\& return len;
685\& }
686.Ve
687.SH "NOTES"

--- 17 unchanged lines hidden (view full) ---

705.Ve
706.PP
707this is a bug because an attempt will be made to reuse the data at \fBx\fR
708which is an uninitialised pointer.
709.SH "PEM ENCRYPTION FORMAT"
710.IX Header "PEM ENCRYPTION FORMAT"
711This old \fBPrivateKey\fR routines use a non standard technique for encryption.
712.PP
551\& if (len <= 0) return 0;
552\& /* if too long, truncate */
553\& if (len > size) len = size;
554\& memcpy(buf, tmp, len);
555\& return len;
556\& }
557.Ve
558.SH "NOTES"

--- 17 unchanged lines hidden (view full) ---

576.Ve
577.PP
578this is a bug because an attempt will be made to reuse the data at \fBx\fR
579which is an uninitialised pointer.
580.SH "PEM ENCRYPTION FORMAT"
581.IX Header "PEM ENCRYPTION FORMAT"
582This old \fBPrivateKey\fR routines use a non standard technique for encryption.
583.PP
713The private key (or other data) takes the following form:
584The private key (or other data) takes the following form:
714.PP
715.Vb 3
585.PP
586.Vb 3
716\& -----BEGIN RSA PRIVATE KEY-----
717\& Proc-Type: 4,ENCRYPTED
718\& DEK-Info: DES-EDE3-CBC,3F17F5316E2BAC89
719.Ve
720.PP
721.Vb 2
587\& \-\-\-\-\-BEGIN RSA PRIVATE KEY\-\-\-\-\-
588\& Proc\-Type: 4,ENCRYPTED
589\& DEK\-Info: DES\-EDE3\-CBC,3F17F5316E2BAC89
590\&
722\& ...base64 encoded data...
591\& ...base64 encoded data...
723\& -----END RSA PRIVATE KEY-----
592\& \-\-\-\-\-END RSA PRIVATE KEY\-\-\-\-\-
724.Ve
725.PP
726The line beginning DEK-Info contains two comma separated pieces of information:
727the encryption algorithm name as used by \fIEVP_get_cipherbyname()\fR and an 8
728byte \fBsalt\fR encoded as a set of hexadecimal digits.
729.PP
730After this is the base64 encoded encrypted data.
731.PP

--- 4 unchanged lines hidden (view full) ---

736.IX Header "BUGS"
737The \s-1PEM\s0 read routines in some versions of OpenSSL will not correctly reuse
738an existing structure. Therefore the following:
739.PP
740.Vb 1
741\& PEM_read_bio_X509(bp, &x, 0, NULL);
742.Ve
743.PP
593.Ve
594.PP
595The line beginning DEK-Info contains two comma separated pieces of information:
596the encryption algorithm name as used by \fIEVP_get_cipherbyname()\fR and an 8
597byte \fBsalt\fR encoded as a set of hexadecimal digits.
598.PP
599After this is the base64 encoded encrypted data.
600.PP

--- 4 unchanged lines hidden (view full) ---

605.IX Header "BUGS"
606The \s-1PEM\s0 read routines in some versions of OpenSSL will not correctly reuse
607an existing structure. Therefore the following:
608.PP
609.Vb 1
610\& PEM_read_bio_X509(bp, &x, 0, NULL);
611.Ve
612.PP
744where \fBx\fR already contains a valid certificate, may not work, whereas:
613where \fBx\fR already contains a valid certificate, may not work, whereas:
745.PP
746.Vb 2
747\& X509_free(x);
748\& x = PEM_read_bio_X509(bp, NULL, 0, NULL);
749.Ve
750.PP
751is guaranteed to work.
752.SH "RETURN CODES"
753.IX Header "RETURN CODES"
754The read routines return either a pointer to the structure read or \s-1NULL\s0
755if an error occurred.
756.PP
757The write routines return 1 for success or 0 for failure.
614.PP
615.Vb 2
616\& X509_free(x);
617\& x = PEM_read_bio_X509(bp, NULL, 0, NULL);
618.Ve
619.PP
620is guaranteed to work.
621.SH "RETURN CODES"
622.IX Header "RETURN CODES"
623The read routines return either a pointer to the structure read or \s-1NULL\s0
624if an error occurred.
625.PP
626The write routines return 1 for success or 0 for failure.