How does one handle a suspend/resume power cycle when using OpenSSL? Specifically, suppose one is in the middle of a SHA-1 Init/Update/Final sequence when the suspend signal occurs? What happens to SHA_CTX?
I know I can save and restore SHA_CTX by peering into the structure. I also know that OpenSSL won't guarantee that the structure will be fixed forever, so my code will be fragile. Is there a better alternative? ~~~~~~~~ I have a similar question regarding the RNG state, but I think I can reseed it after the resume. ~~~~~~~~ I don't see any other functions that keep internal or opaque state. Are there any I should be concerned with? I use only SHA-1, RSA, AES, lots of bignum functions, and the RNG.