Introducing s2n, a New Open-Source TLS Implementation
If I counted right:  OCaml TLS: ~4400 LoC
  OCaml X509: ~1550 LoC
  OCaml ASN1: ~1400 LoC
  OCaml nocrypto: ~5250 LoC

Total ~12600 LoC but you get a fully self-contained implementation, having only some crypto code in C and the rest as pure OCaml:https://mirage.io/blog/why-ocaml-tls
https://mirage.io/blog/announcing-mirage-25-release