Anchor certificates support

This patch allows using anchor certificates instead of pinned certificates if needed.