From: "Dave Barter" <[EMAIL PROTECTED]>

dave> I would like to modify the openssl genrsa program to "quietly" generate
dave> keys, ie. Not print the '.' and '+' characters to STDOUT when generation
dave> occurs. Basically I would like to add the flag -quiet to the genrsa
dave> command line.

A very quick solution is to redirect stdout to /dev/null or something
corresponding.

dave> I have had a brief glance at the code to try and ascertaint the best way
dave> to do this, and notice that in genrsa.c for example all output to the
dave> screen goes through a function called BIO_printf(). I was considering
dave> modifying this function to suppress output if the -quiet flag was
dave> present.

Why on earth would you want to change BIO_printf(), and how would it
know that the application parsed a -quiet?  A global variable?

The right way would be to change genrsa to only print to stdout when
-quiet hasn't been given.

dave> Could somebody on the list give me a brief summary of the BIO_printf
dave> function and also advise whether there would be a better method to
dave> achieve my aim.

It's supposed to be a replacement of fprintf and friends, but takes a
BIO* instead of a FILE*.

-- 
Richard Levitte   \ Spannvägen 38, II \ [EMAIL PROTECTED]
Redakteur@Stacken  \ S-168 35  BROMMA  \ T: +46-8-26 52 47
                    \      SWEDEN       \ or +46-733-72 88 11
Procurator Odiosus Ex Infernis                -- [EMAIL PROTECTED]
Member of the OpenSSL development team: http://www.openssl.org/
Software Engineer, GemPlus:             http://www.gemplus.com/

Unsolicited commercial email is subject to an archival fee of $400.
See <http://www.stacken.kth.se/~levitte/mail/> for more info.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to