<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE >openssl_x509_parse</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK REL="HOME" TITLE="Manual do PHP" HREF="index.html"><LINK REL="UP" TITLE="OpenSSL Functions" HREF="ref.openssl.html"><LINK REL="PREVIOUS" TITLE="openssl_x509_free" HREF="function.openssl-x509-free.html"><LINK REL="NEXT" TITLE="openssl_x509_read" HREF="function.openssl-x509-read.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=UTF-8"></HEAD ><BODY CLASS="refentry" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >Manual do PHP</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="function.openssl-x509-free.html" ACCESSKEY="P" >Anterior</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="function.openssl-x509-read.html" ACCESSKEY="N" >Próxima</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="function.openssl-x509-parse" ></A >openssl_x509_parse</H1 ><DIV CLASS="refnamediv" ><A NAME="AEN160394" ></A ><P > (PHP 4 >= 4.0.6, PHP 5)</P >openssl_x509_parse -- Parse an X509 certificate and return the information as an array</DIV ><DIV CLASS="refsect1" ><A NAME="AEN160397" ></A ><H2 >Description</H2 >array <B CLASS="methodname" >openssl_x509_parse</B > ( mixed x509cert [, bool shortnames] )<BR ></BR ><P > <B CLASS="function" >openssl_x509_parse()</B > returns information about the supplied <CODE CLASS="parameter" >x509cert</CODE >, including fields such as subject name, issuer name, purposes, valid from and valid to dates etc. <CODE CLASS="parameter" >shortnames</CODE > controls how the data is indexed in the array - if <CODE CLASS="parameter" >shortnames</CODE > is <TT CLASS="constant" ><B >TRUE</B ></TT > (the default) then fields will be indexed with the short name form, otherwise, the long name form will be used - e.g.: CN is the shortname form of commonName. </P ><P ><SPAN CLASS="emphasis" ><I CLASS="emphasis" >The structure of the returned data is (deliberately) not yet documented, as it is still subject to change.</I ></SPAN ></P ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="function.openssl-x509-free.html" ACCESSKEY="P" >Anterior</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Principal</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="function.openssl-x509-read.html" ACCESSKEY="N" >Próxima</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >openssl_x509_free</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="ref.openssl.html" ACCESSKEY="U" >Acima</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >openssl_x509_read</TD ></TR ></TABLE ></DIV ></BODY ></HTML >