Hi, I need to sign mobileconfig file before sending it to the iOS device. For this I want to call openssl as a separate process. However I do not want to operate on physical files, as it requires a lot of read/write operations which will slow down the whole process and cause file handling issues. I would like to use streams in a form of pipe instead.
Basically what I want to achieve is to imitate the following command: "openssl smime -sign -in input_mobileconfig -out output_mobileconfig -signer my_certificate -inkey my_pricate_key -outform der -nodetach" without having files stored on hard drive. I know there is "-stream/-indef" option, but according to documentation "it enables experimental streaming I/O support; as a result the encoding is BER using indefinite length constructed encoding and no longer DER; streaming is supported for the -encrypt operation and the -sign operation if the content is not detached". I tried it, but the output has different format and it is not recognized by iOS. So I would like to know if it is possible to provide input as a stream and get output as stream in DER format, so that later I can create Filestream based on it and return it as a response to the device? My development environment is C# / MS VS 2010 Ultimate. Any help will be highly appreciated. Maciej Pawlus