[openssl-users] Signing an XML file
Anibal F. Martinez Cortina
linuxkid.zeuz at gmail.com
Wed Dec 14 14:47:24 UTC 2016
2016-12-14 11:17 GMT-03:00 Thomas J. Hruska <shinelight at shininglightpro.com>
> On 12/14/2016 3:28 AM, Dr. Stephen Henson wrote:
>> On Wed, Dec 14, 2016, Salz, Rich wrote:
>> Is there some equivalent to PHP's openssl_sign_pkcs7 function for C/C++
>>> Look at the apps/pkcs7.c file as a starting point. Get the command line
>>> doing what you want, and then work through the code to pull out only the
>>> bits you need.
>> Actually smime.c is the utility you want for PKCS#7. Alternatively cms.c
>> you want CMS (the successor to PKCS#7).
>> Those though are general purpose utilities which do all sorts of things
>> most appications don't care about. There are some demos in demos/smime and
>> demos/cms which are much simpler.
> PHP is open source software written in C.
> A quick lookup in PHP's git repository (it's source code) turns up:
> Now the OP has a model to follow for writing a similar wrapper function
> for their project.
> I've found that when people mention a specific language (in this case,
> PHP), they are infatuated with the language but have never bothered to
> crack open that language's source code to dig into how the language
> actually works. To some extent, they view the language as magical. And to
> some other extent, they irrationally fear looking at the source code of the
> language. Now is the perfect opportunity for the OP to start learning how
> one of their favorite languages operates behind the scenes with the goal of
> porting a single function that they are interested in. This approach solves
> multiple core developer problems at the same time.
> Thomas Hruska
> Shining Light Productions
> Home of BMP2AVI and Win32 OpenSSL.
> openssl-users mailing list
> To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
As a matter of facts, you're indeed right. I was daunted by the idea of
going through PHP's source myself..
Thanks for the pointers, guys.
I'll report back as soon as I get some progress.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the openssl-users