Add events for certificate problems.

Issue #213
Merge pull request #223 from csmith/master

Add events for certificate problems.