pyca/pyopenssl — pull request #93 by Bluehorn (2014-04-11 12:46:46+00:00)
Title: Make X509Name instances usable as dictionary keys.

I tried to use X509Name instances as dictionary keys and was surprised that looking up the certificates by subject failed. Checking the X509_NAME_hash function I was wondering why this can go wrong only to notice on the third read that X509Name implements a method hash but not the special method __hash__.

I think that it is much more intuitive to have X509Name work like special strings. Also, if a == b and a.hash() == b.hash() I would also expect hash(a) == hash(b) to hold.

I hope you agree :-)