Verify the sign on p7m file

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
vestax1984
Forum Newbie
Posts: 4
Joined: Tue Mar 18, 2008 12:15 pm

Verify the sign on p7m file

Post 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
Last edited by vestax1984 on Tue Mar 18, 2008 3:45 pm, edited 1 time in total.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: Verify the sign on p7m file

Post by RobertGonzalez »

Post the code you are using please. And please use bbCode tags to wrap your code when you post.
vestax1984
Forum Newbie
Posts: 4
Joined: Tue Mar 18, 2008 12:15 pm

Re: Verify the sign on p7m file

Post 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 )
 
 
User avatar
Zoxive
Forum Regular
Posts: 974
Joined: Fri Apr 01, 2005 4:37 pm
Location: Bay City, Michigan

Re: Verify the sign on p7m file

Post by Zoxive »

Is that the full path to the message?

When it returns -1 it had an error.
vestax1984
Forum Newbie
Posts: 4
Joined: Tue Mar 18, 2008 12:15 pm

Re: Verify the sign on p7m file

Post 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
vestax1984
Forum Newbie
Posts: 4
Joined: Tue Mar 18, 2008 12:15 pm

Re: Verify the sign on p7m file

Post by vestax1984 »

If the path of the p7m file is correct apache crash and an error is displayed
Post Reply