Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
1a072f4b
Commit
1a072f4b
authored
Dec 15, 2010
by
Adam Langley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypto/tls: commit fixes which I hadn't saved.
R=rsc CC=golang-dev
https://golang.org/cl/3685041
parent
976e4572
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
cipher_suites.go
src/pkg/crypto/tls/cipher_suites.go
+4
-2
common.go
src/pkg/crypto/tls/common.go
+1
-1
No files found.
src/pkg/crypto/tls/cipher_suites.go
View file @
1a072f4b
...
...
@@ -16,7 +16,9 @@ import (
// function. All cipher suites currently assume RSA key agreement.
type
cipherSuite
struct
{
// the lengths, in bytes, of the key material needed for each component.
keyLen
,
macLen
,
ivLen
int
keyLen
int
macLen
int
ivLen
int
cipher
func
(
key
,
iv
[]
byte
,
isRead
bool
)
interface
{}
mac
func
(
macKey
[]
byte
)
hash
.
Hash
}
...
...
@@ -47,7 +49,7 @@ func hmacSHA1(key []byte) hash.Hash {
// ciphersuites and the id requested by the peer.
func
mutualCipherSuite
(
have
[]
uint16
,
want
uint16
)
(
suite
*
cipherSuite
,
id
uint16
)
{
for
_
,
id
:=
range
have
{
if
want
==
id
{
if
id
==
want
{
return
cipherSuites
[
id
],
id
}
}
...
...
src/pkg/crypto/tls/common.go
View file @
1a072f4b
...
...
@@ -147,7 +147,7 @@ func (c *Config) rootCAs() *CASet {
func
(
c
*
Config
)
cipherSuites
()
[]
uint16
{
s
:=
c
.
CipherSuites
if
len
(
s
)
==
0
{
if
s
==
nil
{
s
=
defaultCipherSuites
()
}
return
s
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment