A pure-Haskell SSH server library

#3ssh tests failing, darcsden-ssh segfaulting with GHC 7.8+

See also darcsden#134.

~/src/ssh$ cabal configure -w ghc-7.6.3  --enable-tests
Resolving dependencies...
Configuring ssh-0.3.0.1...
~/src/ssh$ cabal test
Preprocessing library ssh-0.3.0.1...
[1 of 9] Compiling SSH.Util         ( src/SSH/Util.hs, dist/build/SSH/Util.o )
[2 of 9] Compiling SSH.Packet       ( src/SSH/Packet.hs, dist/build/SSH/Packet.o )
[3 of 9] Compiling SSH.NetReader    ( src/SSH/NetReader.hs, dist/build/SSH/NetReader.o )
[4 of 9] Compiling SSH.Debug        ( src/SSH/Debug.hs, dist/build/SSH/Debug.o )
[5 of 9] Compiling SSH.Crypto       ( src/SSH/Crypto.hs, dist/build/SSH/Crypto.o )
[6 of 9] Compiling SSH.Sender       ( src/SSH/Sender.hs, dist/build/SSH/Sender.o )
[7 of 9] Compiling SSH.Channel      ( src/SSH/Channel.hs, dist/build/SSH/Channel.o )
[8 of 9] Compiling SSH.Session      ( src/SSH/Session.hs, dist/build/SSH/Session.o )
[9 of 9] Compiling SSH              ( src/SSH.hs, dist/build/SSH.o )
In-place registering ssh-0.3.0.1...
Preprocessing test suite 'ssh-test' for ssh-0.3.0.1...
[1 of 2] Compiling EmbedTree        ( test/EmbedTree.hs, dist/build/ssh-test/ssh-test-tmp/EmbedTree.o )
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package array-0.4.0.1 ... linking ... done.
Loading package deepseq-1.3.0.1 ... linking ... done.
Loading package bytestring-0.10.0.2 ... linking ... done.
Loading package containers-0.5.0.0 ... linking ... done.
Loading package pretty-1.1.1.0 ... linking ... done.
Loading package template-haskell ... linking ... done.
Loading package text-1.2.0.4 ... linking ... done.
Loading package th-lift-0.7.2 ... linking ... done.
Loading package primitive-0.5.4.0 ... linking ... done.
Loading package vector-0.10.12.3 ... linking ... done.
Loading package th-lift-instances-0.1.5 ... linking ... done.
Loading package time-1.5.0.1 ... linking ... done.
Loading package random-1.1 ... linking ... done.
Loading package tf-random-0.5 ... linking ... done.
Loading package transformers-0.3.0.0 ... linking ... done.
Loading package QuickCheck-2.8.1 ... linking ... done.
Loading package tagged-0.8.0.1 ... linking ... done.
Loading package unix-2.7.1.0 ... linking ... done.
Loading package ansi-terminal-0.6.2.1 ... linking ... done.
Loading package stm-2.4.4 ... linking ... done.
Loading package async-2.0.2 ... linking ... done.
Loading package mtl-2.1.2 ... linking ... done.
Loading package ansi-wl-pprint-0.6.7.2 ... linking ... done.
Loading package filepath-1.3.0.1 ... linking ... done.
Loading package directory-1.2.2.1 ... linking ... done.
Loading package process-1.2.3.0 ... linking ... done.
Loading package transformers-compat-0.4.0.3 ... linking ... done.
Loading package optparse-applicative-0.11.0.2 ... linking ... done.
Loading package parsec-3.1.9 ... linking ... done.
Loading package regex-base-0.93.2 ... linking ... done.
Loading package regex-tdfa-rc-1.1.8.3 ... linking ... done.
Loading package unbounded-delays-0.1.0.9 ... linking ... done.
Loading package tasty-0.10.1.2 ... linking ... done.
Loading package tasty-quickcheck-0.8.3.2 ... linking ... done.
Loading package tasty-hunit-0.9.2 ... linking ... done.
Loading package network-2.6.1.0 ... linking ... done.
Loading package old-locale-1.0.0.5 ... linking ... done.
Loading package HsOpenSSL-0.11.1.1 ... linking ... done.
Loading package binary-0.7.4.0 ... linking ... done.
Loading package SHA-1.6.4.2 ... linking ... done.
Loading package cereal-0.4.0.1 ... linking ... done.
Loading package entropy-0.3.6 ... linking ... done.
Loading package crypto-api-0.13.2 ... linking ... done.
Loading package hourglass-0.2.9 ... linking ... done.
Loading package asn1-types-0.3.0 ... linking ... done.
Loading package asn1-encoding-0.9.0 ... linking ... done.
Loading package crypto-pubkey-types-0.4.3 ... linking ... done.
Loading package monadcryptorandom-0.6.1 ... linking ... done.
Loading package pureMD5-2.1.2.1 ... linking ... done.
Loading package RSA-1.2.2.0 ... linking ... done.
Loading package mwc-random-0.13.3.2 ... linking ... done.
Loading package SimpleAES-0.4.2 ... linking ... done.
Loading package base64-string-0.2 ... linking ... done.
Loading package byteable-0.1.1 ... linking ... done.
Loading package cryptohash-0.11.4 ... linking ... done.
Loading package cryptohash-cryptoapi-0.1.3 ... linking ... done.
Loading package split-0.2.2 ... linking ... done.
Loading package ssh-0.3.0.1 ... linking ... done.
Loading package pseudomacros-0.0.2 ... linking ... done.
Loading package syb-0.4.4 ... linking ... done.
Loading package libssh2-0.2.0.3 ... linking ... done.
Loading package HUnit-1.2.5.2 ... linking ... done.
[2 of 2] Compiling Main             ( test/test.hs, dist/build/ssh-test/ssh-test-tmp/Main.o )
Linking dist/build/ssh-test/ssh-test ...
Running 1 test suites...
Test suite ssh-test: RUNNING...
Test suite ssh-test: PASS
Test suite logged to: dist/test/ssh-0.3.0.1-ssh-test.log
1 of 1 test suites (1 of 1 test cases) passed.
~/src/ssh$ cabal clean
cleaning...
~/src/ssh$ cabal configure -w /opt/ghc/7.8.4/bin/ghc 
Resolving dependencies...
Configuring ssh-0.3.0.1...
~/src/ssh$ cabal test
Re-configuring with test suites enabled. If this fails, please run configure
manually.
Resolving dependencies...
Configuring ssh-0.3.0.1...
Preprocessing library ssh-0.3.0.1...
[1 of 9] Compiling SSH.Util         ( src/SSH/Util.hs, dist/build/SSH/Util.o )
[2 of 9] Compiling SSH.Packet       ( src/SSH/Packet.hs, dist/build/SSH/Packet.o )
[3 of 9] Compiling SSH.NetReader    ( src/SSH/NetReader.hs, dist/build/SSH/NetReader.o )
[4 of 9] Compiling SSH.Debug        ( src/SSH/Debug.hs, dist/build/SSH/Debug.o )
[5 of 9] Compiling SSH.Crypto       ( src/SSH/Crypto.hs, dist/build/SSH/Crypto.o )
[6 of 9] Compiling SSH.Sender       ( src/SSH/Sender.hs, dist/build/SSH/Sender.o )
[7 of 9] Compiling SSH.Channel      ( src/SSH/Channel.hs, dist/build/SSH/Channel.o )
[8 of 9] Compiling SSH.Session      ( src/SSH/Session.hs, dist/build/SSH/Session.o )
[9 of 9] Compiling SSH              ( src/SSH.hs, dist/build/SSH.o )
In-place registering ssh-0.3.0.1...
Preprocessing test suite 'ssh-test' for ssh-0.3.0.1...
[1 of 2] Compiling EmbedTree        ( test/EmbedTree.hs, dist/build/ssh-test/ssh-test-tmp/EmbedTree.o )
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package array-0.5.0.0 ... linking ... done.
Loading package deepseq-1.3.0.2 ... linking ... done.
Loading package bytestring-0.10.4.0 ... linking ... done.
Loading package containers-0.5.5.1 ... linking ... done.
Loading package pretty-1.1.1.1 ... linking ... done.
Loading package template-haskell ... linking ... done.
Loading package text-1.2.0.4 ... linking ... done.
Loading package th-lift-0.7.2 ... linking ... done.
Loading package primitive-0.5.4.0 ... linking ... done.
Loading package vector-0.10.12.3 ... linking ... done.
Loading package th-lift-instances-0.1.4 ... linking ... done.
Loading package old-locale-1.0.0.6 ... linking ... done.
Loading package time-1.4.2 ... linking ... done.
Loading package random-1.1 ... linking ... done.
Loading package tf-random-0.5 ... linking ... done.
Loading package transformers-0.3.0.0 ... linking ... done.
Loading package QuickCheck-2.8 ... linking ... done.
Loading package tagged-0.7.3 ... linking ... done.
Loading package unix-2.7.0.1 ... linking ... done.
Loading package ansi-terminal-0.6.2.1 ... linking ... done.
Loading package stm-2.4.4 ... linking ... done.
Loading package async-2.0.2 ... linking ... done.
Loading package mtl-2.1.3.1 ... linking ... done.
Loading package ansi-wl-pprint-0.6.7.2 ... linking ... done.
Loading package filepath-1.3.0.2 ... linking ... done.
Loading package directory-1.2.1.0 ... linking ... done.
Loading package process-1.2.0.0 ... linking ... done.
Loading package transformers-compat-0.4.0.3 ... linking ... done.
Loading package optparse-applicative-0.11.0.2 ... linking ... done.
Loading package parsec-3.1.8 ... linking ... done.
Loading package regex-base-0.93.2 ... linking ... done.
Loading package regex-tdfa-rc-1.1.8.3 ... linking ... done.
Loading package unbounded-delays-0.1.0.9 ... linking ... done.
Loading package tasty-0.10.1 ... linking ... done.
Loading package tasty-quickcheck-0.8.3.2 ... linking ... done.
Loading package tasty-hunit-0.9.2 ... linking ... done.
Loading package network-2.6.0.2 ... linking ... done.
Loading package HsOpenSSL-0.11.1.1 ... linking ... done.
Loading package binary-0.7.1.0 ... linking ... done.
Loading package SHA-1.6.4.1 ... linking ... done.
Loading package cereal-0.4.1.1 ... linking ... done.
Loading package entropy-0.3.6 ... linking ... done.
Loading package crypto-api-0.13.2 ... linking ... done.
Loading package hourglass-0.2.8 ... linking ... done.
Loading package asn1-types-0.3.0 ... linking ... done.
Loading package asn1-encoding-0.9.0 ... linking ... done.
Loading package crypto-pubkey-types-0.4.3 ... linking ... done.
Loading package monadcryptorandom-0.6.1 ... linking ... done.
Loading package pureMD5-2.1.2.1 ... linking ... done.
Loading package RSA-1.2.2.0 ... linking ... done.
Loading package mwc-random-0.13.3.2 ... linking ... done.
Loading package SimpleAES-0.4.2 ... linking ... done.
Loading package base64-string-0.2 ... linking ... done.
Loading package byteable-0.1.1 ... linking ... done.
Loading package cryptohash-0.11.6 ... linking ... done.
Loading package cryptohash-cryptoapi-0.1.3 ... linking ... done.
Loading package split-0.2.2 ... linking ... done.
Loading package ssh-0.3.0.1 ... linking ... done.
Loading package pseudomacros-0.0.1 ... linking ... done.
Loading package syb-0.4.4 ... linking ... done.
Loading package libssh2-0.2.0.3 ... linking ... done.
Loading package HUnit-1.2.5.2 ... linking ... done.
[2 of 2] Compiling Main             ( test/test.hs, dist/build/ssh-test/ssh-test-tmp/Main.o )
Linking dist/build/ssh-test/ssh-test ...
Running 1 test suites...
Test suite ssh-test: RUNNING...
Tests
  With server
    Single key auth tests
      Check auth with id_dsa
        Works:                                     
