Cleaned up version of #39

Replaces #39 "Extended signature validation to support signed assertions" and implements #37 "Support of signed assertions".