What does the AS3 params variable look like, is it of type XML? 

-----Original Message-----
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of robbarreca
Sent: Tuesday, December 25, 2007 6:51 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] HTTPService call using a private SSL cert PEM

I have a REST web services call that uses a private SSL cert to
authenticate communication. It works in PHP and command line cUrl, but I
don't know how to pass the PEM file in the Flex 3 / Actionscript 3.0
HTTPService call. Is it possible? 

Below I give my PHP and cUrl snippets that work now, and followed by the
beginning of my Flex service call. How do I pass the PEM to that Flex
call so Flex can securely talk to the REST web service over this private
SSL cert?

-----
PHP
-----

This worked in PHP where $cert contained the path to the PEM file.

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch,
CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,
FALSE); curl_setopt($ch, CURLOPT_SSLCERT, $cert);

---------------------
cUrl (command line)
---------------------

This worked in command line cUrl, where client.pem contains a private
PEM file for privatesslcerthost.com.

curl ... --cert-type PEM --cert client.pem 

-----------
Flex code
-----------

This needs to pass the PEM in the HTTPService call. How do I do it?

service = new HTTPService();
service.contentType = "text/xml";
service.resultFormat = "e4x";
service.useProxy = false;
service.method = "POST";
service.addEventListener(ResultEvent.RESULT, onRestCallResult);
service.addEventListener(FaultEvent.FAULT, onRestCallFault); service.url
= "https://privatesslcerthost.com/"; + path; service.send(params);



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links



Reply via email to