Add x509 bindings (Refs #77)

(tests finally passing - could use a review)