1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-28 08:47:42 +08:00

646 Commits

Author SHA1 Message Date
af1ce6ee50 Merge branch 'ipns' of github.com:jbenet/go-ipfs into ipns 2014-10-06 03:43:10 +00:00
5592030ed3 working on dag modification structures, factored out the data format into an importer subpackage and added more ipns tests 2014-10-06 03:42:59 +00:00
5136c786e5 Bugfix: "Malformed Public Key" Error
This commit fixed the notoriously annoying "Malformed Public Key"
problem. The issue was that sometimes the byte representation of
the points (x,y in big.Int) generated would be one less byte than
expected. This is simply because (* big.Int) Write uses the least
amount of bytes needed for the int.

I instead changed the marshalling/unmarshalling to do exactly
what stdlib crypto/tls does: use `ellipctic.Marshal` which marshals
according to the ANSI X9.62 standard.

http://golang.org/pkg/crypto/elliptic/#Marshal
http://golang.org/src/pkg/crypto/tls/key_agreement.go#L214

```Go
// crypto/tls
ka.privateKey, x, y, err = elliptic.GenerateKey(ka.curve, config.rand())
ecdhePublic := elliptic.Marshal(ka.curve, x, y)

// ipfs/crypto
priv, x, y, err := elliptic.GenerateKey(curve, rand.Reader)
pubKey := elliptic.Marshal(curve, x, y)
```

((Warning: we're using `rand.Reader` directly, which we shouldn't
do, as it can be seeded. We should use a configured source, as
crypto/tls. Flagged in #143))

This makes me think we should re-use a lot of their datastructures
and functions directly (e.g. ecdheKeyAgreement)

Fixed: #135

cc @bren2010 @whyrusleeping
2014-10-05 15:56:52 -07:00
d7d3af3faf vendoring protobuf + go-is-domain 2014-10-05 15:15:49 -07:00
c0250f3c8e bump logging to ERROR 2014-10-05 14:50:39 -07:00
7e83982247 print out key if 'malformed' 2014-10-05 14:50:30 -07:00
a13baff33d fixed data size reporting 2014-10-05 01:22:01 +00:00
16e42f82b0 fixed ipns file persistence bug 2014-10-04 22:42:03 +00:00
a0d77dbf99 fixed keyspace tests on 32 bit systems 2014-10-04 19:29:08 +00:00
faaaa2298b Merge branch 'ipns' of github.com:jbenet/go-ipfs into ipns 2014-10-04 19:26:58 +00:00
25b36d1000 moved mock core node to core package 2014-10-04 19:13:56 +00:00
ee1d1ac078 add: only show added once. 2014-10-04 03:56:12 -07:00
0c8ae7674e loggers: set level 2014-10-04 03:53:21 -07:00
7e1cd59259 initialize loggers at ERROR 2014-10-04 03:36:30 -07:00
c64add1959 clean up ipns test and add more asserts 2014-10-04 08:30:24 +00:00
5423a00894 create test node and make first ipns test pass 2014-10-04 08:00:13 +00:00
0c7ff7b0a8 add skeleton for ipns test, to be finished when there is a mock core.IpfsNode 2014-10-04 07:24:57 +00:00
02de522216 Merge branch 'ipns-dev' of github.com:jbenet/go-ipfs into ipns-dev 2014-10-04 06:34:15 +00:00
11332fc73b make the tests pass! 2014-10-04 06:34:06 +00:00
73b2058f8f DNSResolver: use isd.IsDomain
this commit dedicated to @whyrusleeping
2014-10-03 18:08:27 -07:00
7bb2bd6d16 a little more progress... and some debugging code 2014-10-03 23:50:05 +00:00
791daf5f8b Merge branch 'ipns-dev' of github.com:jbenet/go-ipfs into ipns-dev 2014-10-03 23:04:47 +00:00
e7aa1166bc add writerAt for fuse writes 2014-10-03 23:04:41 +00:00
612be59643 use string datastore keys. 2014-10-03 15:39:22 -07:00
2ce9415c69 + fs ds + thread safe 2014-10-03 14:45:21 -07:00
88d804e32a added core logging 2014-10-03 14:45:21 -07:00
8a7f6aca99 godeps: updated datastore 2014-10-03 14:45:21 -07:00
dc66b699b0 fix writes zeroing files 2014-10-03 21:36:29 +00:00
4727535160 fixing mutability issues in ipns 2014-10-03 19:22:54 +00:00
d872e0cce5 move publish and resolve under the 'name' subcommand 2014-10-02 22:30:50 +00:00
80c64ffa6d break ipns into separate files 2014-10-02 17:25:08 +00:00
41bc355be3 /rpcaddr should be storing a multiaddr
client expects a multiaddr. server was writing a bsaddr
2014-10-02 03:42:19 -07:00
a76f6af1df remove old cat 2014-10-02 03:33:20 -07:00
f923652d88 remove extra printf 2014-10-02 03:07:52 -07:00
bc0769e370 ipfs + ipns mounts with flags + config 2014-10-02 03:05:49 -07:00
068c0375f9 bugfix: get to root cmd for config flag 2014-10-02 03:05:05 -07:00
7bf7afb7a9 logging on gen 2014-10-02 03:04:48 -07:00
e91b2b8aec use makeCommand for publish + resolve 2014-10-02 02:50:55 -07:00
330ee8c79f added command struct for makeCommand 2014-10-02 02:50:33 -07:00
2bd843123e added command context initialization 2014-10-02 02:49:36 -07:00
381824477e Bugfix: daemon wg sync 2014-10-02 00:12:36 -07:00
ee1ba164d0 fix arg bug 2014-10-02 00:09:32 -07:00
33dfa6f640 lint 2014-10-02 00:06:50 -07:00
b6a59c90cf add flag for ipfs mountpoint 2014-10-02 06:14:38 +00:00
aa79f38580 cleanup logging setup.
- should not be on init, because need debug flag
2014-10-01 02:02:48 -07:00
ba510cbd6d IpnsPublicher -> Publisher interface 2014-10-01 01:36:21 -07:00
19b0a28d43 security TODO warning 2014-10-01 01:31:04 -07:00
41aab9f46f comment + import nits 2014-10-01 01:30:01 -07:00
b787c705e2 command output nit 2014-10-01 01:28:55 -07:00
1cfb0ffd05 command output nit 2014-10-01 01:28:20 -07:00