-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for caching_sha2_password handshake
- Loading branch information
1 parent
08fe203
commit 111a283
Showing
31 changed files
with
1,039 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
module.exports = AuthMoreDataPacket; | ||
function AuthMoreDataPacket(options) { | ||
options = options || {}; | ||
|
||
this.status = 0x01; | ||
this.data = options.data; | ||
} | ||
|
||
AuthMoreDataPacket.prototype.parse = function parse(parser) { | ||
this.status = parser.parseUnsignedNumber(1); | ||
this.data = parser.parsePacketTerminatedString(); | ||
}; | ||
|
||
AuthMoreDataPacket.prototype.write = function parse(writer) { | ||
writer.writeUnsignedNumber(this.status); | ||
writer.writeString(this.data); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module.exports = ClearTextPasswordPacket; | ||
function ClearTextPasswordPacket(options) { | ||
this.data = options.data; | ||
} | ||
|
||
ClearTextPasswordPacket.prototype.write = function write(writer) { | ||
writer.writeNullTerminatedString(this.data); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
module.exports = FastAuthSuccessPacket; | ||
function FastAuthSuccessPacket() { | ||
this.status = 0x01; | ||
this.authMethodName = 0x03; | ||
} | ||
|
||
FastAuthSuccessPacket.prototype.parse = function parse(parser) { | ||
this.status = parser.parseUnsignedNumber(1); | ||
this.authMethodName = parser.parseUnsignedNumber(1); | ||
}; | ||
|
||
FastAuthSuccessPacket.prototype.write = function write(writer) { | ||
writer.writeUnsignedNumber(1, this.status); | ||
writer.writeUnsignedNumber(1, this.authMethodName); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module.exports = HandshakeResponse41Packet; | ||
function HandshakeResponse41Packet() { | ||
this.status = 0x02; | ||
} | ||
|
||
HandshakeResponse41Packet.prototype.parse = function write(parser) { | ||
this.status = parser.parseUnsignedNumber(1); | ||
}; | ||
|
||
HandshakeResponse41Packet.prototype.write = function write(writer) { | ||
writer.writeUnsignedNumber(1, this.status); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
module.exports = PerformFullAuthenticationPacket; | ||
function PerformFullAuthenticationPacket() { | ||
this.status = 0x01; | ||
this.authMethodName = 0x04; | ||
} | ||
|
||
PerformFullAuthenticationPacket.prototype.parse = function parse(parser) { | ||
this.status = parser.parseUnsignedNumber(1); | ||
this.authMethodName = parser.parseUnsignedNumber(1); | ||
}; | ||
|
||
PerformFullAuthenticationPacket.prototype.write = function write(writer) { | ||
writer.writeUnsignedNumber(1, this.status); | ||
writer.writeUnsignedNumber(1, this.authMethodName); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.