Don't check version if handshake succeeds, just accept that OK is OK

This commit is contained in:
idk
2019-02-26 23:10:10 -05:00
parent a537690baa
commit 56cc5bd017
2 changed files with 7 additions and 4 deletions

View File

@ -1,9 +1,12 @@
goSam
=====
A go library for using the [I2P](https://geti2p.net/en/) Simple Anonymous Messaging ([SAM version 3.0](https://geti2p.net/en/docs/api/samv3)) bridge
A go library for using the [I2P](https://geti2p.net/en/) Simple Anonymous
Messaging ([SAM version 3.0](https://geti2p.net/en/docs/api/samv3)) bridge. It
has limited support for SAM version 3.1 signature types.
This is in an **early development stage**. I would love to hear about any issues or ideas for improvement.
This is in an **early development stage**. I would love to hear about any
issues or ideas for improvement.
## Installation
```
@ -70,4 +73,4 @@ func checkErr(err error) {
### TODO
* Implement `STREAM ACCEPT` and `STREAM FORWARD`
* Implement datagrams (Repliable and Anon)
* Implement datagrams (Repliable and Anon)

View File

@ -116,7 +116,7 @@ func (c *Client) hello() error {
return fmt.Errorf("Unknown Reply: %+v\n", r)
}
if r.Pairs["RESULT"] != "OK" || r.Pairs["VERSION"] != "3.0" {
if r.Pairs["RESULT"] != "OK" {
return fmt.Errorf("Handshake did not succeed\nReply:%+v\n", r)
}