This is a fantastic piece of software:

Arnaud Ebalard. x509-parser: a RTE-free X.509 parser. https://github.com/ANSSI-FR/x509-parser

This implements a X.509 parser, with profuse ACSL annotations so that the whole parser is verifiable with frama-c

  • This guarantees the parser is free from run-time errors: invalid memory accesses, signed integer overflows, undefined behavior)
  • It is suitable for embedded devices (no malloc, no floats, no dependencies)
  • The current ACSL annotations cannot prove the code adheres to some specification (correctness) but nevertheless it’s a great piece of engineering
  • It is a good resource to learn frama-c and ACSL in a non-trivial project.

This is an excerpt from the paper:

ACSL

References:

Related:

Other projects from ANSSI: