I would hope that one of us could provide you something given a week or so... 
very busy with work currently but  I'm sure I could do something in time.

Carl

From: owner-openssl-us...@openssl.org [owner-openssl-us...@openssl.org] on 
behalf of John Zavgren [j...@zavgren.com]
Sent: 14 November 2012 12:08
To: openssl-users@openssl.org
Subject: Re: How can I pass data to a running instance of OpenSSL CLI on 
Windows within a batch file?


Leon: 
I suggest that you write a program that uses file descriptors for IO? I'd write 
it in C.



On Mon, Oct 22, 2012 at 5:51 AM, Funnell, Leon <leon.funn...@catlin.com> wrote:

We have Windows application which passes data to OpenSSL.exe to encrypt as a 
Windows command, then scrapes the encrypted data back from the output.  The 
Windows app can call external Windows commands but we cannot call APIs or 
extend the functionality programmatically.   Functionally it works, but it 
doesn’t scale as each time you call OpenSSL.exe it takes about a second and 
spikes the CPU.  The application we are using is required to process 6000 
records every hour.  

I have two tests set up:
1.       A batch file which runs 6000 times, repeatedly running the following 
command:
Openssl.exe aes-256-cbc -a -e -k eiccmkjd94jfgniw03ljkdlfutcnv320 –in test.txt

2.       A text file with the following line repeated 6000 times, which I paste 
into the OpenSSL CLI:
aes-256-cbc -a -e -k eiccmkjd94jfgniw03ljkdlfutcnv320 –in test.txt

When I use the batch file which invokes OpenSSL.exe 6000 times, it takes 
several hours to complete and spikes the CPU significantly.  It seems to be the 
initialisation of the OpenSSL.exe program rather than the encryption however, 
as if I paste in the text file to the OpenSSL.exe CLI it completes in several 
seconds and takes very little CPU.

What I need is a way of running OpenSSL.exe as a process which I can pass 
parameters to on STDIN, and output parameters to STDOUT.  I would like to be 
able to call another batch file or program with the unencrypted data as the 
input parameter which would then pass this to the running “service”, retrieve 
the  encrypted data result from this “service” and pass it as the output.

Can anyone enlighten me on a potential solution for this?

Thanks and Regards,

Leon Funnell

________________________________________________________
This e-mail is confidential and intended solely for the use of the 
individual(s) to whom it is addressed. If you are not the intended recipient, 
be advised that you have received this e-mail in error and that any use, 
dissemination, forwarding, printing, copying of, or any action taken in 
reliance upon it, is strictly prohibited and may be illegal.

Catlin Underwriting Agencies Limited and Catlin Insurance Company (UK) Ltd. are 
authorised and regulated by the Financial Services Authority.

The registered office of Catlin Underwriting Agencies Limited (incorporated and 
registered in England and Wales with company number 1815126) and Catlin 
Insurance Company (UK) Ltd. (incorporated and registered in England and Wales 
with company number 5328622) is 20 Gracechurch Street, London, EC3V 0BG.

Catlin Risk Solutions Limited is an Appointed Representative of Catlin 
Underwriting Agencies Limited.
________________________________________________________






-- 

No amount of believing makes something a fact. James Randi




John Zavgren
603-371-0513 (home)
603-801-2094 (cell)
johnzavgren (skype)
603-821-0904 (skype)
john@zavgren.com______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to