вторник, 2 ноември 2010 г.

How to get Flex file upload over SSL work on Mozilla

I was persistantly getting an IO Error upon all attempts to get https upload with FileReference working on Firefox. And since these's no much info on the web on this issue (rather convictions that it just aint supported or something), let me add my own input on how I fixed it in my case.

Configuration:
--------------
Flex 3.5
Firefox 3.6.10
Apache 2 backend


The reason why it failed
------------------------
My backend server has a self-signed certificate. So in the begining of the https session, the browser shows the warning message for untrusted certificate. Choosing to trust this site's certificate (by adding 'exception' for it in the firefox store) is not enough for Flash to resolve the security issue. You need to:

1) Sign the server cectificate with a CA certificate and import the CA certificate into Firefox CA store. The path is Tools>options>advanced>encryption>view certificates>authorities>import. This way you make Firefox trust the CA and respectively the certificate of your backend server [signed with the CA signature]. The CA certificate can again be self-made, using a tool like OpenSSL.

2) Make sure Flash can access the CA certificate. Flash does not look for certificates in the Firefox store, but in the default CA certificates store. For windows, to make sure certificate info gets there, install the CA certificate with IExplorer under tools>..etc. For Linux, the location is /etc/ssl/certs/ and you should follow the specific system procedure for updating the store.

Няма коментари:

Публикуване на коментар