Alternative TLS implementation in Go
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

37 行
649 B

  1. // Copyright 2011 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. package tls
  5. import (
  6. "testing"
  7. )
  8. var tlsServers = []string{
  9. "google.com:443",
  10. "github.com:443",
  11. "twitter.com:443",
  12. }
  13. func TestOSCertBundles(t *testing.T) {
  14. defaultRoots()
  15. if testing.Short() {
  16. t.Logf("skipping certificate tests in short mode")
  17. return
  18. }
  19. for _, addr := range tlsServers {
  20. conn, err := Dial("tcp", addr, nil)
  21. if err != nil {
  22. t.Errorf("unable to verify %v: %v", addr, err)
  23. continue
  24. }
  25. err = conn.Close()
  26. if err != nil {
  27. t.Error(err)
  28. }
  29. }
  30. }