• S
    Add 'on demand self test' and status test to providers · 04cb5ec0
    Shane Lontis 提交于
    The default and legacy providers currently return 1 for status and self test checks.
    Added test to show the 3 different stages the self test can be run (for installation, loading and on demand).
    
    For the fips provider:
      - If the on demand self test fails, then any subsequent fetches should also fail. To implement this the
        cached algorithms are flushed on failure.
      - getting the self test callback in the fips provider is a bit complicated since the callback hangs off the core
        libctx (as it is set by the application) not the actual fips library context. Also the callback can be set at
        any time not just during the OSSL_provider_init() so it is calculated each time before doing any self test.
    Reviewed-by: NMatt Caswell <matt@openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/11752)
    04cb5ec0
sparse_array.c 6.0 KB