[openssl-users] Signing an XML file

Anibal F. Martinez Cortina linuxkid.zeuz at gmail.com
Wed Dec 14 04:10:45 UTC 2016


2016-12-13 22:54 GMT-03:00 Salz, Rich <rsalz at akamai.com>:

> > Is there some equivalent to PHP's openssl_sign_pkcs7 function for C/C++
> users?
>
> 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.
>
> --
> openssl-users mailing list
> To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
>

Got it, after some more reading, I've managed to pull:
A Valid X509 structure with the PEM file.
A Valid EVP_PKEY structure with the KEY file.
Created a BIO with BIO_new(BIO_s_mem()) and used BIO_read_filename with it.

Now I get to the part where I need to call PKCS7_sign() right?
If so, I'm missing something, because:
PKCS7_sign(cert,key,NULL,fileBIO,NULL) produces NULL as a result.

Any hints?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mta.openssl.org/pipermail/openssl-users/attachments/20161214/fdfe875f/attachment.html>


More information about the openssl-users mailing list