Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1572)

Unified Diff: ssh/common.go

Issue 9853050: code review 9853050: go.crypto/ssh: implement challenge/response auth (RFC 4... (Closed)
Patch Set: diff -r b5f1a3f28dce https://code.google.com/p/go.crypto Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ssh/client_auth_test.go ('k') | ssh/messages.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ssh/common.go
===================================================================
--- a/ssh/common.go
+++ b/ssh/common.go
@@ -329,6 +329,21 @@
return appendU32(buf, uint32(n))
}
+func appendString(buf []byte, s string) []byte {
+ buf = appendU32(buf, uint32(len(s)))
+ buf = append(buf, s...)
+ return buf
+}
+
+func appendBool(buf []byte, b bool) []byte {
+ if b {
+ buf = append(buf, 1)
+ } else {
+ buf = append(buf, 0)
+ }
+ return buf
+}
+
// newCond is a helper to hide the fact that there is no usable zero
// value for sync.Cond.
func newCond() *sync.Cond { return sync.NewCond(new(sync.Mutex)) }
« no previous file with comments | « ssh/client_auth_test.go ('k') | ssh/messages.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b