cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: SSL Key password from environment variable and not from the command line

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 11 Jan 2006 16:20:40 +0100 (CET)

On Wed, 11 Jan 2006, Juergen Brauckmann wrote:

> Please find attached a mini-patch that will tell curl to get the passphrase
> for a private key for SSL client authentication from an environment variable
> instead of passing the passphrase directly on the command line or prompting
> for it.

Thanks for your contribution!

I think the patch could be modified somewhat to be more generic and thus a lot
more useful. What if you instead skipped the command line option and just set
whatever options you want in the CURL_CMDLINE environment variable and then
you have curl parse that variable as if it was a line in a config file or
given on the command line?

In your case, you'd set it to "-pass mysecretpassword", but others might find
it useful to use -u, -U or other options in that variable...

Don't you agree?

> The patch updates main.c from curl, curl.1 and curl.html, but not
> curl.pdf. I've tested it on a linux box.

No need to modify the HTML or the PDF. They are generated from the .1 file...

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2006-01-11