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

Delta Between Two Patch Sets: ssh/certs.go

Issue 6873060: code review 6873060: go.crypto/ssh: Add support for ECDSA keys and certs. (Closed)
Left Patch Set: diff -r 06723ccb4c19 https://code.google.com/p/go.crypto Created 11 years, 3 months ago
Right Patch Set: diff -r 06723ccb4c19 https://code.google.com/p/go.crypto Created 11 years, 3 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 | « no previous file | ssh/common.go » ('j') | 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 2012 The Go Authors. All rights reserved. 1 // Copyright 2012 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
6
5 // References 7 // References
6 // [PROTOCOL.certkeys]: http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/ PROTOCOL.certkeys 8 // [PROTOCOL.certkeys]: http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/ PROTOCOL.certkeys
7
8 package ssh
agl1 2012/12/11 15:32:16 I don't think the References comment should live a
jmpittman 2012/12/11 15:52:07 Unless you feel it not necessary, I moved it up so
9 9
10 import ( 10 import (
11 "crypto/dsa" 11 "crypto/dsa"
12 "crypto/ecdsa" 12 "crypto/ecdsa"
13 "crypto/rsa" 13 "crypto/rsa"
14 "time" 14 "time"
15 ) 15 )
16 16
17 // String constants in [PROTOCOL.certkeys] for certificate algorithm names. 17 // String constants in [PROTOCOL.certkeys] for certificate algorithm names.
18 const ( 18 const (
(...skipping 18 matching lines...) Expand all
37 37
38 type tuple struct { 38 type tuple struct {
39 Name string 39 Name string
40 Data string 40 Data string
41 } 41 }
42 42
43 // An OpenSSHCertV01 represents an OpenSSH certificate as defined in 43 // An OpenSSHCertV01 represents an OpenSSH certificate as defined in
44 // [PROTOCOL.certkeys] rev 1.8. Supported formats include 44 // [PROTOCOL.certkeys] rev 1.8. Supported formats include
45 // ssh-rsa-cert-v01@openssh.com, ssh-dss-cert-v01@openssh.com, 45 // ssh-rsa-cert-v01@openssh.com, ssh-dss-cert-v01@openssh.com,
46 // ecdsa-sha2-nistp256-cert-v01@openssh.com, ecdsa-sha2-nistp384-cert-v01@openss h.com, 46 // ecdsa-sha2-nistp256-cert-v01@openssh.com, ecdsa-sha2-nistp384-cert-v01@openss h.com,
47 // and ecdsa-sha2-nistp521-cert-v01@openssh.com. 47 // and ecdsa-sha2-nistp521-cert-v01@openssh.com.
dfc 2012/12/13 11:16:03 Suggestion: Maybe the constants above should be ex
jmpittman 2012/12/13 18:38:49 Will do in a follow up CL.
48 type OpenSSHCertV01 struct { 48 type OpenSSHCertV01 struct {
49 Nonce []byte 49 Nonce []byte
50 Key interface{} // rsa, dsa, or ecdsa *PublicKey 50 Key interface{} // rsa, dsa, or ecdsa *PublicKey
51 Serial uint64 51 Serial uint64
52 Type uint32 52 Type uint32
53 KeyId string 53 KeyId string
54 ValidPrincipals []string 54 ValidPrincipals []string
55 ValidAfter, ValidBefore time.Time 55 ValidAfter, ValidBefore time.Time
56 CriticalOptions []tuple 56 CriticalOptions []tuple
57 Extensions []tuple 57 Extensions []tuple
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 return 308 return
309 } 309 }
310 sig.Format = string(format) 310 sig.Format = string(format)
311 311
312 if sig.Blob, sigBytes, ok = parseString(sigBytes); !ok { 312 if sig.Blob, sigBytes, ok = parseString(sigBytes); !ok {
313 return 313 return
314 } 314 }
315 315
316 return sig, rest, ok 316 return sig, rest, ok
317 } 317 }
LEFTRIGHT
« no previous file | ssh/common.go » ('j') | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

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