Refactor compliance code
Refactor the code checking whether a key is compliant into a new function and export that.
Signed-off-by: Justus Winter <justus@gnupg.org>