Re: Printing OpenSSL console error message in syslog

2013-05-24 Thread Jakob Bohm

On 5/24/2013 7:02 AM, Rahul Godbole wrote:


Hi,

Is there a way in which I get have all OpenSSL error messages being
printed in the syslog instead of console? Can I set some option or
something else in OpenSSL for that?

I am using OpenSSL 1.0.1c with fips 2.0.2.



If you are using the OpenSSL Libraries in your own code, you have
full control over the output of error messages, since your code will
get them as strings through various APIs.

If you are using the openssl command line tool, just pipe its stderr
(and stdout for some commands) to the logger(1) program.

For example:

$ ( ( openssl whatever -whatever 13 ) 21 |
logger -p local4.err ) 31

This redirects openssl stdout to temporary handle 3, then redirects
openssl stderr to stdout and pipes it to logger.  Finally the temporary
handle 3 is redirected back to stdout of the whole thing.

Another example:

$ openssl whatever -whatever 21 | logger -p local4.info

This redirects both openssl stderr and stdout to stdout then pipes it
to logger which will pass it to syslog.

Enjoy

Jakob
--
Jakob Bohm, CIO, Partner, WiseMo A/S.  http://www.wisemo.com
Transformervej 29, 2730 Herlev, Denmark.  Direct +45 31 13 16 10
This public discussion message is non-binding and may contain errors.
WiseMo - Remote Service Management for PCs, Phones and Embedded
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org


Printing OpenSSL console error message in syslog

2013-05-23 Thread Rahul Godbole
Hi,

Is there a way in which I get have all OpenSSL error messages being printed
in the syslog instead of console? Can I set some option or something else
in OpenSSL for that?

I am using OpenSSL 1.0.1c with fips 2.0.2.

Thanks
Rahul