(fileName string)
| 68 | } |
| 69 | |
| 70 | func readTrustCert(fileName string) (*x509.CertPool, error) { |
| 71 | trustData, err := os.ReadFile(fileName) |
| 72 | if err != nil { |
| 73 | return nil, err |
| 74 | } |
| 75 | trustPool := x509.NewCertPool() |
| 76 | if !trustPool.AppendCertsFromPEM(trustData) { |
| 77 | return nil, fmt.Errorf("error loading trust certificates") |
| 78 | } |
| 79 | return trustPool, nil |
| 80 | } |
| 81 | |
| 82 | // LoadCerts function is used to load test certificates at the beginning of |
| 83 | // each integration test. |