makeIdentityProvider creates a new instance of the fakeProvider returning the identity key material specified in the provider file paths.
(t *testing.T, certPath, keyPath string)
| 198 | // makeIdentityProvider creates a new instance of the fakeProvider returning the |
| 199 | // identity key material specified in the provider file paths. |
| 200 | func makeIdentityProvider(t *testing.T, certPath, keyPath string) certprovider.Provider { |
| 201 | t.Helper() |
| 202 | cert, err := tls.LoadX509KeyPair(testdata.Path(certPath), testdata.Path(keyPath)) |
| 203 | if err != nil { |
| 204 | t.Fatal(err) |
| 205 | } |
| 206 | return &fakeProvider{km: &certprovider.KeyMaterial{Certs: []tls.Certificate{cert}}} |
| 207 | } |
| 208 | |
| 209 | // makeRootProvider creates a new instance of the fakeProvider returning the |
| 210 | // root key material specified in the provider file paths. |
no test coverage detected