Test suite ssh-test: FAIL
Test suite logged to: dist/test/ssh-0.3.0.1-ssh-test.log
0 of 1 test suites (0 of 1 test cases) passed.
~/src/ssh$ cabal clean
cleaning...
~/src/ssh$ cabal configure
Resolving dependencies...
Configuring ssh-0.3.0.1...
~/src/ssh$ cabal test
Re-configuring with test suites enabled. If this fails, please run configure
manually.
Resolving dependencies...
Configuring ssh-0.3.0.1...
Preprocessing library ssh-0.3.0.1...
[1 of 9] Compiling SSH.Util         ( src/SSH/Util.hs, dist/build/SSH/Util.o )
[2 of 9] Compiling SSH.Packet       ( src/SSH/Packet.hs, dist/build/SSH/Packet.o )
[3 of 9] Compiling SSH.NetReader    ( src/SSH/NetReader.hs, dist/build/SSH/NetReader.o )
[4 of 9] Compiling SSH.Debug        ( src/SSH/Debug.hs, dist/build/SSH/Debug.o )
[5 of 9] Compiling SSH.Crypto       ( src/SSH/Crypto.hs, dist/build/SSH/Crypto.o )
[6 of 9] Compiling SSH.Sender       ( src/SSH/Sender.hs, dist/build/SSH/Sender.o )
[7 of 9] Compiling SSH.Channel      ( src/SSH/Channel.hs, dist/build/SSH/Channel.o )
[8 of 9] Compiling SSH.Session      ( src/SSH/Session.hs, dist/build/SSH/Session.o )
[9 of 9] Compiling SSH              ( src/SSH.hs, dist/build/SSH.o )
In-place registering ssh-0.3.0.1...
Preprocessing test suite 'ssh-test' for ssh-0.3.0.1...
[1 of 2] Compiling EmbedTree        ( test/EmbedTree.hs, dist/build/ssh-test/ssh-test-tmp/EmbedTree.o )
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package array-0.5.0.0 ... linking ... done.
Loading package deepseq-1.3.0.2 ... linking ... done.
Loading package bytestring-0.10.4.0 ... linking ... done.
Loading package containers-0.5.5.1 ... linking ... done.
Loading package pretty-1.1.1.1 ... linking ... done.
Loading package template-haskell ... linking ... done.
Loading package text-1.2.0.4 ... linking ... done.
Loading package th-lift-0.7.2 ... linking ... done.
Loading package primitive-0.5.4.0 ... linking ... done.
Loading package vector-0.10.12.3 ... linking ... done.
Loading package th-lift-instances-0.1.4 ... linking ... done.
Loading package old-locale-1.0.0.6 ... linking ... done.
Loading package time-1.4.2 ... linking ... done.
Loading package random-1.1 ... linking ... done.
Loading package tf-random-0.5 ... linking ... done.
Loading package transformers-0.3.0.0 ... linking ... done.
Loading package QuickCheck-2.8 ... linking ... done.
Loading package tagged-0.7.3 ... linking ... done.
Loading package unix-2.7.0.1 ... linking ... done.
Loading package ansi-terminal-0.6.2.1 ... linking ... done.
Loading package stm-2.4.4 ... linking ... done.
Loading package async-2.0.2 ... linking ... done.
Loading package mtl-2.1.3.1 ... linking ... done.
Loading package ansi-wl-pprint-0.6.7.2 ... linking ... done.
Loading package filepath-1.3.0.2 ... linking ... done.
Loading package directory-1.2.1.0 ... linking ... done.
Loading package process-1.2.0.0 ... linking ... done.
Loading package transformers-compat-0.4.0.3 ... linking ... done.
Loading package optparse-applicative-0.11.0.2 ... linking ... done.
Loading package parsec-3.1.8 ... linking ... done.
Loading package regex-base-0.93.2 ... linking ... done.
Loading package regex-tdfa-rc-1.1.8.3 ... linking ... done.
Loading package unbounded-delays-0.1.0.9 ... linking ... done.
Loading package tasty-0.10.1 ... linking ... done.
Loading package tasty-quickcheck-0.8.3.2 ... linking ... done.
Loading package tasty-hunit-0.9.2 ... linking ... done.
Loading package network-2.6.0.2 ... linking ... done.
Loading package HsOpenSSL-0.11.1.1 ... linking ... done.
Loading package binary-0.7.1.0 ... linking ... done.
Loading package SHA-1.6.4.1 ... linking ... done.
Loading package cereal-0.4.1.1 ... linking ... done.
Loading package entropy-0.3.6 ... linking ... done.
Loading package crypto-api-0.13.2 ... linking ... done.
Loading package hourglass-0.2.8 ... linking ... done.
Loading package asn1-types-0.3.0 ... linking ... done.
Loading package asn1-encoding-0.9.0 ... linking ... done.
Loading package crypto-pubkey-types-0.4.3 ... linking ... done.
Loading package monadcryptorandom-0.6.1 ... linking ... done.
Loading package pureMD5-2.1.2.1 ... linking ... done.
Loading package RSA-1.2.2.0 ... linking ... done.
Loading package mwc-random-0.13.3.2 ... linking ... done.
Loading package SimpleAES-0.4.2 ... linking ... done.
Loading package base64-string-0.2 ... linking ... done.
Loading package byteable-0.1.1 ... linking ... done.
Loading package cryptohash-0.11.6 ... linking ... done.
Loading package cryptohash-cryptoapi-0.1.3 ... linking ... done.
Loading package split-0.2.2 ... linking ... done.
Loading package ssh-0.3.0.1 ... linking ... done.
Loading package pseudomacros-0.0.1 ... linking ... done.
Loading package syb-0.4.4 ... linking ... done.
Loading package libssh2-0.2.0.3 ... linking ... done.
Loading package HUnit-1.2.5.2 ... linking ... done.
[2 of 2] Compiling Main             ( test/test.hs, dist/build/ssh-test/ssh-test-tmp/Main.o )
Linking dist/build/ssh-test/ssh-test ...
Running 1 test suites...
Test suite ssh-test: RUNNING...
Tests
  With server
    Single key auth tests
      Check auth with id_dsa
        Works:                                     
Test suite ssh-test: FAIL
Test suite logged to: dist/test/ssh-0.3.0.1-ssh-test.log
0 of 1 test suites (0 of 1 test cases) passed.
~/src/ssh$ cat dist/test/ssh-0.3.0.1-ssh-test.log
Test suite ssh-test: RUNNING...
Tests
  With server
    Single key auth tests
      Check auth with id_dsa
        Works:                                     Test suite ssh-test: FAIL
Test suite logged to: dist/test/ssh-0.3.0.1-ssh-test.log