[os_crypto] add nonnull attributes where suiteable
[os_crypto] fix sign warnings
[os_crypto] uncomment unnecessary variable cleaning (is cleaned later on)
[os_crypto] reduce variable scope and indent branched code
[os_crypto] use snprintf instead of 3 other string operations