Add get_peer_certificate() and a few ffi methods