if signkey is available, use it; otherwise use digest