t3hmrman / casgo

Single Sign On (SSO) Central Authentication Server (CAS) written in Go
ISC License
50 stars 9 forks source link

Create custom x509 cert instead of disabling client SSL check in test #21

Open t3hmrman opened 9 years ago

t3hmrman commented 9 years ago

Currently test disables SSL cert verification for the client it uses. Based on [some discussion on google groups]() it should involve a process somewhat like:

* x509.NewCertPool to create a new cert pool
* AppendCertsFromPEM to add your root certs to the pool
* Create a tls.Config and set RootCAs to your pool
* Call Config's BuildNameToCertificate
* Use the Config in your http.Transport 

Tried to get this to work for a bit, but still had problems with CA errors. Would be nice to fix this some day (?)