Improve certificate generation for tests for Go 1.3