I can provide the one for 3.x when I've got it working smoothly, unless someone else has it ready to go and wants to submit it.
On a related note, have other people solved the problem of breaking out of secured pages? When I was trying to resolve that issue I found some code in one of the posts, but it didn't really work for me.
I ended up creating a much more elaborate solution that allows me to more finely tune what gets passed through SSL. I don't know if my solution creates excessive overhead or if there is a better approach out there, but that also seems like something that would be good to package up.