On Thursday 11 October 2001 11:52, you wrote: > 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. >
Not very platform independent > 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? I'm looking for some advice before delving deep into the code, this is a personal change I'm not looking for it to be incorporated into a full release. > > The right way would be to change genrsa to only print to stdout when > -quiet hasn't been given. Agree, but it only works with genrsa, I want to silence other modules as well. Is there some sort of faq covering the overall design and dependancies of openssl, it would stop me bothering you lot ! > > 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*. Thanks, this helps, could I add some value to the project by documenting at a high level the function of each C prog. or has this been done before ? ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]
