Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos #5

Merged
merged 1 commit into from
Jul 10, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions parser/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ var TLSHeaderLength = 5
* go ahead and give us the SNI Name they want. */
func GetHostname(data []byte) (string, error) {
if len(data) == 0 || data[0] != 0x16 {
return "", fmt.Errorf("Doens't look like a TLS Client Hello")
return "", fmt.Errorf("Doesn't look like a TLS Client Hello")
}

extensions, err := GetExtensionBlock(data)
Expand Down Expand Up @@ -73,12 +73,12 @@ func GetSNIBlock(data []byte) ([]byte, error) {
)
}

/* Given an TLS Extensions data block, go ahead and find the SN block */
/* Given a TLS Extensions data block, go ahead and find the SN block */
func GetSNBlock(data []byte) ([]byte, error) {
index := 0

if len(data) < 2 {
return []byte{}, fmt.Errorf("Not enough bytes to be a SN block")
return []byte{}, fmt.Errorf("Not enough bytes to be an SN block")
}

extensionLength := int((data[index] << 8) + data[index+1])
Expand Down