SCT signature verification, encode/decode and accessor functions

Other places return -1 on NULL parameters. Probably best to be consistent within a module.