factor out variable signing code Since we have two uses of the code, consolidate into a library routine so the signing can be done in a single place. Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>