mirleft/ocaml-tls — pull request #56 by pqwy (2014-04-22 16:13:44+00:00)
Title: Rehash

Move of various places that decide on which hash functions to invoke into one central place, `Crypto` atm.

Added complication is inter-module deps. `Asn_grammars` is standalone, `Certificate` depended on `Crypto` even before. Since `Crypto` uses `Ciphersuite` for the canonical hash representation, certs depend on tls details.

This should be solved by exposing a simple sum type describing hashing somewhere closer to the ASN layer (than `Ciphersuite` is), which all other parts can then use. That way we disentangle module deps to get cert layer standalone - but this is an exercise in cut-paste across modules, best solved not-now. :)

Please double check I didn't fubar client.ml.