Working certificate validation (only basic tests)

git-svn-id: https://ehi.svn.codeplex.com/svn@29355 555e8bc2-ad3d-4a22-a156-a42dcab9bd6f