source: www/manuals/PHP_manual/function.openssl-x509-checkpurpose.html@ 1

Last change on this file since 1 was 1, checked in by george, 17 years ago

Prvotní import všeho

File size: 5.6 KB
Line 
1<HTML
2><HEAD
3><TITLE
4>openssl_x509_checkpurpose</TITLE
5><META
6NAME="GENERATOR"
7CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
8REL="HOME"
9TITLE="Manuál PHP"
10HREF="index.html"><LINK
11REL="UP"
12TITLE="OpenSSL funkce"
13HREF="ref.openssl.html"><LINK
14REL="PREVIOUS"
15TITLE="openssl_x509_check_private_key"
16HREF="function.openssl-x509-check-private-key.html"><LINK
17REL="NEXT"
18TITLE="openssl_x509_export_to_file"
19HREF="function.openssl-x509-export-to-file.html"><META
20HTTP-EQUIV="Content-type"
21CONTENT="text/html; charset=ISO-8859-2"></HEAD
22><BODY
23CLASS="refentry"
24BGCOLOR="#FFFFFF"
25TEXT="#000000"
26LINK="#0000FF"
27VLINK="#840084"
28ALINK="#0000FF"
29><DIV
30CLASS="NAVHEADER"
31><TABLE
32SUMMARY="Header navigation table"
33WIDTH="100%"
34BORDER="0"
35CELLPADDING="0"
36CELLSPACING="0"
37><TR
38><TH
39COLSPAN="3"
40ALIGN="center"
41>Manuál PHP</TH
42></TR
43><TR
44><TD
45WIDTH="10%"
46ALIGN="left"
47VALIGN="bottom"
48><A
49HREF="function.openssl-x509-check-private-key.html"
50ACCESSKEY="P"
51>Pøedcházející</A
52></TD
53><TD
54WIDTH="80%"
55ALIGN="center"
56VALIGN="bottom"
57></TD
58><TD
59WIDTH="10%"
60ALIGN="right"
61VALIGN="bottom"
62><A
63HREF="function.openssl-x509-export-to-file.html"
64ACCESSKEY="N"
65>Dal¹í</A
66></TD
67></TR
68></TABLE
69><HR
70ALIGN="LEFT"
71WIDTH="100%"></DIV
72><H1
73><A
74NAME="function.openssl-x509-checkpurpose"
75></A
76>openssl_x509_checkpurpose</H1
77><DIV
78CLASS="refnamediv"
79><A
80NAME="AEN63608"
81></A
82><P
83> (PHP 4 &#62;= 4.0.6)</P
84>openssl_x509_checkpurpose&nbsp;--&nbsp;Verifies if a certificate can be used for a particular
85 purpose</DIV
86><DIV
87CLASS="refsect1"
88><A
89NAME="AEN63611"
90></A
91><H2
92>Description</H2
93>bool <B
94CLASS="methodname"
95>openssl_x509_checkpurpose</B
96> ( mixed x509cert, int purpose, array cainfo [, string untrustedfile])<BR
97></BR
98><DIV
99CLASS="warning"
100><P
101></P
102><TABLE
103CLASS="warning"
104BORDER="1"
105WIDTH="100%"
106><TR
107><TD
108ALIGN="CENTER"
109><B
110>Varování</B
111></TD
112></TR
113><TR
114><TD
115ALIGN="LEFT"
116><P
117>Tato funkce je
118<SPAN
119CLASS="emphasis"
120><I
121CLASS="emphasis"
122>EXPERIMENTÁLNÍ</I
123></SPAN
124>. Chování této funkce, její
125název a v¹echno ostatní, co je zde zdokumentováno, se v budoucích verzích
126PHP mù¾e BEZ OHLÁ©ENÍ zmìnit. Berte to v úvahu a pou¾ívejte tuto funkci na
127vlastní nebezpeèí.</P
128></TD
129></TR
130></TABLE
131></DIV
132><P
133>&#13; Returns <TT
134CLASS="constant"
135><B
136>TRUE</B
137></TT
138> if the certificate can be used for the intended purpose,
139 <TT
140CLASS="constant"
141><B
142>FALSE</B
143></TT
144> if it cannot, or -1 on error.
145 </P
146><P
147>&#13; <B
148CLASS="function"
149>openssl_x509_checkpurpose()</B
150> examines the certificate
151 specified by <TT
152CLASS="parameter"
153><I
154>x509cert</I
155></TT
156> to see if it can be used for
157 the purpose specified by <TT
158CLASS="parameter"
159><I
160>purpose</I
161></TT
162>.
163 </P
164><P
165>&#13; <TT
166CLASS="parameter"
167><I
168>cainfo</I
169></TT
170> should be an array of trusted CA files/dirs
171 as described in <A
172HREF="missing-stuff.html#openssl.cert.verification"
173>Certificate
174 Verification</A
175>.
176 </P
177><P
178><TT
179CLASS="parameter"
180><I
181>untrustedfile</I
182></TT
183>, if specified,
184 is the name of a PEM encoded file holding certificates that can be used to
185 help verify the certificate, although no trust in placed in the
186 certificates that come from that file.
187 </P
188><P
189>&#13; <DIV
190CLASS="table"
191><A
192NAME="AEN63644"
193></A
194><P
195><B
196>Tabulka 1. <B
197CLASS="function"
198>openssl_x509_checkpurpose()</B
199> purposes</B
200></P
201><TABLE
202BORDER="1"
203CLASS="CALSTABLE"
204><THEAD
205><TR
206><TH
207ALIGN="LEFT"
208VALIGN="MIDDLE"
209>Constant</TH
210><TH
211ALIGN="LEFT"
212VALIGN="MIDDLE"
213>Description</TH
214></TR
215></THEAD
216><TBODY
217><TR
218><TD
219ALIGN="LEFT"
220VALIGN="MIDDLE"
221>X509_PURPOSE_SSL_CLIENT</TD
222><TD
223ALIGN="LEFT"
224VALIGN="MIDDLE"
225>Can the certificate be used for the client side of an SSL
226 connection?</TD
227></TR
228><TR
229><TD
230ALIGN="LEFT"
231VALIGN="MIDDLE"
232>X509_PURPOSE_SSL_SERVER</TD
233><TD
234ALIGN="LEFT"
235VALIGN="MIDDLE"
236>Can the certificate be used for the server side of an SSL
237 connection?</TD
238></TR
239><TR
240><TD
241ALIGN="LEFT"
242VALIGN="MIDDLE"
243>X509_PURPOSE_NS_SSL_SERVER</TD
244><TD
245ALIGN="LEFT"
246VALIGN="MIDDLE"
247>Can the cert be used for Netscape SSL server?</TD
248></TR
249><TR
250><TD
251ALIGN="LEFT"
252VALIGN="MIDDLE"
253>X509_PURPOSE_SMIME_SIGN</TD
254><TD
255ALIGN="LEFT"
256VALIGN="MIDDLE"
257>Can the cert be used to sign S/MIME email?</TD
258></TR
259><TR
260><TD
261ALIGN="LEFT"
262VALIGN="MIDDLE"
263>X509_PURPOSE_SMIME_ENCRYPT</TD
264><TD
265ALIGN="LEFT"
266VALIGN="MIDDLE"
267>Can the cert be used to encrypt S/MIME email?</TD
268></TR
269><TR
270><TD
271ALIGN="LEFT"
272VALIGN="MIDDLE"
273>X509_PURPOSE_CRL_SIGN</TD
274><TD
275ALIGN="LEFT"
276VALIGN="MIDDLE"
277>Can the cert be used to sign a certificate revocation list
278 (CRL)?</TD
279></TR
280><TR
281><TD
282ALIGN="LEFT"
283VALIGN="MIDDLE"
284>X509_PURPOSE_ANY</TD
285><TD
286ALIGN="LEFT"
287VALIGN="MIDDLE"
288>Can the cert be used for Any/All purposes?</TD
289></TR
290></TBODY
291></TABLE
292></DIV
293>
294 These options are not bitfields - you may specify one only!
295 </P
296><DIV
297CLASS="note"
298><BLOCKQUOTE
299CLASS="note"
300><P
301><B
302>Poznámka: </B
303>This function was added in 4.0.6.</P
304></BLOCKQUOTE
305></DIV
306></DIV
307><DIV
308CLASS="NAVFOOTER"
309><HR
310ALIGN="LEFT"
311WIDTH="100%"><TABLE
312SUMMARY="Footer navigation table"
313WIDTH="100%"
314BORDER="0"
315CELLPADDING="0"
316CELLSPACING="0"
317><TR
318><TD
319WIDTH="33%"
320ALIGN="left"
321VALIGN="top"
322><A
323HREF="function.openssl-x509-check-private-key.html"
324ACCESSKEY="P"
325>Pøedcházející</A
326></TD
327><TD
328WIDTH="34%"
329ALIGN="center"
330VALIGN="top"
331><A
332HREF="index.html"
333ACCESSKEY="H"
334>Domù</A
335></TD
336><TD
337WIDTH="33%"
338ALIGN="right"
339VALIGN="top"
340><A
341HREF="function.openssl-x509-export-to-file.html"
342ACCESSKEY="N"
343>Dal¹í</A
344></TD
345></TR
346><TR
347><TD
348WIDTH="33%"
349ALIGN="left"
350VALIGN="top"
351>openssl_x509_check_private_key</TD
352><TD
353WIDTH="34%"
354ALIGN="center"
355VALIGN="top"
356><A
357HREF="ref.openssl.html"
358ACCESSKEY="U"
359>Nahoru</A
360></TD
361><TD
362WIDTH="33%"
363ALIGN="right"
364VALIGN="top"
365>openssl_x509_export_to_file</TD
366></TR
367></TABLE
368></DIV
369></BODY
370></HTML
371>
Note: See TracBrowser for help on using the repository browser.