<HTML ><HEAD ><TITLE >openssl_pkcs7_verify</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE="Manual de PHP" HREF="index.html"><LINK REL="UP" TITLE="OpenSSL functions" HREF="ref.openssl.html"><LINK REL="PREVIOUS" TITLE="openssl_pkcs7_sign" HREF="function.openssl-pkcs7-sign.html"><LINK REL="NEXT" TITLE="openssl_pkey_export_to_file" HREF="function.openssl-pkey-export-to-file.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=ISO-8859-1"></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 de PHP</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="function.openssl-pkcs7-sign.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-pkey-export-to-file.html" ACCESSKEY="N" >Siguiente</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="function.openssl-pkcs7-verify" ></A >openssl_pkcs7_verify</H1 ><DIV CLASS="refnamediv" ><A NAME="AEN56087" ></A ><P > (PHP 4 >= 4.0.6)</P >openssl_pkcs7_verify -- Verifies the signature of an S/MIME signed message</DIV ><DIV CLASS="refsect1" ><A NAME="AEN56090" ></A ><H2 >Description</H2 >bool <B CLASS="methodname" >openssl_pkcs7_verify</B > ( string filename, int flags [, string outfilename [, array cainfo [, string extracerts]]])<BR ></BR ><P > <B CLASS="function" >openssl_pkcs7_verify()</B > reads the S/MIME message contained in the filename specified by <TT CLASS="parameter" ><I >filename</I ></TT > and examines the digital signature. It returns <TT CLASS="constant" ><B >TRUE</B ></TT > if the signature is verified, <TT CLASS="constant" ><B >FALSE</B ></TT > if it is not correct (the message has been tampered with, or the signing certificate is invalid), or -1 on error. </P ><P > <TT CLASS="parameter" ><I >flags</I ></TT > can be used to affect how the signature is verified - see <A HREF="ref.openssl.html#openssl.pkcs7.flags" >PKCS7 constants</A > for more information. </P ><P > If the <TT CLASS="parameter" ><I >outfilename</I ></TT > is specified, it should be a string holding the name of a file into which the certificates of the persons that signed the messages will be stored in PEM format. </P ><P > If the <TT CLASS="parameter" ><I >cainfo</I ></TT > is specified, it should hold information about the trusted CA certificates to use in the verification process - see <A HREF="ref.openssl.html#openssl.cert.verification" >certificate verification</A > for more information about this parameter. </P ><P > If the <TT CLASS="parameter" ><I >extracerts</I ></TT > is specified, it is the filename of a file containing a bunch of certificates to use as untrusted CAs. </P ><DIV CLASS="note" ><BLOCKQUOTE CLASS="note" ><P ><B >Nota: </B >This function was added in 4.0.6.</P ></BLOCKQUOTE ></DIV ></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-pkcs7-sign.html" ACCESSKEY="P" >Anterior</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Inicio</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="function.openssl-pkey-export-to-file.html" ACCESSKEY="N" >Siguiente</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >openssl_pkcs7_sign</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="ref.openssl.html" ACCESSKEY="U" >Subir</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >openssl_pkey_export_to_file</TD ></TR ></TABLE ></DIV ></BODY ></HTML >