go-mail/util_test.go

20 lines
298 B
Go
Raw Normal View History

package mail
import (
2024-09-26 16:43:58 +02:00
"crypto/tls"
)
2024-09-26 16:43:58 +02:00
const (
certFilePath = "dummy-cert.pem"
keyFilePath = "dummy=key.pem"
)
2024-09-26 16:43:58 +02:00
func getDummyCertificate() (*tls.Certificate, error) {
keyPair, err := tls.LoadX509KeyPair(certFilePath, keyFilePath)
if err != nil {
return nil, err
}
2024-09-26 16:43:58 +02:00
return &keyPair, nil
}