cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: JavaCurl problem calling url

From: Luis Cruz <lmpcruz_at_sapo.pt>
Date: Mon, 7 May 2007 01:10:17 +0100

If I use this code:

cg.setopt(CURL.OPT_WRITEFUNCTION, cw);

cg.setopt(CURL.OPT_URL,
"https://teste.mbnet.pt/pvtn?A030=M005&A001=2796&C007=120060208024158&C013=&
A061=10.50&A105=9782&C003=4088885000000118&C004=200912&C005=907&C042=0&C001=
0");
cg.setopt(CURL.OPT_SSLVERSION, 3);
cg.setopt(CURL.OPT_VERBOSE, 1);
cg.setopt(CURL.OPT_FRESH_CONNECT, 1);
cg.setopt(CURL.OPT_SSL_VERIFYPEER, 0);
System.out.println("Perform: " + cg.perform());

I get Perform: 56 (Failing with receiving network data)

If I add this lines:

cg.setopt(CURL.OPT_SSL_VERIFYPEER, 1); (replacing the previous)
cg.setopt(CURL.OPT_SSLCERTTYPE, "PEM");
cg.setopt(CURL.OPT_SSLCERT, "./2796.pem");

I get Perform: 58 (Problem with the local client certificate)

Am I doing something wrong on creating / sending the certificate?

Thanks,
Luis
Received on 2007-05-07