Backports for 0.5.4

This backports 3 bindings needed for an upcoming pyOpenSSL release.
Uhh, maybe let's compress these to a single bullet point, it basically says the same thing twice now :-)