Page 1 of 1

Verify the sign on p7m file

Posted: Tue Mar 18, 2008 12:19 pm
by vestax1984
Hi guy

I've read in the official documentation that exist many function that allow to verify a digital signature.

The openssl_pkcs7_verify shoul verify a sign on a p7m file I've try to use this function but it don't work somebdy could help me ???

The sintax used is the follow

Code: Select all

openssl_pcks7_verify("prova.p7m",0);

the error returned is always -1 help me please

Re: Verify the sign on p7m file

Posted: Tue Mar 18, 2008 12:54 pm
by RobertGonzalez
Post the code you are using please. And please use bbCode tags to wrap your code when you post.

Re: Verify the sign on p7m file

Posted: Tue Mar 18, 2008 3:44 pm
by vestax1984
Sorry this is the code that I use to verify the sign

Code: Select all

 
 
$p7= "prova.p7m";
 
openssl_pcks_verify ( $p7 , 0 )
 
 

Re: Verify the sign on p7m file

Posted: Tue Mar 18, 2008 3:47 pm
by Zoxive
Is that the full path to the message?

When it returns -1 it had an error.

Re: Verify the sign on p7m file

Posted: Tue Mar 18, 2008 4:16 pm
by vestax1984
with the full path of the message it return this error
error:0B065068:x509 certificate routines:BY_FILE_CTRL

with the code reported in the previous post the error is the follow

error:02001003:system library:fopen:No such process

Re: Verify the sign on p7m file

Posted: Tue Mar 18, 2008 4:46 pm
by vestax1984
If the path of the p7m file is correct apache crash and an error is displayed