Fix the cert-key-test by adding "err" before "assertion"

@lloyd - can you review this?

fixes #3389