openssl_pkcs7_verify - save verified data [PATCH]

php.internals

Marton Kenyeres

21 years ago
Hi! Dunno, if this is the right place to ask, but I give it a try anyway. If I'm misguided, please feel free to point me in the right direction! Attached is a patch which adds a 6th option to openssl_pkcs7_verify, which should be a string and point to a file where the contents of the signed message should be saved. [I believe this patch also fixes a minor safe-mode related bug] I've tried this on FreeBSD 4.11 / php-5.0.4 / OpenSSL 0.9.7d , so the patch is against openssl.c,v 1.89.2.6 , but should apply against HEAD also. This seems to work correctly with messages created with openssl and CAPICOM (The M$ PKI library.) Cheers, m.

Wez Furlong

21 years ago
What's the difference between the data you save and the data that's read in? In other words, how is this different from copying the file from one place to another; why would you use it? --Wez. On 6/16/05, Marton Kenyeres <mkenyeres@konvergencia.hu> wrote:

Marton Kenyeres

21 years ago
Wez Furlong wrote:
> What's the difference between the data you save and the data that's > read in? In other words, how is this different from copying the file > from one place to another; why would you use it? > > --Wez.
The data you read in is a signed message (which can be in several formats), that is some data _plus_ some signature. The data saved is only the raw data without the signature. The data itself can be any random binary string when using PKCS7_BINARY flag. We use it to transfer zip files between a ASP script and PHP. m.

Wez Furlong

21 years ago
OK; can you make sure that the patch applies to HEAD, and then attach it as a text attachment in an email and/or upload it to a www server, and I'll apply it. Thanks, --Wez. On 6/16/05, Marton Kenyeres <mkenyeres@konvergencia.hu> wrote: