On Thu, Aug 16, 2007 at 03:58:19PM +0200, Christian Wiesbauer wrote: > Hi, > > > > I'm trying to write a pkcs7 object with following code to a file: > > > > unsigned char *tmp, signature; unsigned char *tmp, *signature;
> > int iLen; > > > > iLen = i2d_PKCS7(p7, NULL); > > signature = (unsigned char*) malloc(iLen); > > tmp = signature; > > iLen = i2d_PKCS7(p7, &tmp); > > > > FILE *fpkcs7 = fopen("C:\\sig.p7s", "w+"); FILE *fpkcs7 = fopen("C:\\sig.p7s", "wb+"); > > for(int i = 0; i < iLen; i++) > > fprintf(fpkcs7, "%c", signature[i]); > > fclose(fpkcs7); > Maybe that helps Christian ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]