cert_test.go 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // Copyright 2014 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. // +build darwin dragonfly freebsd linux netbsd openbsd
  5. package test
  6. import (
  7. "crypto/rand"
  8. "testing"
  9. "golang.org/x/crypto/ssh"
  10. )
  11. func TestCertLogin(t *testing.T) {
  12. s := newServer(t)
  13. defer s.Shutdown()
  14. // Use a key different from the default.
  15. clientKey := testSigners["dsa"]
  16. caAuthKey := testSigners["ecdsa"]
  17. cert := &ssh.Certificate{
  18. Key: clientKey.PublicKey(),
  19. ValidPrincipals: []string{username()},
  20. CertType: ssh.UserCert,
  21. ValidBefore: ssh.CertTimeInfinity,
  22. }
  23. if err := cert.SignCert(rand.Reader, caAuthKey); err != nil {
  24. t.Fatalf("SetSignature: %v", err)
  25. }
  26. certSigner, err := ssh.NewCertSigner(cert, clientKey)
  27. if err != nil {
  28. t.Fatalf("NewCertSigner: %v", err)
  29. }
  30. conf := &ssh.ClientConfig{
  31. User: username(),
  32. }
  33. conf.Auth = append(conf.Auth, ssh.PublicKeys(certSigner))
  34. client, err := s.TryDial(conf)
  35. if err != nil {
  36. t.Fatalf("TryDial: %v", err)
  37. }
  38. client.Close()
  39. }
PANIC: session(release): write data/sessions/7/4/74e5f74e43d45c96: no space left on device

PANIC

session(release): write data/sessions/7/4/74e5f74e43d45c96: no space left on device
github.com/go-macaron/session@v0.0.0-20190805070824-1a3cdc6f5659/session.go:199 (0x8b2934)
gopkg.in/macaron.v1@v1.3.9/context.go:79 (0x83d0a0)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:157 (0x80ab07)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:135 (0x80a8a8)
gopkg.in/macaron.v1@v1.3.9/context.go:121 (0x83d1f8)
gopkg.in/macaron.v1@v1.3.9/context.go:112 (0x84fdb5)
gopkg.in/macaron.v1@v1.3.9/recovery.go:161 (0x84fda8)
gopkg.in/macaron.v1@v1.3.9/logger.go:40 (0x840c73)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:157 (0x80ab07)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:135 (0x80a8a8)
gopkg.in/macaron.v1@v1.3.9/context.go:121 (0x83d1f8)
gopkg.in/macaron.v1@v1.3.9/router.go:187 (0x850fc6)
gopkg.in/macaron.v1@v1.3.9/router.go:303 (0x8493e5)
gopkg.in/macaron.v1@v1.3.9/macaron.go:220 (0x841fca)
net/http/server.go:2836 (0x7a79b2)
net/http/server.go:1924 (0x7a341b)
runtime/asm_amd64.s:1373 (0x46f9f0)