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

Delta Between Two Patch Sets: src/pkg/exp/ssh/server.go

Issue 5373055: code review 5373055: exp/ssh: add client side support for publickey auth (Closed)
Left Patch Set: diff -r 68d902758434 https://go.googlecode.com/hg/ Created 13 years, 4 months ago
Right Patch Set: diff -r 01baaa1a6b5a https://go.googlecode.com/hg/ Created 13 years, 4 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « src/pkg/exp/ssh/common.go ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 // Copyright 2011 The Go Authors. All rights reserved. 1 // Copyright 2011 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 package ssh 5 package ssh
6 6
7 import ( 7 import (
8 "bytes" 8 "bytes"
9 "crypto" 9 "crypto"
10 "crypto/rand" 10 "crypto/rand"
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 switch hostKeyAlgo { 214 switch hostKeyAlgo {
215 case hostAlgoRSA: 215 case hostAlgoRSA:
216 sig, err = rsa.SignPKCS1v15(s.config.rand(), s.config.rsa, hashF unc, hh) 216 sig, err = rsa.SignPKCS1v15(s.config.rand(), s.config.rsa, hashF unc, hh)
217 if err != nil { 217 if err != nil {
218 return 218 return
219 } 219 }
220 default: 220 default:
221 return nil, nil, errors.New("internal error") 221 return nil, nil, errors.New("internal error")
222 } 222 }
223 223
224 » serializedSig := serializeRSASignature(sig) 224 » serializedSig := serializeSignature(hostAlgoRSA, sig)
225 225
226 kexDHReply := kexDHReplyMsg{ 226 kexDHReply := kexDHReplyMsg{
227 HostKey: serializedHostKey, 227 HostKey: serializedHostKey,
228 Y: Y, 228 Y: Y,
229 Signature: serializedSig, 229 Signature: serializedSig,
230 } 230 }
231 packet = marshal(msgKexDHReply, kexDHReply) 231 packet = marshal(msgKexDHReply, kexDHReply)
232 232
233 err = s.writePacket(packet) 233 err = s.writePacket(packet)
234 return 234 return
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 func Listen(network, addr string, config *ServerConfig) (*Listener, error) { 662 func Listen(network, addr string, config *ServerConfig) (*Listener, error) {
663 l, err := net.Listen(network, addr) 663 l, err := net.Listen(network, addr)
664 if err != nil { 664 if err != nil {
665 return nil, err 665 return nil, err
666 } 666 }
667 return &Listener{ 667 return &Listener{
668 l, 668 l,
669 config, 669 config,
670 }, nil 670 }, nil
671 } 671 }
LEFTRIGHT

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