-
Notifications
You must be signed in to change notification settings - Fork 22
Conversation
daviddias
commented
Nov 8, 2016
•
edited by dignifiedquire
Loading
edited by dignifiedquire
- added test
- fix libp2p-websockets fix: onConnect does not follow callback pattern js-libp2p-websockets#36
- fix secio
8257da2
to
1fdbcc4
Compare
public: pid._pubKey, | ||
private: pid._privKey | ||
}, conn, (err, _encryptedConn) => { | ||
expect(err).to.not.exist |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fails here with this error:
1) secio browser <-> nodejs encrypt:
AssertionError: expected { isTrusted: [Getter],
NONE: 0,
CAPTURING_PHASE: 1,
AT_TARGET: 2,
BUBBLING_PHASE: 3,
MOUSEDOWN: 1,
MOUSEUP: 2,
MOUSEOVER: 4,
MOUSEOUT: 8,
MOUSEMOVE: 16,
MOUSEDRAG: 32,
CLICK: 64,
DBLCLICK: 128,
KEYDOWN: 256,
KEYUP: 512,
KEYPRESS: 1024,
DRAGDROP: 2048,
FOCUS: 4096,
BLUR: 8192,
SELECT: 16384,
CHANGE: 32768,
type: [Getter],
target: [Getter],
currentTarget: [Getter],
eventPhase: [Getter],
bubbles: [Getter],
cancelable: [Getter],
defaultPrevented: [Getter],
timeStamp: [Getter],
path: [Getter],
srcElement: [Getter],
returnValue: [Getter/Setter],
cancelBubble: [Getter/Setter],
stopPropagation: [Function: stopPropagation],
stopImmediatePropagation: [Function: stopImmediatePropagation],
preventDefault: [Function: preventDefault],
initEvent: [Function: initEvent],
composed: [Getter],
composedPath: [Function: composedPath] } to not exist
done() | ||
}) | ||
it('encrypt', () => { | ||
secio.encrypt(pid, pid._privKey, conn) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wait, it doesn't yield a wrapped encrypted conn?
|
||
- `id: PeerId` - The id of the node. | ||
- `key: RSAPrivateKey` - The private key of the node. | ||
- `insecure: PullStream` - The insecure connection. | ||
- `callback: Function` - Called if an error happens during the initialization. | ||
|
||
Returns the `insecure` connection provided, wrapped with secio. This is a pull-stream. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is kind of misleading, saying it returns a 'insecure connection'
I was just very confused by seeing CI green but locally seeing tests failing. It seems aegir doesn't exist(1) when tests fail in the browser https://travis-ci.org/libp2p/js-libp2p-secio/jobs/174449763#L1399 |
Yes that is what I had to do, to make Sauce Labs not make all CI red |
The underlying reason for the failure to communicate between node.js and the browser is found in libp2p/js-libp2p-crypto#29 |
Ready for review and passing with libp2p/js-libp2p-crypto#29 |