validationOptions returns azureidentity.Options that trust only this chain's Root CA.
()
| 216 | // validationOptions returns azureidentity.Options that trust only this |
| 217 | // chain's Root CA. |
| 218 | func (tc *testCertChain) validationOptions() azureidentity.Options { |
| 219 | roots := x509.NewCertPool() |
| 220 | roots.AddCert(tc.RootCert) |
| 221 | return azureidentity.Options{ |
| 222 | Roots: roots, |
| 223 | Intermediates: []*x509.Certificate{tc.IntermediateCert}, |
| 224 | Offline: true, |
| 225 | } |
| 226 | } |
| 227 | |
| 228 | func TestValidate_TamperedContent(t *testing.T) { |
| 229 | t.Parallel() |
no outgoing calls
no test coverage detected