revise to adopt go-hsm changes