signalwire / libstirshaken

C library implementing STIR-shaken STI-SP AS/VS, STI-CA
MIT License
31 stars 23 forks source link

Add default certificate caching behaviour #106

Closed piotr-gregor closed 3 years ago

piotr-gregor commented 3 years ago

By setting

stir_shaken_vs_set_default_cert_caching(ss, vs, 1); stir_shaken_vs_set_cache_expire_seconds(...); stir_shaken_vs_set_cache_dir(...);

certificate caching inside given dir is turned on. This will use default implementation of shaken callback: stir_shaken_vs_default_callback().

There are three independent setings now that cross some logic inside the core of the lib and must be tested with each other:

This results in 8 additional VS setups that must be tested + those with caching on must be tested with and without cert available in cache, so it's 2 2 3 = 12 in total.