// TestBadCertRequest checks for failure conditions of ParseRequest.
TestBadCertRequest checks for failure conditions of ParseRequest.
// TestBadCertRequest checks for failure conditions of ParseRequest .
func TestBadCertRequest(t *testing.T) {
	var req = &CertificateRequest{
		Names: []Name{
			{
				C:  "US",
				ST: "California",
				L:  "San Francisco",
				O:  "CloudFlare",
				OU: "Systems Engineering",
			},
		},
		CN:         "cloudflare.com",
		Hosts:      []string{"cloudflare.com", "www.cloudflare.com"},
		KeyRequest: &KeyRequest{"yolo-crypto", 2048},
	}
	_, _, err := ParseRequest(req)
	if err == nil {
		t.Fatal("ParseRequest should fail with a bad key algorithm.")
	}
}
func TestBadCertRequest ( t * testing . T ) { var req = & CertificateRequest { Names : [ ] Name { { C : " " , ST : " " , L : " " , O : " " , OU : " " , } , } , CN : " " , Hosts : [ ] string { " " , " " } , KeyRequest : & KeyRequest { " " , 2048 } , } _ , _ , err := ParseRequest ( req ) if err == nil { t . Fatal ( " " ) } }
TestBadCertRequest checks for failure conditions of ParseRequest.
TestBadCertRequest checks for failure conditions of ParseRequest .