MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / packetize

Function packetize

modules/crypt/ssl/ssl_changecipher.js:58–67  ·  view source on GitHub ↗
(session, type)

Source from the content-addressed store, hash-verified

56 throw new TLSError("changeCipherSpec: bad type");
57 },
58 packetize(session, type) {
59 session.traceProtocol(this);
60 var s = new SSLStream();
61 if (type === undefined) type = change_cipher_spec;
62 s.writeChar(type);
63 var upper = recordProtocol.packetize(session, recordProtocol.change_cipher_spec, s.getChunk());
64 session.writeSeqNum = BigInt(0); // the specification is very ambiguous about the sequence number...
65 SetupCipher(session, session.connectionEnd);
66 return upper;
67 },
68});
69
70export default changeCipherSpec;

Callers

nothing calls this directly

Calls 4

writeCharMethod · 0.95
getChunkMethod · 0.95
SetupCipherFunction · 0.85
traceProtocolMethod · 0.45

Tested by

no test coverage detected