I finally got SSL working in PAW.
The code in the previous post is working. The problem was fixed by disabling keep alive in the Brazil framework.
Actually I can't tell if this is a problem with the Brazil framework or Android.
HTTPS can now be enabled in the PAW server settings.
Anyway it's working and performance does not seem to suffer too much.