cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Using curl with stunnel

From: Config <config_at_suddenlink.net>
Date: Fri, 07 Mar 2014 18:59:17 -0600

-------- Original Message --------
>
>
> -------- Original Message --------
>> On Fri, 7 Mar 2014, Config wrote:
>>
>>> However, I just discovered that using curl_735_0_ssl
>>> automatically connects using ssl (I think).
>> If the protocol part of your url is:
>>
>> * pop3 then it will be plain text unless a) your server supports TLS
>> upgrades and b) you specify --try-ssl then it will perform an
>> explicit SSL
>> connection.
>> * pop3s then it implicitly uses SSL from the very beginning and
>> everything
>> is encrypted by OpenSSL or whichever SSL backend your version of curl
>> was
>> built with.
>>
>> --version will tell you which SSL library you are using. I'm guessing
>> your
>> using Windows given you command prompt, so you'll probably be using
>> OpenSSL
>> or WinSSL (aka Microsoft's SChannel).
>>
>>> The email message is coming in un-enceypted however.
>> You mean using the packet sniffer, in your output file or in the console
>> output from curl?
>>
>>> Not sure how to make a complete ssl connection. I thought pop3s
>>> would force this.
>> It does - that's the job of the various SSL backends we use ;-)
>>
>> Kind Regards
>>
>> Steve
>>
> I didn't realize that I didn't have pop3s in my string. Now I am
> having connect problems because of certs.
>
> I am trying this (I know the certs are correct because I use them with
> another program):
>
> C:\Curl\curl_735_0_ssl\curl.exe -O C:\example.txt --cacert
> cotse-stunnel.pem --cert mystunnel.pem -v -u userID:password
> pop3s://mail.cotse.net/1
>
> Cotse requires us to use their cert as well as one of our own. What
> param do I use for these? Does that look correct above?
>
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-users
> FAQ: http://curl.haxx.se/docs/faq.html
> Etiquette: http://curl.haxx.se/mail/etiquette.html
>
OK. Have it working now.

C:\AMisc\ANewPgms\Curl\curl_735_0_ssl>curl.exe -O C:\example.txt
--insecure --ca
path C:\Curl\curl_735_0_ssl\ --cacert cotse-stunnel.pem --cert my
stunnel.pem -v -u uid:pw pop3s://mail.cotse.net/1

Don't know why it wont go through without --insecure. I get the error:

"curl: (60) SSL certificate problem: unable to get local issuer certificate"

Is this correct: --cert mystunnel.pem

2. Is there any way curl can extract the message portion of an email?

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-03-08